Please check the result returned by subscribeContext against the list of
vehicles returned by traci.vehicle.getIDList.
There may also be a mismatch due to 'teleporting' vehicles. They are still
listed as 'active' in the vehicle counter but are not on any lane and thus
not returned by the subscription.
You can track telepoorts by computing a running sum of the values returned
by
traci.simulation.getStartingTeleportNumber and
traci.simulation.getEndingTeleportNumber

regards,
Jakob


Am Di., 18. Juni 2019 um 05:36 Uhr schrieb Chason <[email protected]
>:

> Hello:
>
> I tried to get all vehicles' information in my simulation through
> "traci.vehicle.getContextSubscriptionResults()" command, but things didn't
> go well.
>
> When the traffic number is large, the subscription command always returns
> fewer vehicles than the actual number running in sumo-gui.
>
> My codes like that:
> "
> traci.vehicle.subscribeContext('ego',
> traci.constants.CMD_GET_VEHICLE_VARIABLE, 900000,
> [traci.constants.VAR_POSITION], 0, 2147483647)
>
> ...
>
> sumo_vehicles = traci.vehicle.getContextSubscriptionResults('ego')
> "
>
> I also tried "traci.junction.getContextSubscriptionResults()", but the
> result is same.
>
> Please help me to solve this problem.
>
> Many thanks.
> _______________________________________________
> 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
>
_______________________________________________
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

Reply via email to