Browse Source

0411_uturn.ipynb nearly completed

master
김선중 1 year ago
parent
commit
d3c7c5cac1
8 changed files with 4505 additions and 6438 deletions
  1. +665
    -2507
      Analysis/0411_unp-left_p-right-uturn/0411_uturn.ipynb
  2. +3814
    -3900
      Data/tables/history.csv
  3. +16
    -16
      Data/tables/plan.csv
  4. +2
    -2
      Data/tables/raw_tables/0409_make_sample_table.ipynb
  5. +0
    -4
      Data/tables/turn_type.csv
  6. +7
    -7
      Data/tables/uturn.csv
  7. BIN
      Scripts/__pycache__/preprocess_daily.cpython-38.pyc
  8. +1
    -2
      Scripts/preprocess_daily.py

+ 665
- 2507
Analysis/0411_unp-left_p-right-uturn/0411_uturn.ipynb
File diff suppressed because it is too large
View File


+ 3814
- 3900
Data/tables/history.csv
File diff suppressed because it is too large
View File


+ 16
- 16
Data/tables/plan.csv View File

@ -1,28 +1,28 @@
inter_no,start_hour,start_minute,dura_A1,dura_A2,dura_A3,dura_A4,dura_A5,dura_A6,dura_A7,dura_A8,dura_B1,dura_B2,dura_B3,dura_B4,dura_B5,dura_B6,dura_B7,dura_B8,cycle,offset,yellow_A1,yellow_B1,yellow_A2,yellow_B2,yellow_A3,yellow_B3,yellow_A4,yellow_B4,yellow_A5,yellow_B5,yellow_A6,yellow_B6,yellow_A7,yellow_B7,yellow_A8,yellow_B8,red_A1,red_B1,red_A2,red_B2,red_A3,red_B3,red_A4,red_B4,red_A5,red_B5,red_A6,red_B6,red_A7,red_B7,red_A8,red_B8
175,00,00,37,39,55,29,0,0,0,0,37,39,25,59,0,0,0,0,160,57,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
175,07,00,40,42,55,33,0,0,0,0,40,42,29,59,0,0,0,0,170,40,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
175,09,00,43,45,55,37,0,0,0,0,43,45,33,59,0,0,0,0,180,28,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
175,18,30,46,48,55,41,0,0,0,0,46,48,37,59,0,0,0,0,190,18,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
175,00,00,37,39,55,29,0,0,0,0,37,39,25,59,0,0,0,0,160,57,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
175,07,00,40,42,55,33,0,0,0,0,40,42,29,59,0,0,0,0,170,40,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
175,09,00,43,45,55,37,0,0,0,0,43,45,33,59,0,0,0,0,180,28,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
175,18,30,46,48,55,41,0,0,0,0,46,48,37,59,0,0,0,0,190,18,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
176,00,00,37,73,40,0,0,0,0,0,37,73,40,0,0,0,0,0,150,131,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
176,07,00,37,93,40,0,0,0,0,0,37,93,40,0,0,0,0,0,170,153,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
176,09,00,37,103,40,0,0,0,0,0,37,103,40,0,0,0,0,0,180,169,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
176,18,30,37,113,40,0,0,0,0,0,37,113,40,0,0,0,0,0,190,185,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
177,00,00,36,20,68,26,0,0,0,0,36,20,68,26,0,0,0,0,150,35,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
177,07,00,40,25,71,34,0,0,0,0,40,25,71,34,0,0,0,0,170,33,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
177,09,00,43,27,70,40,0,0,0,0,43,27,70,40,0,0,0,0,180,41,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
177,18,30,45,32,77,36,0,0,0,0,45,32,77,36,0,0,0,0,190,49,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
178,00,00,38,39,40,23,0,0,0,0,38,39,40,23,0,0,0,0,140,50,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
178,07,00,38,39,42,41,0,0,0,0,38,39,62,21,0,0,0,0,160,90,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
178,09,00,38,39,43,50,0,0,0,0,38,39,71,22,0,0,0,0,170,80,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
178,18,30,38,39,44,59,0,0,0,0,38,39,80,23,0,0,0,0,180,75,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
177,00,00,36,20,68,26,0,0,0,0,36,20,68,26,0,0,0,0,150,35,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
177,07,00,40,25,71,34,0,0,0,0,40,25,71,34,0,0,0,0,170,33,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
177,09,00,43,27,70,40,0,0,0,0,43,27,70,40,0,0,0,0,180,41,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
177,18,30,45,32,77,36,0,0,0,0,45,32,77,36,0,0,0,0,190,49,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
178,00,00,38,39,40,23,0,0,0,0,38,39,40,23,0,0,0,0,140,50,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
178,07,00,38,39,42,41,0,0,0,0,38,39,62,21,0,0,0,0,160,90,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
178,09,00,38,39,43,50,0,0,0,0,38,39,71,22,0,0,0,0,170,80,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
178,18,30,38,39,44,59,0,0,0,0,38,39,80,23,0,0,0,0,180,75,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
201,00,00,24,24,17,58,17,0,0,0,24,24,17,58,17,0,0,0,140,133,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
201,07,00,30,36,18,58,18,0,0,0,30,36,18,58,18,0,0,0,160,132,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
201,09,00,33,36,25,58,18,0,0,0,33,36,25,58,18,0,0,0,170,134,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
201,18,30,36,50,18,58,18,0,0,0,36,50,18,58,18,0,0,0,180,137,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
202,00,00,39,101,0,0,0,0,0,0,39,101,0,0,0,0,0,0,140,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
202,07,00,46,114,0,0,0,0,0,0,46,114,0,0,0,0,0,0,160,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
202,09,00,46,114,0,0,0,0,0,0,46,114,0,0,0,0,0,0,160,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
202,18,30,48,122,0,0,0,0,0,0,48,122,0,0,0,0,0,0,170,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
202,00,00,39,101,0,0,0,0,0,0,39,101,0,0,0,0,0,0,140,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
202,07,00,46,114,0,0,0,0,0,0,46,114,0,0,0,0,0,0,160,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
202,09,00,46,114,0,0,0,0,0,0,46,114,0,0,0,0,0,0,160,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
202,18,30,48,122,0,0,0,0,0,0,48,122,0,0,0,0,0,0,170,103,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
206,00,00,33,35,26,26,0,0,0,0,33,35,26,26,0,0,0,0,120,10,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
206,07,00,44,44,26,26,0,0,0,0,44,44,26,26,0,0,0,0,140,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
206,09,00,45,53,26,26,0,0,0,0,45,53,26,26,0,0,0,0,150,17,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

+ 2
- 2
Data/tables/raw_tables/0409_make_sample_table.ipynb View File

@ -3397,8 +3397,8 @@
"outputs": [],
"source": [
"uturn = pd.read_csv('U_TURN.csv')\n",
"uturn = uturn.rename(columns={'inode_id':'parent_id', 'unode_id':'child_id', 'adj_from_edge_id':'head_edge_id'})\n",
"uturn = uturn[['parent_id', 'child_id', 'head_edge_id', 'from_edge_id', 'to_edge_id']]\n",
"uturn = uturn.rename(columns={'inode_id':'parent_id', 'unode_id':'child_id'})\n",
"uturn = uturn[['parent_id', 'child_id', 'adj_from_edge_id', 'adj_to_edge_id', 'from_edge_id', 'to_edge_id']]\n",
"uturn.to_csv('../uturn.csv', index=0)"
]
},

+ 0
- 4
Data/tables/turn_type.csv View File

@ -14,10 +14,6 @@ i1,-571542810_01,571543469_01,left
i1,571543469_02,-571542797_02.99,left
i2,-571542809_01,571542811_01,straight
i2,571542811_02,571542809_01,straight
i2,571542811_02,571542107_01,left
i2,-571542809_01,571542809_01,left
i2,-571542809_01,571542811_01,left
i2,571542107_02,571542809_01,left
i3,571540304_02,571556450_01,straight
i3,571556450_02,571540304_01,straight
i3,571556450_02,571500475_01,left

+ 7
- 7
Data/tables/uturn.csv View File

@ -1,7 +1,7 @@
parent_id,child_id,head_edge_id,from_edge_id,to_edge_id
i0,u00,-571500487_01,571500487_02,571500487_01.32
i2,u20,571542811_02,571542810_01.51,571542810_02
i3,u30,571556450_02,571556452_01,571556452_02
i3,u31,-571500475_01,571500475_02,571500475_01.26
i3,u32,571540303_02.21,571540303_02,-571540303_02
i6,u60,571500535_02.18,571500535_02,-571500535_02
parent_id,child_id,adj_from_edge_id,adj_to_edge_id,from_edge_id,to_edge_id
i0,u00,-571500487_01,571500487_01,571500487_02,571500487_01.32
i2,u20,571542811_02,571542811_01,571542810_01.51,571542810_02
i3,u30,571556450_02,571556450_01,571556452_01,571556452_02
i3,u31,-571500475_01,571500475_01,571500475_02,571500475_01.26
i3,u32,571540303_02.21,571540303_01,571540303_02,-571540303_02
i6,u60,571500535_02.18,571500535_01,571500535_02,-571500535_02

BIN
Scripts/__pycache__/preprocess_daily.cpython-38.pyc View File


+ 1
- 2
Scripts/preprocess_daily.py View File

@ -52,7 +52,7 @@ class DailyPreprocessor():
for j in range(1,9):
# loading_dtype[f'angle_{alph}{j}'] = 'str'
loading_dtype[f'dura_{alph}{j}'] = 'int'
# 테이블 불러오기
self.inter_info = pd.read_csv(os.path.join(self.path_tables, 'inter_info.csv'), dtype=loading_dtype)
# self.angle = pd.read_csv(os.path.join(self.path_tables, 'angle.csv'), dtype=loading_dtype)
@ -405,7 +405,6 @@ class DailyPreprocessor():
# dictionary that maps node_id to io2turn
n2io2turn = dict()
node_id = 'i0'
for node_id in self.parent_ids:
turn = self.turn_type[self.turn_type.node_id==node_id]
io = list(zip(turn.inc_edge_id, turn.out_edge_id))

Loading…
Cancel
Save