Browse Source

altered the location of the definition of 'ch2pa', 'dires' while 'dires' is to be deprecated

master
김선중 1 year ago
parent
commit
004ec717e2
2 changed files with 231 additions and 684 deletions
  1. +223
    -677
      Results/sn_1704418200.add.xml
  2. +8
    -7
      Scripts/preprocess_daily.py

+ 223
- 677
Results/sn_1704418200.add.xml
File diff suppressed because it is too large
View File


+ 8
- 7
Scripts/preprocess_daily.py View File

@ -202,6 +202,14 @@ class DailyPreprocessor():
self.inter2node = dict(zip(inter['inter_no'], inter['node_id']))
# ch2pa : child to parent
self.ch2pa = {}
for child_id in self.child_ids:
parent_no = self.inter_node[self.inter_node.node_id==child_id].inter_no.iloc[0]
sub_inter_node = self.inter_node[self.inter_node.inter_no==parent_no]
self.ch2pa[child_id] = sub_inter_node[sub_inter_node.inter_type=='parent'].iloc[0].node_id
self.dires = ['', '북동', '', '남동', '', '남서', '', '북서'] # 정북기준 시계방향으로 8방향
# ids
ids = {'node_ids' : self.node_ids,
'parent_ids': self.parent_ids,
@ -400,13 +408,6 @@ class DailyPreprocessor():
: inter_no, phase_no, ring_type, move_no, inc_dire, out_dire, inc_angle, out_angle, inc_edge_id, out_edge_id, node_id
'''
ch2pa = {} # child to parent
for child_id in self.child_ids:
parent_no = self.inter_node[self.inter_node.node_id==child_id].inter_no.iloc[0]
sub_inter_node = self.inter_node[self.inter_node.inter_no==parent_no]
ch2pa[child_id] = sub_inter_node[sub_inter_node.inter_type=='parent'].iloc[0].node_id
self.dires = ['', '북동', '', '남동', '', '남서', '', '북서'] # 정북기준 시계방향으로 8방향
# 각 uturn node에 대하여 (inc_edge_id, out_edge_id) 부여
cmatches = []
for _, row in self.uturn.iterrows():

Loading…
Cancel
Save