-
Notifications
You must be signed in to change notification settings - Fork 181
faq 35815439
by Kai Nagel on 2015-09-24 20:57:40
by Kai Nagel on 2015-09-24 21:14:43
You are correct, changing the plan by itself is not sufficient. The reason is that the architecture here is event-driven (to save computing time), that is, the agent essentially tells the simulation to wake him up at the end of the activity, and then goes to sleep.
For the time being, the solution is to call
qsim.rescheduleActivityEnd( agent ) ;
after a change of the activity end time of the current plan (where qsim
is the instance of the QSim
one is working with). This also needs to be done for agents without plans; every time you expect that agent.getActivityEndTime()
returns a different answer then before, the above method will have to be called (in order to re-schedule the wake-up time).
An example would be good (it would look similar to RunWithinDayReplanningFromPlansExample)
... but I don't have enough time right now to write it.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq