Hi all,
I noticed that the throughput flow of intersections can be accessed in the
output file of loop detectors. But I am wondering can we use traci to get the
real-time throughput between time [t-interval, t]?
# Loop[j] is the lsit for loop detector j
Loop = [[] for x in range(Num_detectors)]
Count = [[] for x in range(Num_detectors)]
Loop[j].append(traci.inductionloop.getLastStepVehicleIDs(str(j)))
if Loop[j][step] != Loop[j][step-1]:
Count[j].append(1)
else:
Count[j].append(0)
To get how many vehicles passed the intersection, I retrived the ID list on a
loop detector and try to check whether it changed last time. Is it the correct
way?
Thank you,
Hao
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user