matsim-org / matsim-code-examples

A repository containing code examples around MATSim
GNU General Public License v3.0
83 stars 179 forks source link

crowd in equilibrium and withinday replanning #477

Open MahsaSiegrist opened 3 years ago

MahsaSiegrist commented 3 years ago

Hello all,

I would like to know whether the crowd is considered in the utility of the scoring function in producing the equilibrium solution? Because when I run the within-day replanning for those agents who experience the deniedBoarding event (on the equilibrium plans), averagely agents experience earlier arrival compare to the pure equilibrium itself. So it means that running through the equilibrium and then one-time within-day replanning for agents who experience deniedBoarding events, results in a better daily-plan, which means that the equilibrium could not produce the optimal solution. It would be great if you can help me.

kainagel commented 3 years ago

I would like to know whether the crowd is considered in the utility of the scoring function in producing the equilibrium solution?

I assume "the crowd" means "crowing in buses". Standard MATSim does not include that; you would have to program it yourself. Boarding may be denied, but the scoring will only include that as additional waiting time.

Because when I run the within-day replanning for those agents who experience the deniedBoarding event (on the equilibrium plans), averagely agents experience earlier arrival compare to the pure equilibrium itself.

From this description I am not sure how this is achieved at the technical level. From a theoretical perspective, that result may be ok: A path which is optimal in the average does not have to be the fastest on a specific day. Or in other words: A conditional strategy along the lines "If X is empty, use X, otherwise use Y" may be faster than one that optimizes the expectation value.

So it means that running through the equilibrium and then one-time within-day replanning for agents who experience deniedBoarding events, results in a better daily-plan, which means that the equilibrium could not produce the optimal solution.

See above? Again: If the simulation reaches equilibrium (which would need to be tested), it should select the plan with the best expected score. (Also, the default config of matsim does not use score averaging, and in consequence you get something again different, which is probably not well defined at the theoretical level.)