Hello,
you may do the following:

define a vehicle type that carries a rerouting device in an additional-file
and load this at the start of the simulation

    <vType id="reroutingType">
        <param key="has.rerouting.device" value="true"/>
    </vType>

Then via TraCI add your vehicle like so:

traci.route.add("trip", ["startEdge", "endEdge"])
traci.vehicle.add("newVeh", "trip", typeID="reroutingType")

This will cause the vehicle to compute a new route from startEdge to
endEdge according to the estimated travel times in the network at the time
of departure. For details of this mechanism see:
http://sumo.dlr.de/wiki/Demand/Automatic_Routing

regards,
Jakob

2017-03-29 23:18 GMT+02:00 Shekar V <[email protected]>:

> Hi Jakob
>
> I was trying to figure out how to insert vehicles into the simulation using
> Traci. I understand that I can use vehicle.addFull() or  vehicle.add() to
> do that but at the time of insertion I only have the source and destination
> edge. Is there a way I can generate a route for the vehicle with only this
> information? Something like a DUARouter but in Traci?
>
> I appreciate any help
>
> Thanks
> Shekar
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to