MATSIM
TransitRouterConfigGroup.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * *
4  * *********************************************************************** *
5  * *
6  * copyright : (C) 2011 by the members listed in the COPYING, *
7  * LICENSE and WARRANTY file. *
8  * email : info at matsim dot org *
9  * *
10  * *********************************************************************** *
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * See also COPYING, LICENSE and WARRANTY file *
17  * *
18  * *********************************************************************** */
19 
20 package org.matsim.pt.config;
21 
22 import java.util.Map;
23 
25 
27 
28  public static final String GROUP_NAME = "transitRouter";
29 
30  /*package*/ static final String SEARCH_RADIUS = "searchRadius";
31  /*package*/ static final String EXTENSION_RADIUS = "extensionRadius";
32  /*package*/ static final String MAX_BEELINE_WALK_CONNECTION_DISTANCE = "maxBeelineWalkConnectionDistance";
33  /*package*/ static final String ADDITIONAL_TRANSFER_TIME = "additionalTransferTime";
34 
35  private double searchRadius = 1000.0;
36  private double extensionRadius = 200.0;
37  private double maxBeelineWalkConnectionDistance = 100.0;
38  private double additionalTransferTime = 0.0;
39 
40  private double directWalkFactor = 1. ;
41 
42  private boolean cacheTree = false;
43 
45  super(GROUP_NAME);
46  }
47 
48  private static final String DIRECT_WALK_FACTOR="directWalkFactor" ;
49  static final String DIRECT_WALK_FACTOR_CMT = "Factor with which direct walk generalized cost is multiplied before it is compared "
50  + "to the pt generalized cost. Set to a very high value to reduce direct walk results." ;
51  @Override
52  public Map<String, String> getComments() {
53  Map<String, String> comments = super.getComments();
54  comments.put(SEARCH_RADIUS, "the radius in which stop locations are searched, given a start or target coordinate");
55  comments.put(EXTENSION_RADIUS, "step size to increase searchRadius if no stops are found");
56  comments.put(MAX_BEELINE_WALK_CONNECTION_DISTANCE, "maximum beeline distance between stops that agents could transfer to by walking");
57  comments.put(ADDITIONAL_TRANSFER_TIME, "additional time the router allocates when a line switch happens. Can be interpreted as a 'safety' time that agents need to safely transfer from one line to another");
58  comments.put(DIRECT_WALK_FACTOR, DIRECT_WALK_FACTOR_CMT);
59  return comments;
60  }
61 
62  @StringSetter( SEARCH_RADIUS )
63  public void setSearchRadius(final double searchRadius) {
64  testForLocked() ;
65  this.searchRadius = searchRadius;
66  }
67 
68  @StringGetter( SEARCH_RADIUS )
69  public double getSearchRadius() {
70  return this.searchRadius;
71  }
72 
73  @StringSetter( EXTENSION_RADIUS )
74  public void setExtensionRadius(final double extensionRadius) {
75  testForLocked() ;
77  }
78 
79  @StringGetter( EXTENSION_RADIUS )
80  public double getExtensionRadius() {
81  return this.extensionRadius;
82  }
83 
84  @StringSetter( MAX_BEELINE_WALK_CONNECTION_DISTANCE )
86  testForLocked() ;
88  }
89 
90  @StringGetter( MAX_BEELINE_WALK_CONNECTION_DISTANCE )
93  }
94 
95  @StringSetter( ADDITIONAL_TRANSFER_TIME )
97  testForLocked() ;
99  }
100 
101  @StringGetter( ADDITIONAL_TRANSFER_TIME )
102  public double getAdditionalTransferTime() {
103  return this.additionalTransferTime;
104  }
105 
110  public double getDirectWalkFactor() {
111  return this.directWalkFactor ;
112  }
117  public final void setDirectWalkFactor(double directWalkFactor) {
119  }
120 
121  public boolean isCacheTree() {
122  return cacheTree;
123  }
124 
125  public void setCacheTree(boolean cacheTree) {
126  this.cacheTree = cacheTree;
127  }
128 }
void setExtensionRadius(final double extensionRadius)
final void setDirectWalkFactor(double directWalkFactor)
void setMaxBeelineWalkConnectionDistance(final double maxBeelineWalkConnectionDistance)
void setAdditionalTransferTime(final double additionalTransferTime)