matsim-code-examples
matsim-code-examples copied to clipboard
add new activity type rather than home and work
Hello. If I want to add activity type rather than home and work, how should I edit configuration, for example I want to consider home-work-shopping-home plan to some of the population and others would have basic home-work-home activity, I have edited the config as below, is it correct? also should I consider other modules in config regarding shopping activity?
This looks good on first sight. I don't think other parameters are necessary.
@Janekdererste Thank you for your response. Can I also simplify it and just write the typicalDuration? also should all activities be summed and equal to 24 hours?(I would not consider nightly traffic so my daily activities are in 24 hours) or I can have multiple activities with different durations?(in fact different agents can have different activity types and not all of them have shopping in their plan)
Can I also simplify it and just write the typicalDuration
Yes. The opening and closing times are not required at all. You can add them though in case you think your model requires this information or that this information improves your model.
also should all activities be summed and equal to 24 hours
No, this is not necessary. After all, your agents will spend some time in traffic as well.
can have multiple activities with different durations?
This is also possible yes. In our models we usually have activity types such as home_3600
, home_4500
, home_5400
with typical durations of 3600, 4500 and 5400 seconds and so on. Depending on how long an agent is expected to do an activity we assign a suitable activity type.
@Janekdererste Thank you for your response.
@Janekdererste I also have one more question, if I want to have work activity that starts at 23 p.m. and ends at next day 8 a.m. how should I modify my config file so they are considered in the simulation?
Also I want to consider working duration to 9 hours, while writing the plans file should I consider extra time for traveling from home to work? for example if I have home-work-home activty and I want to depart from home at 8 a.m. and work for 9 hours and then come back home, should I write end time for work equal to 9hours+(a constant predefined time e.g. 30 mins=17:30:00) or just write 17:00:00?
if I want to have work activity that starts at 23 p.m. and ends at next day 8 a.m
Either you have a home activity with undefined start time and 8am end time and another one from 11pm with undefined endtime, or if you want to have a simulation longer than 24 hours, you simply specify a home activity from 39600 seconds to 115200 seconds.
should I consider extra time for traveling from home to work?
No, that is not necessary. Those times are the ones which you run the simulation for. Please revisit user guide
@Janekdererste Ok, thank you for your answer.