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

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

Open renanong opened this issue 1 year ago • 2 comments

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:

	<param name="planSelectorForRemoval" value="WorstPlanSelector" />
	<parameterset type="strategysettings">
		<param name="strategyName" value="ChangeExpBeta"/>
		<param name="weight" value="0.8"/>
	</parameterset>
	<parameterset type="strategysettings">
		<param name="strategyName" value="ReRoute"/>
		<param name="disableAfterIteration" value="-1" />
		<param name="weight" value="0.2"/>
	</parameterset>
	<parameterset type="strategysettings">
		<param name="strategyName" value="SubtourModeChoice"/>
		<param name="disableAfterIteration" value="50" />
		<param name="weight" value="0.1"/>
	</parameterset>
	<parameterset type="strategysettings">
		<param name="strategyName" value="TimeAllocationMutator"/>
		<param name="disableAfterIteration" value="-1" />
		<param name="weight" value="0.1"/>
	</parameterset>
	<!-- carsharing part start -->
	<param name="ModuleProbability_2" value="0.05" />
	<param name="Module_2" value="RandomTripToCarsharingStrategy" />
	<param name="ModuleDisableAfterIteration_2" value="50" />
	<param name="ModuleProbability_3" value="0.1" />
	<param name="Module_3" value="CarsharingSubtourModeChoiceStrategy" />
	<param name="ModuleDisableAfterIteration_3" value="50" />
	<!-- carsharing part end -->

renanong avatar May 23 '23 17:05 renanong

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.

mrieser avatar May 25 '23 19:05 mrieser

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

renanong avatar May 26 '23 02:05 renanong