Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] When a vehicle can leave the simulation?

On Fri, Sep 13, 2019 at 6:12 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> 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


Back to the top