matsim-org / matsim-code-examples

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

Stuck and abort carsharing agents appear to have their scores severely affected after innovation ends #947

Open renanong opened 1 year ago

renanong commented 1 year ago

Dear everyone, I tested a carsharing scenario using Sioux Falls. I created 40 stations, and in each station there are 120 oneway-vehicles, 80 twoway-vehicles, and 80 parking spots (fleet size is 8000 vehicles). I randomly assigned carsharing membership to 16822 agents (20% of total population). For agents with membership, I modified their attribute carAvailability from always to never. Further, if those agents have car as leg mode in their plan, I modified it from car to walk.

I noticed in the scores figure that the plan's average and average worst score appear to be diverged from the average best or executed scores after the strategy innovation is disabled. I analyzed the event output file and used the stuck agent analysis in VIA for further understanding. I found out that 82% of all stuck agents (197 agents) are the agents with carsharing membership.

run56 scorestats

Here comes my questions regarding the divergence (the decline) in plan's average and average worst:

  1. Agents who could not find carsharing (no car is available for rent), end up becoming stuck and abort. As a result, their score appears to be hampered severely. What is the logic behind it? shouldn't they switch back to walk mode?
  2. Following the first question, I found that those agents selected the plan with the worst score (max 5 plans). How is the score for stuck and abort determined or calculated?

Any lead or help is immensely appreciated. Thanks

For your reference, please have a look at the strategy setting below:

mrieser commented 1 year ago

I have no experience with the carsharing contrib, so I cannot comment on the first question.

How is the score for stuck and abort determined or calculated?

see ScoringParameters.java, L161-164

abortedPlanScore = Math.min(
        Math.min(marginalUtilityOfLateArrival_s, marginalUtilityOfEarlyDeparture_s),
        Math.min(worstMarginalUtilityOfTraveling_s-marginalUtilityOfPerforming_s, marginalUtilityOfWaiting_s-marginalUtilityOfPerforming_s)
    ) * 3600.0 * 24.0;

So it is essentially a very bad (a very negative) score value that gets added to the already accumulated score of the stuck agents.

renanong commented 1 year ago

Hi @mrieser, Thank you for the reply. I will go through the ScoringParameters to further my understanding.