pam
pam copied to clipboard
Reading MATSim plans results in inflated leg and activity numbers
Created input plans with the following stats:
{'num_households': 76530,
'num_people': 76530,
'num_activities': 313395,
'num_legs': 236865}
Reading the output population after iteration 0 with MATSim gives
{'num_households': 76530,
'num_people': 76530,
'num_activities': 571585,
'num_legs': 495055}
The following message shows up when reading both of them:
Negative duration activity found at pid=1000121102110
Cropping plan components
There are a few things here:
- I'm surprised that reading in plans that were created with pam have negative durations.
- What happens with activities with negative duration? Does it warrant doubling the number of activities/legs?
- I think this should be refined. The goal of pam, as I understand it, is to read plans, modify them and run these new plans as a scenario. I think having so many extra activities will result in unintended outcomes, every extra activity is extra demand so you're making a scenario but not the kind that you expect, your population may look very different once you load it in.
First thought is that the additional activities are pt interactions.
The read_matsim
function has a simplify_pt_trips
arg (here). The default is false...
Negative durations are a bummer. If it's not too inconvenient it would be great to get a xml sample of the negative duration plans so we can write some tests.
you're right, the pt trips have a huge impact on the number of activities, I just read it in with simplify_pt_trips
on
{'num_households': 76530,
'num_people': 76530,
'num_activities': 309625,
'num_legs': 233095}
much closer to original
that loss of activities will be pam cropping stuff after 24 hours...
i am thinking to remove this restriction (or make it more optional) in future. Maybe pam can just generalise to activity plans of any duration, then we apply cropping more optionally.