Thanks Jakob.
I have tried implementing this and it works well except for a few issues.
Imagine that the current route (walking stage only) is [A, C, .. Z] and I would like to reroute from A to B (where B
is not on current route). If the person is a certain distance along edge A and then it suddenly gets rerouted to B, it will assume that the start position of the new stage that’s been added ([A, B]) is the end position of the previous stage which the person
hadn’t actually reached before being rerouted. This results in the person “teleporting/jumping” to a new position as soon as the new stage is added.
There doesn’t seem to be a way to specify the start position when adding the new stage so I will attempt to use the
“traci.person.MoveToXY” function which you mentioned worked if you are moving the person to a different location along the same edge.
Many thanks,
Xavier
From: sumo-user-bounces@xxxxxxxxxxx [mailto:sumo-user-bounces@xxxxxxxxxxx]
On Behalf Of Jakob Erdmann
Sent: Friday, December 22, 2017 11:08 AM
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Subject: Re: [sumo-user] Traci: rerouting pedestrians
assuming the person is currently walking on edge A and there are no further stages after this, do the following:
- append a new walking stage with edges A,B
- removeStage(0) (this will put the person into the new walking stage)
- rerouteTravelTime
regards,
Jakob
2017-12-22 0:32 GMT+01:00 Xavier Paul Lister Lavenir <xlavenir@xxxxxxx>:
Hi,
I have another question regarding modelling Persons and TraCI.
I am attempting to reroute pedestrians/persons in a network using TraCI. Consider the person currently being on edge “A” and I want to re-route it to edge “B” – is there a way to
reroute the person from A to B without knowing the edges the person must traverse to get from A to B?
Currently, when I add a new walking stage (“traci.person.appendWalkingStage”), I simply add [B] as the edges parameter but this doesn’t reroute the person but rather teleports it
to the start of edge B. I tried to use “traci.person.reroteTraveltime” since this says that it reroutes the pedestrian, however I get an error saying that the pedestrian is not in a “walking stage” – and rerouting after 1 time step is too late since it immediately
moves it to edge B.
Many thanks,
Xavier
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user