I you want to retain a vehicle in the simulation you have exactly two options: - you can make it stay where it is (either on the road or besides the road) - you can make it continue (but then you should have some plausible destination)
A vehicle may have multiple stop definitions in its route and you can add/remove stops via TraCI. To prolong the route you may simply set a new destination using traci.vehicle.changeTarget() and the route to that target will be computed automatically if it exists. Obviously, the latter method will not work if your network contains a cul-de-sac without turn-around. Am Mo., 16. Sept. 2019 um 15:26 Uhr schrieb Paolo Bolzoni < [email protected]>: > On Fri, Sep 13, 2019 at 6:12 PM Jakob Erdmann <[email protected]> > wrote: > > Indeed, a vehicle that reaches the end of its route will leave the > simulation. To prevent this, add a stop at the end of the route or add more > edges. > > I am afraid I cannot use the idea of adding a stop because the > objectives are stops, the idea was exactly send the vehicle to the > next objective when the stop was over. > > To use the "add more edges" idea: I need to > . get the id of last edge in the route (let's call it A) > . load the xml net file, > . look up for the edge tag with the id A > . get its "to" attribute (let's call it D) > . loop up for an edge with the "from" attribute to D > . add the edge to the route > > Is that correct? It sounds a bit convoluted. And are we sure I can > always find an extra edge to add? > > Cheers, > Paolo > _______________________________________________ > 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
