-
Notifications
You must be signed in to change notification settings - Fork 181
faq 126681089
by harisbal on 2017-11-29 20:06:04
Hello,
I'm facing a rather unusual problem and your advice would be really appreciated.
I would like to know whether it is possible to modify the score of plans and re-plan just before the start of a simulation. I can get into detail as why I need to do so but for the moment I'd like to know whether this is possible.
P.S i found something that seems similar here: org.matsim.withinday.replanning.replanners.WithinDayInitialReplanner but I'm not sure if that's correct
Thank you in advance
by Johan W. Joubert on 2017-11-30 05:06:24
Not sure I understand your question completely. The default in MATSim is to replan before the simulation. Indeed, after the first iteration, but that should actually be considered as before the second iteration since there isn't a replanning stage after the final iteration. WithinDay replanning happens during the simulation.
Do you mean you do not want to start the simulation with your initial plans? Then you can probably just iterate through your population, and replan each individual's plan. That could be triggered with an implementation of the StartupListener
.
by Kai Nagel on 2017-12-02 12:11:48
I would say that indeed MATSim always starts with the mobsim. This sometimes leads to confusion, since if you, say, end at iteration X, and then restart at iteration X, you run iteration X twice, but with exactly the same random numbers.
In your case, I would look at PrepareForSim
. There is RunOwnPrepareForSimExample
class in https://github.com/matsim-org/matsim-code-examples .
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq