From 004ec717e267931c848068d979730f533d0cacac Mon Sep 17 00:00:00 2001 From: govin08 Date: Fri, 12 Apr 2024 10:34:35 +0900 Subject: [PATCH] altered the location of the definition of 'ch2pa', 'dires' while 'dires' is to be deprecated --- Results/sn_1704418200.add.xml | 900 +++++++++------------------------- Scripts/preprocess_daily.py | 15 +- 2 files changed, 231 insertions(+), 684 deletions(-) diff --git a/Results/sn_1704418200.add.xml b/Results/sn_1704418200.add.xml index 000582e14..970ccdb5b 100644 --- a/Results/sn_1704418200.add.xml +++ b/Results/sn_1704418200.add.xml @@ -1,173 +1,188 @@ -<<<<<<< HEAD - -======= ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + -<<<<<<< HEAD - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + + + - - + + + + - - + + + + - - + + + + - - + + + + - - + + + + - - + + + + - - + + + + - - + + + + - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + @@ -212,110 +227,110 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + @@ -372,392 +387,26 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + - - - -======= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -775,63 +424,31 @@ ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 - - - - - - - - - - - - - - - - + - - + + - - + + - - + + - - + + - - + + - - + + - + -<<<<<<< HEAD - - - - - - - - - - - - - -======= ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 @@ -876,11 +493,7 @@ -<<<<<<< HEAD - -======= ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 @@ -925,11 +538,7 @@ -<<<<<<< HEAD - -======= ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 @@ -974,11 +583,7 @@ -<<<<<<< HEAD - -======= ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 @@ -1023,64 +628,6 @@ -<<<<<<< HEAD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -======= @@ -1137,7 +684,6 @@ ->>>>>>> 0f30f57d1293c3d55a053df9dbca957e8d465618 \ No newline at end of file diff --git a/Scripts/preprocess_daily.py b/Scripts/preprocess_daily.py index 120af3f62..aea0a228d 100644 --- a/Scripts/preprocess_daily.py +++ b/Scripts/preprocess_daily.py @@ -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():