Compare commits
2 Commits
e07de15d39
...
31f191cf4d
| Author | SHA1 | Date |
|---|---|---|
|
|
31f191cf4d | |
|
|
0fa7ec8e9e |
|
|
@ -305,7 +305,7 @@ def gen_high_stop_turn_ratio_desc(inroad_delay_infos, inroad_static_info_dict, c
|
|||
main_flow_src_list.append(src_dir + int_turn_type2str[check_res])
|
||||
flow_delay_infos = inroad_info.flow_delay_infos
|
||||
for item in flow_delay_infos:
|
||||
if item.stop_times >= 1:
|
||||
if item.delay_info.stop_times >= 1:
|
||||
turn_type = int_turn_type2str[item.turn_type]
|
||||
if src_dir not in src_dict.keys():
|
||||
src_dict[src_dir] = [turn_type]
|
||||
|
|
@ -317,7 +317,9 @@ def gen_high_stop_turn_ratio_desc(inroad_delay_infos, inroad_static_info_dict, c
|
|||
|
||||
|
||||
def found_max_car_num_flow(inroad_car_num, inroad_info):
|
||||
data_list = [inroad_info.turn_ratio_0, inroad_info.turn_ratio_1, inroad_info.turn_ratio_2, inroad_info.turn_ratio_3]
|
||||
if not inroad_info:
|
||||
return -1
|
||||
data_list = [inroad_info.delay_info.turn_ratio_0, inroad_info.delay_info.turn_ratio_1, inroad_info.delay_info.turn_ratio_2, inroad_info.delay_info.turn_ratio_3]
|
||||
for i in range(len(data_list)):
|
||||
if data_list[i] / inroad_car_num > 0.5:
|
||||
return i
|
||||
|
|
@ -1330,6 +1332,7 @@ def gen_cross_tide_problems(crossid, nodeid, date_list, roads_dir_dict):
|
|||
|
||||
# 配时方案
|
||||
def gen_phase_problems():
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,10 +64,9 @@ class TmnetDbHelper(TableDbHelperBase):
|
|||
if (t2.location is not null, t2.location, t1.location) as location,
|
||||
t1.nodeid,
|
||||
t1.area_id
|
||||
from `cross` as t1
|
||||
left join cross_ledger_update_info as t2 on t1.crossid=t2.crossid
|
||||
where t1.at_edge=0 and t1.nodeid = %s and t1.area_id = %s
|
||||
""" % (nodeid, area_id)
|
||||
from (select name,crossid, location,nodeid, area_id from `cross` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t1
|
||||
left join (select name,crossid, location,nodeid, area_id from `cross_ledger_update_info` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t2 on t1.crossid=t2.crossid
|
||||
""" % (nodeid, area_id, nodeid, area_id)
|
||||
return self.do_select(sql)
|
||||
|
||||
def query_cross_inroads(self, crossid, nodeid):
|
||||
|
|
|
|||
Loading…
Reference in New Issue