-
Notifications
You must be signed in to change notification settings - Fork 179
faq 164790273
by harisbal on 2018-02-01 19:48:22
Hello,
I'm wondering if it's possible during innovation to allow mode shift towards only a specific mode.
Let's say we have 3 modes car, pt and other. Is it somehow possible to allow (through the configuration file) only mode change from car and pt to other and not from car to pt and vice versa?
i.e. allow only: 1) car --> other 2) pt --> other
All my configuration tests so far have been falling short, thank you in advance
by Kai Nagel on 2018-02-01 21:24:52
The ChangeMode strategies always implement switches between the modes in the list. So "car,pt,other" will allow switches car↔︎pt, car↔︎other, pt↔︎other.
Thus, when you enter one mode only, it does not really make sense any more, and the code may be programmed that it fails in that case (not user friendly, but also not really a bug).
I don't think that the behaviour you seem to want -- switches in only one direction -- is configurable with this module. You could write your own PlanStrategy, see the {{RunPluggablePlanStrategyInCodeExample}} in matsim-code examples.
Also, in physics, we would have said that in what you plan, "other" is an absorbing state, and so after running the simulation for an infinite number of time steps, every leg will be in the "other" mode. So at least in physics modelling we normally tried to avoid that.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq