Skip to content

Commit

Permalink
improve short/long detour factor
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed May 5, 2024
1 parent 093845c commit f37aa69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public class RunOpenBerlinCalibration extends MATSimApplication {
private Integer planIndex;

public RunOpenBerlinCalibration() {
super("input/v6.1/berlin-v6.1.config.xml");
super("input/v6.2/berlin-v6.2.config.xml");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
public class InitLocationChoice implements MATSimAppCommand, PersonAlgorithm {

/**
* Detour factor for car routes, which was determined based on sampled routes.
* Detour factor for routes > 3000m. Factor is based on data, but adjusted to better match distance distribution.
*/
private static final double DETOUR_FACTOR = 1.46;
private static final double DETOUR_FACTOR = 1.25;

/**
* Factor for short trips < 2000m.
* Factor for short trips < 3000m. Factor was calculated based on data.
*/
private static final double DETOUR_FACTOR_SHORT = 1.3;

Expand Down Expand Up @@ -118,7 +118,7 @@ private static Coord rndCoord(SplittableRandom rnd, double dist, Coord origin) {
* @return beeline distance in meters
*/
public static double beelineDist(double travelDist) {
double detourFactor = travelDist <= 2 ? DETOUR_FACTOR_SHORT : DETOUR_FACTOR;
double detourFactor = travelDist <= 3 ? DETOUR_FACTOR_SHORT : DETOUR_FACTOR;
return travelDist * 1000 / detourFactor;
}

Expand Down

0 comments on commit f37aa69

Please sign in to comment.