Follow up:
Here is a flow definition I am trying to imitate by TraCI insertions:
<flow arrivalLane="current" arrivalPosLat="center" begin="0" departLane="free" departPosLat="center" departSpeed="desired" id="flow_btt" number="6000" route="bottom_to_top" type="veh" vehsPerHour="6000" />
In TraCI:
for veh_id in range(1, 6000 + 1):
agent_id = str(veh_id)
traci.vehicle.add(
agent_id,
"bottom_to_top",
"veh",
depart=0,
departLane="free",
departPos="base",
departSpeed="desired",
arrivalLane="current",
arrivalPos="max",
arrivalSpeed="current",
)
It's the exact same one, with all other configurations being the same. And yet, somehow there are differences in these statistics:
Predefined flow finished at step 7660, departDelay="2025.31", totalTravelTime="58439.00", totalDepartDelay="12151865.00".
TraCI imitation finished at step 8260, departDelay="4124.97", totalTravelTime="58424.00", totalDepartDelay="24749795.00"
Does a predefined flow in a routes file do something additional that the TraCI imitation by vehicle insertion is missing - I'm guessing it sets the times of insertions for each vehicle differently. Is it possible to equalize these behaviours or is this an impossible task?
Thank you,
Sincerely,
Hriday