-
Notifications
You must be signed in to change notification settings - Fork 180
faq 108073420
by Enoch Lee on 2017-02-24 15:19:27
I am currently constructing a road network for simulation, and tried to use lanes to enforce turn restrictions by not allowing U-turns in any lane. Therefore, I generated a lane definition file which not allow U-turn at all.
However, in the run time, if I include the calculation of 'link to link travel times', it would crash because "the next link of a stucked agent is not known the turning move travel time cannot be calculated!" .() If I tried to switch off 'removeStuckVehicles' then, it also throw error because 'Link to link travel time calculation is not available if using the remove stuck vehicles option!' . () Therefore, I can only switch off 'link to link travel time' calculation, which would first generate a shortest path that is not considering turn restrictions imposed by my lane definition, which sometimes generate a path with U-turn. Then, when the agent try to search a lane for the U-turn, error occurred because the agent cannot find a lane to U-turn. () Then, what I can only did is to switch on the calculation of 'link to link travel time' again, which is the first situation I encountered.
It looks like a loop of error. I have searched through the MATSim book and the question bank of MATSim, but still not able to find the solution. Is there any other way to impose turn restriction, or any possible improvement for the MATSim package?
by Thibaut Dubernet on 2017-02-24 15:36:57
dear Lee,
I am unsure about what you describe with "remove stuck vehicles" and "link to link travel times" (I am not an expert in the signals functionality), and it is difficult to check in the code without proper error stack trace.
However, you have to be aware that destinations in MATSim are always a directed link. Which means that depending on the topology of the network, agents might need to perform U-turns. Consider the following dead-end:
(Rest of the Network)==== (A) ================ (B)
An agent wanting to reach the link (BA) will need to travel on (AB) to (B), and make a U-turn in order to reach its destination. I can also think of more complex topologies where forbidding U-turns effectively disconnects the network (e.g a triangle).
Could it be that this kind of situation is occurring in your network? If not, you might want to post the full error stack traces, so that it is possible to look at the code where the exceptions are thrown.
by Theresa Thunig on 2017-02-24 20:26:25
Dear Lee,
which MATSim version are you using? There was a bug regarding the combination of link2link routing and scenarios, where a simulation end time is defined in the config. It is exactly your problem here: Agents that are still traveling at simulation end time are aborted and the link2link router throws an exception as it cannot deal with aborted agents...
Hence, you have to switch off the removeStuckVehicles option. (You could still use a high stuckTime if you like). Second, you have to resolve the simulation end time issue - I see two possibilities: Use the snapshot (0.9.0-SNAPSHOT) where the bug is resolved. Or, if you prefer staying on your current version, you could also remove the simulation end time (see config module controller); this will increase running time.
Hope that helps
Theresa
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq