Hi Lara, it is currently not implemented and at the moment all of the subscriptions are time triggered and not event based. The easiest way to get the information without constantly polling is probably to implement an analogue to simulation.getLoadedIDList for rerouting and subscribe to that. But this will give you the ids of all rerouted vehicles in every time step, which may be too much as well.
Best regards, Michael Am 05.07.2018 um 10:46 schrieb Lara CODECA: > Dear all, > > is there a way to subscribe to the route changes events? > > I saw subscribeContext in > http://www.sumo.dlr.de/daily/pydoc/traci._simulation.html#SimulationDomain-subscribeContext > > and > # command: subscribe route context > CMD_SUBSCRIBE_ROUTE_CONTEXT = 0x86 > # response: subscribe route context > RESPONSE_SUBSCRIBE_ROUTE_CONTEXT = 0x96 > # command: get route variable > CMD_GET_ROUTE_VARIABLE = 0xa6 > # response: get route variable > RESPONSE_GET_ROUTE_VARIABLE = 0xb6 > # command: set route variable > CMD_SET_ROUTE_VARIABLE = 0xc6 > # command: subscribe route variable > CMD_SUBSCRIBE_ROUTE_VARIABLE = 0xd6 > # response: subscribe route variable > RESPONSE_SUBSCRIBE_ROUTE_VARIABLE = 0xe6 > > among the constants, but given that the context requires a radius around a > the ego-vehicle, I'm > probably going in the wrong direction. > > I saw that I can subscribe to traci.vehicle.subscribe(vehid, > varIDs=(tc.VAR_ROUTE_INDEX)) but this > imply I have to see if the route index is different, so I'm jamming TraCI for > no reason. > I need to know when the route of some vehicles is changed by sumo (device > router or other). > If there is no way to do it, at the moment, where do I have to look in the > code to know how to add > a subscription of this kind? > > Thanks in advance! > > Regards, > Lara >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
