Skip to content

faq 133365761

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

simulating more than one day - output inconsistency?

by Gerald Richter on 2017-12-14 11:00:24


up until now I have only dealt with days.

I have got some activitites with start and end times spread out over one week.
in a first step I just want to map these pit-stops to a network-conforming traversal pattern (just routing the agents), so actually optimizing the agent-load is not my current concern.
AND: a single iteration does the trick

generating initial plans from my input is not a problem, so that the last plan start time is 167:52:38.

however, when running all that through matsim with a clean execution, I seemingly get output_plans with

  • all NaN plan scores

  • truncation of times to the minimum that will do the trick within the first following day (e.g.: 34:08:17)

  • a significantly decreased population (from ~4300 to exactly 1000)

at the same time, the output_events are logged by seconds up to day 7 of the week.
they also contain all person ids that were in the initial plans file.

my thoughts on this:

I understand that it causes problems doing proper scoring with the crossed day-boundary.

requiring day-boundaries at 00:00:00 (at least formally) might not be so convenient for the user.
- of course one can always transform all network information and load to show the minimum activity at 0:00:00.
BUT: allowing for a wrap-around at an arbitrary time (e.g. 3:00 am) where traffic is minimal might be better. maybe by defining a parameter? internally the same things could happen, with time shifting happening behind the curtains.

restricting the scoring/schedule wrap-around to a modulus of 24:00:00 is also quite restrictive.
- it might be better to be able to define the modulus.
simulate 3 days in a row, or a recurring week? no problem!
even choosing the the largest multiple of 24h which contains the input plans' activities seems more intuitive.

my question:

how do I interpret the different outputs of plans and events?

can I still assume the events to be more or less compliant with my initial plans?

the optimization probably didn't go so well in the output
- how would I best achieve that too?

thanks
Gerald.


Comments: 1


Re: simulating more than one day - output inconsistency?

by Kai Nagel on 2017-12-14 11:53:04

Interesting. The design should be for arbitrary plan and simulation lengths, but it has never been tested.

As a first step, I would just switch the scoring off. There is a parameter "scoringThisActivityAtAll" or similar; set it to "false", and the scoring for that activity should be skipped. Then you should, hopefully, see a simulation that just executes the plans. I am not sure what you mean by "reduced population"; in principle, this should just work as such. What happens is that agents at their last activity are removed from the simulation. So if some agents are finished earlier, they will essentially be gone. (It should be possible to prevent this by setting an explicit very large activity end time for the last activity ... but not sure if this works without hickups.)

As the next step, I would actually recommend to re-program the scoring function yourself. There are examples under https://github.com/matsim-org/matsim-code-examples/tree/master/src/main/java/tutorial/scoring . This is probably easier and research-wise more productive than trying to coax the existing scoring function into plausible multi-day behavior. Once you have then sorted out all difficulties, and wrote a nice paper about it :-), we might merge it into the main code basis.

Clone this wiki locally