Skip to content

Commit

Permalink
set ride params via matsim-libs method
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Oct 16, 2024
1 parent d117a41 commit 9367897
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/org/matsim/run/scenarios/LausitzScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.matsim.contrib.vsp.pt.fare.PtFareConfigGroup;
import org.matsim.contrib.vsp.pt.fare.PtFareModule;
import org.matsim.contrib.vsp.scenario.SnzActivities;
import org.matsim.contrib.vsp.scoring.RideScoringParamsFromCarParams;
import org.matsim.core.config.Config;
import org.matsim.core.config.ConfigUtils;
import org.matsim.core.config.groups.ReplanningConfigGroup;
Expand Down Expand Up @@ -135,15 +136,11 @@ public Config prepareConfig(Config config) {
scoringConfigGroup.setPathSizeLogitBeta(0.);

// set ride scoring params dependent from car params
ScoringConfigGroup.ModeParams rideParams = scoringConfigGroup.getOrCreateModeParams(TransportMode.ride);
ScoringConfigGroup.ModeParams carParams = scoringConfigGroup.getModes().get(TransportMode.car);
// 2.0 + 1.0 = alpha + 1
// ride cost = alpha * car cost
// ride marg utility of traveling = (alpha + 1) * marg utility travelling car + alpha * beta perf
double alpha = 2;
rideParams.setMarginalUtilityOfTraveling((alpha + 1) * carParams.getMarginalUtilityOfTraveling() - alpha * config.scoring().getPerforming_utils_hr());
rideParams.setDailyMonetaryConstant(0.);
rideParams.setMonetaryDistanceRate(carParams.getMonetaryDistanceRate() * 2);
RideScoringParamsFromCarParams.setRideScoringParamsBasedOnCarParams(scoringConfigGroup, alpha);

config.qsim().setUsingTravelTimeCheckInTeleportation(true);
config.qsim().setUsePersonIdForMissingVehicleId(false);
Expand Down

0 comments on commit 9367897

Please sign in to comment.