|
@ -1123,14 +1123,8 @@ class DailyPreprocessor(): |
|
|
print('2-4. 직진 및 좌회전(G)을 배정했습니다.') |
|
|
print('2-4. 직진 및 좌회전(G)을 배정했습니다.') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 2-5 모든 현시에서 적색신호인 경우는 상시 s로 정의 |
|
|
|
|
|
|
|
|
# 2-5 모든 현시에서 적색신호인 경우는 상시 g로 정의 |
|
|
def avoid_all_reds(self): |
|
|
def avoid_all_reds(self): |
|
|
''' |
|
|
|
|
|
s에 대한 설명 |
|
|
|
|
|
'green right-turn arrow' requires stopping - vehicles may pass the junction if no vehicle uses a higher priorised foe stream. They always stop before passing. This is only generated for junction type traffic_light_right_on_red. |
|
|
|
|
|
https://sumo.dlr.de/docs/Simulation/Traffic_Lights.html |
|
|
|
|
|
''' |
|
|
|
|
|
|
|
|
|
|
|
# match6에 적용 |
|
|
# match6에 적용 |
|
|
for node_id, group in self.match6.groupby('node_id'): |
|
|
for node_id, group in self.match6.groupby('node_id'): |
|
|
state_length = len(group.iloc[0].state) |
|
|
state_length = len(group.iloc[0].state) |
|
@ -1147,7 +1141,7 @@ class DailyPreprocessor(): |
|
|
for i, row in group.iterrows(): |
|
|
for i, row in group.iterrows(): |
|
|
state = list(row.state) |
|
|
state = list(row.state) |
|
|
for index in all_red_indices: |
|
|
for index in all_red_indices: |
|
|
state[index] = 's' |
|
|
|
|
|
|
|
|
state[index] = 'g' |
|
|
state = ''.join(state) |
|
|
state = ''.join(state) |
|
|
self.match6.at[i, 'state'] = state |
|
|
self.match6.at[i, 'state'] = state |
|
|
|
|
|
|
|
@ -1167,7 +1161,7 @@ class DailyPreprocessor(): |
|
|
for i, row in group.iterrows(): |
|
|
for i, row in group.iterrows(): |
|
|
state = list(row.state) |
|
|
state = list(row.state) |
|
|
for index in all_red_indices: |
|
|
for index in all_red_indices: |
|
|
state[index] = 's' |
|
|
|
|
|
|
|
|
state[index] = 'g' |
|
|
state = ''.join(state) |
|
|
state = ''.join(state) |
|
|
self.matching.at[i, 'state'] = state |
|
|
self.matching.at[i, 'state'] = state |
|
|
print("2-5. 모든 현시에서 적색신호인 경우에 대한 처리 완료") |
|
|
print("2-5. 모든 현시에서 적색신호인 경우에 대한 처리 완료") |
|
|