-
Notifications
You must be signed in to change notification settings - Fork 180
faq 108142355
by Celeste Manu on 2017-03-01 00:20:16
I keep getting this error:
WARN CharyparNagelActivityScoring:248 The first and the last activity do not have the same type. Will score the first activity from midnight to its end, and the last activity from its start to midnight. Because of the nonlinear function, this is not the same as scoring from start to end.
2017-02-28 16:15:33,490 WARN CharyparNagelActivityScoring:251 first activity: [type=w][coord=null][linkId=1][startTime=undefined][endTime=06:31:00][facilityId=null]
2017-02-28 16:15:33,490 WARN CharyparNagelActivityScoring:252 last activity: [type=h][coord=null][linkId=24][startTime=06:31:44][endTime=undefined][facilityId=null]] ]><p><br /></p><ol><li>What does it mean</li><li>How do I get rid of it?</li></ol><p>Here's my population file: </p>
Here's the portion of my config file that's relevant:
<module name="planCalcScore" >
<param name="lateArrival" value="-18" />
<param name="earlyDeparture" value="-0" />
<param name="performing" value="+6" />
<param name="traveling" value="-6" />
<param name="waiting" value="-0" />
<!--Actual activity durations are simulation output, not input. However, MATSim needs a
"desired" or "typical" duration for scoring to know if an actually reached duration is "good" or not
For each activity type, we need type and typical duration-->
<param name="activityType_0" value="h" /> <!-- home -->
<param name="activityTypicalDuration_0" value="12:00:00" />
<param name="activityType_1" value="w" /> <!-- work -->
<param name="activityTypicalDuration_1" value="08:00:00" />
<param name="activityOpeningTime_1" value="07:00:00" />
<param name="activityLatestStartTime_1" value="09:00:00" />
<param name="activityClosingTime_1" value="18:00:00" />
<param name="activityType_2" value="e" /> <!-- evacuate -->
<param name="activityTypicalDuration_2" value="00:01:00" />
</module>
Thanks!
by Joschka Bischoff on 2017-03-01 07:12:49
Hi Celeste,
this warning pops up if an agent's last activity of the day is not of the same type as the first one.
I.e., usually, one would assume that the majority of people end their day doing the same thing that they've started their day with (e.g., being at home).
According to your plans, this is not the case. Agents end doing "w", go by car and then doing "h".
So you can ignore this warning.
Should it bother you, let the agents go back to "w" afterwards (or, preferably, let them go from h to w at first, assuming that those mean home and work).
by Kai Nagel on 2017-12-13 03:57:05
MATSim assumes that the last activity of the day is "wrapped around" to the first activity of the day. So e.g. if you get home at 20:00 and leave for work at 7:00, MATSim joins this into a 4 + 7 = 11 hours home activity. The reason is that the activity scoring function is logarithmic, and ln(4) + ln(7) is considerably more than ln(11), and so scoring those two home activities separately would lead to a wrong score (and, what is worse, to a wrong marginal utility of time, leading of a pressure of home4 and home7 to expand).
So when the first and the last activity are not of the same type, MATSim cannot join them in this way. More technically, MATSim needs the typical duration of an activity type for the scoring. So if the first and last activity are not of the same type, it does not know from which of the two to take the typical duration.
The approach has many advantages, including that certain types of time pressure and certain types of re-arrangement of daily schedules (e.g. commute before vs after the peak) emerge naturally. However, it also has disadvantages, in particular when starting from data (e.g. travel surveys) which typically have many instances of different first and last activities.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq