matsim-code-examples icon indicating copy to clipboard operation
matsim-code-examples copied to clipboard

add new activity type rather than home and work

Open Areza622 opened this issue 2 years ago • 5 comments

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?

Areza622 avatar Oct 23 '22 05:10 Areza622

screen

Areza622 avatar Oct 23 '22 05:10 Areza622

This looks good on first sight. I don't think other parameters are necessary.

Janekdererste avatar Oct 24 '22 08:10 Janekdererste

@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)

Areza622 avatar Oct 24 '22 09:10 Areza622

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 avatar Oct 24 '22 09:10 Janekdererste

@Janekdererste Thank you for your response.

Areza622 avatar Oct 24 '22 17:10 Areza622

@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?

Areza622 avatar Oct 28 '22 15:10 Areza622

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 avatar Nov 02 '22 11:11 Janekdererste

@Janekdererste Ok, thank you for your answer.

Areza622 avatar Nov 03 '22 15:11 Areza622