-
Notifications
You must be signed in to change notification settings - Fork 179
faq 88441013
by gunnarfloetteroed on 2016-10-18 10:04:38
Does the merging of first and last home activity also apply to intermediate home activities?
Example: A home-based work-tour followed by a home-based shop-tour, with the resulting activity sequence
home - work - home - shop - home.
I would like to give the agent a total typical home duration of 12 hours, but I do not want the intermediate home activity alone to last 12 hours. My guess would be that I need to declare a home2 activity with a shorter typical duration in the activity plan
home - work - home2 - shop - home.
Or I missing a trick? I would prefer not to give the intermediate home2 activity an arbitrary typical length.
by Thibaut Dubernet on 2016-10-18 10:25:10
It is, indeed, as you suspect: each new activity "restarts" the logarithm.
We used "one logarithm per activity type" at IVT. The corresponding code is in playground.ivt.kticompatibility.KtiActivityScoring in the ivtExt playground.
I cannot guarantee this exact class will fit what you need: there are other special functions built in, and is based on a very old copy of the "default" scoring function in matsim core, and was modified a lot over the years, by various persons, sometimes under time pressure. So it might not be the most elegant way to solve this, and the version in the core and this version might have diverged quite a bit.
But it might help you getting started implementing your own. The basic idea is not very complicated, once you know what to plug in where.
by Kai Nagel on 2016-10-18 14:58:05
This is not a different answer than Thibaut's. But I would say that the approach that you don't want to do (define home2 with a typical duration of one or two hours) would probably work ok as well, in particular to get started. If "work" and "shop" in addition have opening time constraints, then it is fairly constrained anyways.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq