Hi,
I’m trying to use multi-entry/multi-exit detectors with TraCI and I’m getting strange results.
I want to use them to count how many vehicles take each turn on a junction. I have defined one E3 detector with the entry one one lane approaching a junction and exit on one lane on the other side of the junction. I’ve also defined a second
E3 detector with entry in the same lane as the first one and exit on another lane:
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">
<e3Detector id="e3Detector_0" pos="2459.46,3350.14" freq="900.00" file="e3Detector_0.xml">
<detEntry lane="32116245#3_0" pos="119.86"/>
<detExit lane="32116250#0_0" pos="2.33"/>
</e3Detector>
<e3Detector id="e3Detector_1" pos="2462.18,3351.07" freq="900.00" file="e3Detector_1.xml">
<detEntry lane="32116245#3_0" pos="118.36"/>
<detExit lane="32116247#0_0" pos="1.81"/>
</e3Detector>
</additional>
However, when I use
getLastStepVehicleIDs on each of the detectors, I get the same result:
libsumo.multientryexit.getLastStepVehicleIDs('e3Detector_0')
('37', '56', '57')
libsumo.multientryexit.getLastStepVehicleIDs('e3Detector_1')
('37', '56', '57')
How can it be the all vehicles have gone through 2 detectors if they have the exit point in different lanes (of different edges)? Am I interpreting wrongly what
getLastStepVehicleIDs “Returns the list of ids of vehicles that have been within the named multi-entry/multi-exit detector in the last simulation step” means?
Thanks,
Didac