Closed nkuehnel closed 3 years ago
Well. Long-standing problem. Since the connection of facilities to car links was so deeply embedded into the code, I eventually decided that each facility needs to have a postal address. Which needs to be reachable by car.
So, in theory, it should be possible to do the following:
add ONE car link into the simulation
make sure to use "insertAccessEgress..."
???
The fact that PrepareForSim fails with one execution path and not with the other is that the non-multimodal execution path is still there for backwards compatibility, but it was never upgraded to the new data model. Maybe we should completely get rid of it. (And maybe we should get rid of the execution path without access/egress.)
???
I see; thanks for the swift reply. We will go with the single-car link then. I want to point out that maybe it should also fail in the case where there is only one pt mode case (i.e. all links set to mode "pt") to be consistent with the "postal address" idea.
Dear all,
we wanted to run a "pt only" simulation without cars. However, in the person prepare for sim, each activity has to be assigned to a link: https://github.com/matsim-org/matsim-libs/blob/55f9aa4444c3a22bdc5d255768bb39d278406dd0/matsim/src/main/java/org/matsim/core/population/algorithms/PersonPrepareForSim.java#L173-L187
This then runs the XY2Links algorithm, which is basically checking for the nearest link: https://github.com/matsim-org/matsim-libs/blob/81c09a2847b68b828bef59276cc6745a23fb2c0e/matsim/src/main/java/org/matsim/core/population/algorithms/XY2Links.java#L121
Now we get two different behaviors, depending on whether we set all links to a single "pt" mode or differentiated by individual pt modes such as "tram" "rail" etc.
It feels a bit wrong to me that the simulation fails in one case bot nut the other. I would think that MATSim should be able to run without a car network, regardless of whether the network is "multimodal" if all agents can only choose "pt" and no mode choice is enabled? Or should we just stick to have all links set to "pt" without any differentiation by actual pt mode? I appreciate any help/feedback/comment
Best Nico