MATSIM
SwissRailRaptorConfigGroup.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.* *
3  *
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2023 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 package ch.sbb.matsim.config;
21 
22 import com.google.common.base.Verify;
23 
25 
26 import java.util.ArrayList;
27 import java.util.Collection;
28 import java.util.HashMap;
29 import java.util.HashSet;
30 import java.util.List;
31 import java.util.Map;
32 import java.util.Set;
33 import org.apache.logging.log4j.LogManager;
34 import org.apache.logging.log4j.Logger;
35 import org.matsim.core.config.Config;
40 
45 
46  public static final String GROUP = "swissRailRaptor";
47 
48  private static final String PARAM_USE_RANGE_QUERY = "useRangeQuery";
49  private static final String PARAM_USE_INTERMODAL_ACCESS_EGRESS = "useIntermodalAccessEgress";
50  private static final String PARAM_INTERMODAL_ACCESS_EGRESS_MODE_SELECTION = "intermodalAccessEgressModeSelection";
51  private static final String PARAM_INTERMODAL_ACCESS_EGRESS_MODE_SELECTION_DESC = "Sets whether intermodal access and egress modes are selected by " +
52  "least cost (default) or randomly chosen out of the available access / egress modes.";
53  private static final String PARAM_USE_MODE_MAPPING = "useModeMappingForPassengers";
54  private static final String PARAM_SCORING_PARAMETERS = "scoringParameters";
55  private static final String PARAM_TRANSFER_PENALTY_BASE = "transferPenaltyBaseCost";
56  private static final String PARAM_TRANSFER_PENALTY_MIN = "transferPenaltyMinCost";
57  private static final String PARAM_TRANSFER_PENALTY_MAX = "transferPenaltyMaxCost";
58  private static final String PARAM_TRANSFER_PENALTY_PERHOUR = "transferPenaltyCostPerTravelTimeHour";
59 
60  private static final String PARAM_USE_CAPACITY_CONSTRAINTS = "useCapacityConstraints";
61  private static final String PARAM_USE_CAPACITY_CONSTRAINTS_DESC = "If true, SwissRailRaptor tries to detect when agents cannot board a vehicle in the previous iteration because it is already full and tries to find an alternative route instead.";
62 
63  private static final String PARAM_TRANSFER_WALK_MARGIN = "transferWalkMargin";
64  private static final String PARAM_TRANSFER_WALK_MARGIN_DESC = "time deducted from transfer walk leg during transfers between pt legs in order to avoid missing a vehicle by a few seconds due to delays.";
65  private static final String PARAM_INTERMODAL_LEG_ONLYHANDLING = "intermodalLegOnlyHandling";
66  private static final String PARAM_INTERMODAL_LEG_ONLYHANDLING_DESC = "Define how routes containing only intermodal legs are handled: Useful options: alllow, avoid, forbid";
67  private static final String PARAM_TRANSFER_CALCULATION = "transferCalculation";
68  private static final String PARAM_TRANFER_CALCULATION_DESC = "Defines whether all potential transfers are precomputed at the beginning of the simulation (Initial) or whether they are constructed on-demand when needed (Adaptive). The former incurs potentially long up-front caclulations, but quicker routing. The latter avoids any initial computation, but may require longer routing time.";
69 
70  private boolean useRangeQuery = false;
71  private boolean useIntermodality = false;
73  private boolean useModeMapping = false;
74  private boolean useCapacityConstraints = false;
75 
76  private double transferPenaltyBaseCost = 0;
77  private double transferPenaltyMinCost = Double.NEGATIVE_INFINITY;
78  private double transferPenaltyMaxCost = Double.POSITIVE_INFINITY;
79  private double transferPenaltyHourlyCost = 0;
80  private double transferWalkMargin = 5;
83 
85 
86  private final Map<String, RangeQuerySettingsParameterSet> rangeQuerySettingsPerSubpop = new HashMap<>();
87  private final Map<String, RouteSelectorParameterSet> routeSelectorPerSubpop = new HashMap<>();
88  private final List<IntermodalAccessEgressParameterSet> intermodalAccessEgressSettings = new ArrayList<>();
89  private final List<ModeToModeTransferPenalty> modeToModeTransferPenaltyParameterSets = new ArrayList<>();
90  private final Map<String, ModeMappingForPassengersParameterSet> modeMappingForPassengersByRouteMode = new HashMap<>();
91 
92 
94  CalcLeastCostModePerStop, RandomSelectOneModePerRoutingRequestAndDirection
95  }
96 
113  @Deprecated
114  returnNull
115  }
116 
117  public enum ScoringParameters {
118  Default, Individual
119  }
120 
122  super(GROUP);
123  }
124 
125  @StringSetter(PARAM_INTERMODAL_LEG_ONLYHANDLING)
126  public void setIntermodalLegOnlyHandling(String intermodalLegOnlyHandling) {
127  this.intermodalLegOnlyHandling = IntermodalLegOnlyHandling.valueOf(intermodalLegOnlyHandling);
128  }
130  this.intermodalLegOnlyHandling = intermodalLegOnlyHandling;
131  }
132 
135  return intermodalLegOnlyHandling.toString();
136  }
137 
140  }
141 
145  }
146 
149  return transferCalculation;
150  }
151 
153  public boolean isUseRangeQuery() {
154  return this.useRangeQuery;
155  }
156 
158  public void setUseRangeQuery(boolean useRangeQuery) {
160  }
161 
163  public boolean isUseIntermodalAccessEgress() {
164  return this.useIntermodality;
165  }
166 
170  }
171 
175  }
176 
180  }
181 
183  public double getTransferWalkMargin() {
184  return transferWalkMargin;
185  }
186 
190  }
191 
193  public boolean isUseModeMappingForPassengers() {
194  return this.useModeMapping;
195  }
196 
200  }
201 
203  public boolean isUseCapacityConstraints() {
204  return this.useCapacityConstraints;
205  }
206 
210  }
211 
214  return this.scoringParameters;
215  }
216 
220  }
221 
223  public double getTransferPenaltyBaseCost() {
224  return this.transferPenaltyBaseCost;
225  }
226 
228  public void setTransferPenaltyBaseCost(double baseCost) {
229  this.transferPenaltyBaseCost = baseCost;
230  }
231 
233  public double getTransferPenaltyMinCost() {
234  return this.transferPenaltyMinCost;
235  }
236 
238  public void setTransferPenaltyMinCost(double minCost) {
239  this.transferPenaltyMinCost = minCost;
240  }
241 
243  public double getTransferPenaltyMaxCost() {
244  return this.transferPenaltyMaxCost;
245  }
246 
248  public void setTransferPenaltyMaxCost(double maxCost) {
249  this.transferPenaltyMaxCost = maxCost;
250  }
251 
254  return this.transferPenaltyHourlyCost;
255  }
256 
258  public void setTransferPenaltyCostPerTravelTimeHour(double hourlyCost) {
259  this.transferPenaltyHourlyCost = hourlyCost;
260  }
261 
262 
263  @Override
264  public ConfigGroup createParameterSet(String type) {
265  return switch (type){
271  default -> throw new IllegalArgumentException("Unsupported parameterset-type: " + type);
272 
273  };
274 
275  }
276 
277  @Override
278  public void addParameterSet(ConfigGroup set) {
279  if (set instanceof RangeQuerySettingsParameterSet) {
280  addRangeQuerySettings((RangeQuerySettingsParameterSet) set);
281  } else if (set instanceof RouteSelectorParameterSet) {
282  addRouteSelector((RouteSelectorParameterSet) set);
283  } else if (set instanceof IntermodalAccessEgressParameterSet) {
284  addIntermodalAccessEgress((IntermodalAccessEgressParameterSet) set);
285  } else if (set instanceof ModeMappingForPassengersParameterSet) {
286  addModeMappingForPassengers((ModeMappingForPassengersParameterSet) set);}
287  else if (set instanceof ModeToModeTransferPenalty) {
288  addModeToModeTransferPenalty((ModeToModeTransferPenalty) set);
289  } else {
290  throw new IllegalArgumentException("Unsupported parameterset: " + set.getClass().getName());
291  }
292  }
293 
296  super.addParameterSet(set);
297 
298  }
299 
300  public List<ModeToModeTransferPenalty> getModeToModeTransferPenaltyParameterSets() {
302  }
303 
305  Set<String> subpops = settings.getSubpopulations();
306  if (subpops.isEmpty()) {
307  this.rangeQuerySettingsPerSubpop.put(null, settings);
308  } else {
309  for (String subpop : subpops) {
310  this.rangeQuerySettingsPerSubpop.put(subpop, settings);
311  }
312  }
313  super.addParameterSet(settings);
314  }
315 
317  return this.rangeQuerySettingsPerSubpop.get(subpopulation);
318  }
319 
321  RangeQuerySettingsParameterSet paramSet = this.rangeQuerySettingsPerSubpop.remove(subpopulation);
322  super.removeParameterSet(paramSet);
323  return paramSet;
324  }
325 
327  Set<String> subpops = settings.getSubpopulations();
328  if (subpops.isEmpty()) {
329  this.routeSelectorPerSubpop.put(null, settings);
330  } else {
331  for (String subpop : subpops) {
332  this.routeSelectorPerSubpop.put(subpop, settings);
333  }
334  }
335  super.addParameterSet(settings);
336  }
337 
338  public RouteSelectorParameterSet getRouteSelector(String subpopulation) {
339  return this.routeSelectorPerSubpop.get(subpopulation);
340  }
341 
342  public RouteSelectorParameterSet removeRouteSelector(String subpopulation) {
343  RouteSelectorParameterSet paramSet = this.routeSelectorPerSubpop.remove(subpopulation);
344  super.removeParameterSet(paramSet);
345  return paramSet;
346  }
347 
349  this.intermodalAccessEgressSettings.add(paramSet);
350  super.addParameterSet(paramSet);
351  }
352 
353  public List<IntermodalAccessEgressParameterSet> getIntermodalAccessEgressParameterSets() {
354  return this.intermodalAccessEgressSettings;
355  }
356 
358  this.modeMappingForPassengersByRouteMode.put(paramSet.getRouteMode(), paramSet);
359  super.addParameterSet(paramSet);
360  }
361 
363  return this.modeMappingForPassengersByRouteMode.get(routeMode);
364  }
365 
366  public Collection<ModeMappingForPassengersParameterSet> getModeMappingForPassengers() {
367  return this.modeMappingForPassengersByRouteMode.values();
368  }
369 
370 
372 
373  private static final String TYPE = "rangeQuerySettings";
374 
375  private static final String PARAM_SUBPOPS = "subpopulations";
376  private static final String PARAM_MAX_EARLIER_DEPARTURE = "maxEarlierDeparture_sec";
377  private static final String PARAM_MAX_LATER_DEPARTURE = "maxLaterDeparture_sec";
378 
379  private final Set<String> subpopulations = new HashSet<>();
380  private int maxEarlierDeparture = 600;
381  private int maxLaterDeparture = 900;
382 
384  super(TYPE);
385  }
386 
387  @StringGetter(PARAM_SUBPOPS)
388  public String getSubpopulationsAsString() {
389  return CollectionUtils.setToString(this.subpopulations);
390  }
391 
392  public Set<String> getSubpopulations() {
393  return this.subpopulations;
394  }
395 
397  public void setSubpopulations(String subpopulation) {
398  this.setSubpopulations(CollectionUtils.stringToSet(subpopulation));
399  }
400 
401  public void setSubpopulations(Set<String> subpopulations) {
402  this.subpopulations.clear();
403  this.subpopulations.addAll(subpopulations);
404  }
405 
407  public int getMaxEarlierDeparture() {
408  return maxEarlierDeparture;
409  }
410 
414  }
415 
417  public int getMaxLaterDeparture() {
418  return maxLaterDeparture;
419  }
420 
424  }
425  }
426 
427  public static class RouteSelectorParameterSet extends ReflectiveConfigGroup {
428 
429  private static final String TYPE = "routeSelector";
430 
431  private static final String PARAM_SUBPOPS = "subpopulations";
432  private static final String PARAM_BETA_TRAVELTIME = "betaTravelTime";
433  private static final String PARAM_BETA_DEPARTURETIME = "betaDepartureTime";
434  private static final String PARAM_BETA_TRANSFERS = "betaTransferCount";
435 
436  private final Set<String> subpopulations = new HashSet<>();
437  private double betaTravelTime = 1;
438  private double betaDepartureTime = 1;
439  private double betaTransfers = 300;
440 
442  super(TYPE);
443  }
444 
445  @StringGetter(PARAM_SUBPOPS)
446  public String getSubpopulationsAsString() {
447  return CollectionUtils.setToString(this.subpopulations);
448  }
449 
450  public Set<String> getSubpopulations() {
451  return this.subpopulations;
452  }
453 
455  public void setSubpopulations(String subpopulation) {
456  this.setSubpopulations(CollectionUtils.stringToSet(subpopulation));
457  }
458 
459  public void setSubpopulations(Set<String> subpopulations) {
460  this.subpopulations.clear();
461  this.subpopulations.addAll(subpopulations);
462  }
463 
464  @StringGetter(PARAM_BETA_TRAVELTIME)
465  public double getBetaTravelTime() {
466  return this.betaTravelTime;
467  }
468 
469  @StringSetter(PARAM_BETA_TRAVELTIME)
470  public void setBetaTravelTime(double betaTravelTime) {
471  this.betaTravelTime = betaTravelTime;
472  }
473 
474  @StringGetter(PARAM_BETA_DEPARTURETIME)
475  public double getBetaDepartureTime() {
476  return betaDepartureTime;
477  }
478 
479  @StringSetter(PARAM_BETA_DEPARTURETIME)
480  public void setBetaDepartureTime(double betaDepartureTime) {
481  this.betaDepartureTime = betaDepartureTime;
482  }
483 
484  @StringGetter(PARAM_BETA_TRANSFERS)
485  public double getBetaTransfers() {
486  return betaTransfers;
487  }
488 
489  @StringSetter(PARAM_BETA_TRANSFERS)
490  public void setBetaTransfers(double betaTransfers) {
491  this.betaTransfers = betaTransfers;
492  }
493  }
494 
496 
497  private static final String TYPE = "intermodalAccessEgress";
498 
499  private static final String PARAM_MODE = "mode";
500  private static final String PARAM_MAX_RADIUS = "maxRadius";
501  private static final String PARAM_INITIAL_SEARCH_RADIUS = "initialSearchRadius";
502  private static final String PARAM_SEARCH_EXTENSION_RADIUS = "searchExtensionRadius";
503  private static final String PARAM_LINKID_ATTRIBUTE = "linkIdAttribute";
504  private static final String PARAM_PERSON_FILTER_ATTRIBUTE = "personFilterAttribute";
505  private static final String PARAM_PERSON_FILTER_VALUE = "personFilterValue";
506  private static final String PARAM_STOP_FILTER_ATTRIBUTE = "stopFilterAttribute";
507  private static final String PARAM_STOP_FILTER_VALUE = "stopFilterValue";
508  private static final String PARAM_SHARE_TRIP_SEARCH_RADIUS = "shareTripSearchRadius";
509 
510  private String mode;
511  private double maxRadius;
512  private double initialSearchRadius = Double.NEGATIVE_INFINITY;
513  private double searchExtensionRadius = 200;
514  private String linkIdAttribute;
515  private String personFilterAttribute;
516  private String personFilterValue;
517  private String stopFilterAttribute;
518  private String stopFilterValue;
519  private double shareTripSearchRadius = Double.POSITIVE_INFINITY;
520 
522  super(TYPE);
523  }
524 
525  @StringGetter(PARAM_MODE)
526  public String getMode() {
527  return mode;
528  }
529 
530  @StringSetter(PARAM_MODE)
531  public IntermodalAccessEgressParameterSet setMode(String mode) {
532  this.mode = mode;
533  return this ;
534  }
535 
536  @StringGetter(PARAM_MAX_RADIUS)
537  public double getMaxRadius() {
538  return maxRadius;
539  }
540 
541  @StringSetter(PARAM_MAX_RADIUS)
542  public IntermodalAccessEgressParameterSet setMaxRadius(double maxRadius) {
543  this.maxRadius = maxRadius;
544  return this ;
545  }
546 
547  @StringGetter(PARAM_INITIAL_SEARCH_RADIUS)
548  public double getInitialSearchRadius() {
549  return initialSearchRadius;
550  }
551 
552  @StringSetter(PARAM_INITIAL_SEARCH_RADIUS)
553  public IntermodalAccessEgressParameterSet setInitialSearchRadius(double initialSearchRadius) {
554  this.initialSearchRadius = initialSearchRadius;
555  return this ;
556  }
557 
558  @StringGetter(PARAM_SEARCH_EXTENSION_RADIUS)
559  public double getSearchExtensionRadius() {
560  return searchExtensionRadius;
561  }
562 
563  @StringSetter(PARAM_SEARCH_EXTENSION_RADIUS)
564  public IntermodalAccessEgressParameterSet setSearchExtensionRadius(double searchExtensionRadius) {
565  this.searchExtensionRadius = searchExtensionRadius;
566  return this ;
567  }
568 
569  @StringGetter(PARAM_LINKID_ATTRIBUTE)
570  public String getLinkIdAttribute() {
571  return linkIdAttribute;
572  }
573 
574  @StringSetter(PARAM_LINKID_ATTRIBUTE)
575  public IntermodalAccessEgressParameterSet setLinkIdAttribute(String linkIdAttribute) {
576  this.linkIdAttribute = linkIdAttribute;
577  return this ;
578  }
579 
580  @StringGetter(PARAM_PERSON_FILTER_ATTRIBUTE)
581  public String getPersonFilterAttribute() {
582  return this.personFilterAttribute;
583  }
584 
585  @StringSetter(PARAM_PERSON_FILTER_ATTRIBUTE)
586  public IntermodalAccessEgressParameterSet setPersonFilterAttribute(String personFilterAttribute) {
587  this.personFilterAttribute = personFilterAttribute;
588  return this ;
589  }
590 
591  @StringGetter(PARAM_PERSON_FILTER_VALUE)
592  public String getPersonFilterValue() {
593  return this.personFilterValue;
594  }
595 
596  @StringSetter(PARAM_PERSON_FILTER_VALUE)
597  public IntermodalAccessEgressParameterSet setPersonFilterValue(String personFilterValue) {
598  this.personFilterValue = personFilterValue;
599  return this ;
600  }
601 
602  @StringGetter(PARAM_STOP_FILTER_ATTRIBUTE)
603  public String getStopFilterAttribute() {
604  return stopFilterAttribute;
605  }
606 
607  @StringSetter(PARAM_STOP_FILTER_ATTRIBUTE)
608  public IntermodalAccessEgressParameterSet setStopFilterAttribute(String stopFilterAttribute) {
609  this.stopFilterAttribute = stopFilterAttribute;
610  return this ;
611  }
612 
613  @StringGetter(PARAM_STOP_FILTER_VALUE)
614  public String getStopFilterValue() {
615  return stopFilterValue;
616  }
617 
618  @StringSetter(PARAM_STOP_FILTER_VALUE)
619  public IntermodalAccessEgressParameterSet setStopFilterValue(String stopFilterValue) {
620  this.stopFilterValue = stopFilterValue;
621  return this ;
622  }
623 
624  @StringGetter(PARAM_SHARE_TRIP_SEARCH_RADIUS)
625  public double getShareTripSearchRadius() {
626  return shareTripSearchRadius;
627  }
628 
629  @StringSetter(PARAM_SHARE_TRIP_SEARCH_RADIUS)
630  public IntermodalAccessEgressParameterSet setShareTripSearchRadius(double shareTripSearchRadius) {
631  this.shareTripSearchRadius = shareTripSearchRadius;
632  return this ;
633  }
634 
635  @Override
636  public Map<String, String> getComments() {
637  Map<String, String> map = super.getComments();
638  map.put(PARAM_LINKID_ATTRIBUTE, "If the mode is routed on the network, specify which linkId acts as access link to this stop in the transport modes sub-network.");
639  map.put(PARAM_STOP_FILTER_ATTRIBUTE, "Name of the transit stop attribute used to filter stops that should be included in the set of potential stops for access and egress. The attribute should be of type String. 'null' disables the filter and all stops within the specified radius will be used.");
640  map.put(PARAM_STOP_FILTER_VALUE, "Only stops where the filter attribute has the value specified here will be considered as access or egress stops.");
641  map.put(PARAM_PERSON_FILTER_ATTRIBUTE, "Name of the person attribute used to figure out if this access/egress mode is available to the person.");
642  map.put(PARAM_PERSON_FILTER_VALUE, "Only persons where the filter attribute has the value specified here can use this mode for access or egress. The attribute should be of type String.");
643  map.put(PARAM_MAX_RADIUS, "Radius from the origin / destination coord in which transit stops are accessible by this mode.");
644  map.put(PARAM_INITIAL_SEARCH_RADIUS, "Radius from the origin / destination coord in which transit stops are searched. Only if less than 2 transit stops are found the search radius is increased step-wise until the maximum search radius set in param radius is reached.");
645  map.put(PARAM_SEARCH_EXTENSION_RADIUS, "If less than 2 stops were found in initialSearchRadius take the distance of the closest transit stop and add this extension radius to search again.The search radius will not exceed the maximum search radius set in param radius. Default is 200 meters.");
646  map.put(PARAM_SHARE_TRIP_SEARCH_RADIUS, "The share of the trip crowfly distance within which the stops for access and egress will be searched for. This is a harder constraint than initial search radius. Default is positive infinity.");
647 
648  return map;
649  }
650  }
651 
653 
654  private static final String TYPE = "modeMapping";
655 
656  private static final String PARAM_ROUTE_MODE = "routeMode";
657  private static final String PARAM_PASSENGER_MODE = "passengerMode";
658 
659  private String routeMode = null;
660  private String passengerMode = null;
661 
663  super(TYPE);
664  }
665 
666  public ModeMappingForPassengersParameterSet(String routeMode, String passengerMode) {
667  super(TYPE);
668  this.routeMode = routeMode;
669  this.passengerMode = passengerMode;
670  }
671 
672  @StringGetter(PARAM_ROUTE_MODE)
673  public String getRouteMode() {
674  return routeMode;
675  }
676 
677  @StringSetter(PARAM_ROUTE_MODE)
678  public void setRouteMode(String routeMode) {
679  this.routeMode = routeMode;
680  }
681 
682  @StringGetter(PARAM_PASSENGER_MODE)
683  public String getPassengerMode() {
684  return passengerMode;
685  }
686 
687  @StringSetter(PARAM_PASSENGER_MODE)
688  public void setPassengerMode(String passengerMode) {
689  this.passengerMode = passengerMode;
690  }
691  }
692 
694  private static final String TYPE = "modeToModeTransferPenalty";
695  @Parameter
696  @Comment("from Transfer PT Sub-Mode")
697  public String fromMode;
698  @Parameter
699  @Comment("to Transfer PT Sub-Mode")
700  public String toMode;
701  @Parameter
702  @Comment("Transfer Penalty per Transfer between modes")
703  public double transferPenalty = 0.0;
704 
706  super(TYPE);
707  }
708 
709  public ModeToModeTransferPenalty(String fromMode, String toMode, double transferPenalty) {
710  super(TYPE);
711  this.fromMode = fromMode;
712  this.toMode = toMode;
713  this.transferPenalty = transferPenalty;
714  }
715  }
716 
717 
718 
719  @Override
720  public Map<String, String> getComments() {
721  Map<String, String> comments = super.getComments();
727  return comments;
728  }
729 
730  // TODO: add more
731  @Override
732  protected void checkConsistency(Config config) {
733 
734  if (useIntermodality) {
735 
736  Verify.verify(config.plans().getHandlingOfPlansWithoutRoutingMode().equals(HandlingOfPlansWithoutRoutingMode.reject), "Using intermodal access and egress in "
737  + "combination with plans without a routing mode is not supported.");
738  Verify.verify(!intermodalAccessEgressSettings.isEmpty(), "Using intermodal routing, but there are no access/egress "
739  + "modes defined. Add at least one parameterset with an access/egress mode and ensure "
740  + "SwissRailRaptorConfigGroup is loaded correctly.");
741 
743  Verify.verifyNotNull(paramset.mode, "mode of an IntermodalAccessEgressParameterSet "
744  + "is undefined. Please set a value in the config.");
745  Verify.verify(paramset.maxRadius > 0.0, "maxRadius of IntermodalAccessEgressParameterSet "
746  + "for mode " + paramset.mode + " is negative or 0. Please set a positive value in the config.");
747  Verify.verify(paramset.initialSearchRadius > 0.0, "initialSearchRadius of IntermodalAccessEgressParameterSet "
748  + "for mode " + paramset.mode + " is negative or 0. Please set a positive value in the config.");
749  Verify.verify(paramset.searchExtensionRadius > 0.0, "searchExtensionRadius of IntermodalAccessEgressParameterSet "
750  + "for mode " + paramset.mode + " is negative or 0. Please set a positive value in the config.");
751 
752  Verify.verify(paramset.maxRadius >= paramset.initialSearchRadius, "maxRadius of IntermodalAccessEgressParameterSet "
753  + "for mode " + paramset.mode + " is smaller than initialSearchRadius. This is inconsistent.");
754 
755  }
756  }
757  }
758 }
void setIntermodalLegOnlyHandling(IntermodalLegOnlyHandling intermodalLegOnlyHandling)
List< IntermodalAccessEgressParameterSet > getIntermodalAccessEgressParameterSets()
void addRouteSelector(RouteSelectorParameterSet settings)
static Set< String > stringToSet(final String values)
void addModeMappingForPassengers(ModeMappingForPassengersParameterSet paramSet)
final List< ModeToModeTransferPenalty > modeToModeTransferPenaltyParameterSets
Collection< ModeMappingForPassengersParameterSet > getModeMappingForPassengers()
static String setToString(final Set< String > values)
List< ModeToModeTransferPenalty > getModeToModeTransferPenaltyParameterSets()
final List< IntermodalAccessEgressParameterSet > intermodalAccessEgressSettings
RangeQuerySettingsParameterSet getRangeQuerySettings(String subpopulation)
RangeQuerySettingsParameterSet removeRangeQuerySettings(String subpopulation)
final Map< String, ModeMappingForPassengersParameterSet > modeMappingForPassengersByRouteMode
void setIntermodalLegOnlyHandling(String intermodalLegOnlyHandling)
final Map< String, RouteSelectorParameterSet > routeSelectorPerSubpop
void setIntermodalAccessEgressModeSelection(IntermodalAccessEgressModeSelection intermodalAccessEgressModeSelection)
void setTransferCalculation(RaptorTransferCalculation transferCalculation)
void addRangeQuerySettings(RangeQuerySettingsParameterSet settings)
final Map< String, RangeQuerySettingsParameterSet > rangeQuerySettingsPerSubpop
void setUseCapacityConstraints(boolean useCapacityConstraints)
ModeMappingForPassengersParameterSet getModeMappingForPassengersParameterSet(String routeMode)
IntermodalAccessEgressModeSelection intermodalAccessEgressModeSelection
void addModeToModeTransferPenalty(ModeToModeTransferPenalty set)
final HandlingOfPlansWithoutRoutingMode getHandlingOfPlansWithoutRoutingMode()
IntermodalAccessEgressModeSelection getIntermodalAccessEgressModeSelection()
final PlansConfigGroup plans()
Definition: Config.java:415
void setScoringParameters(ScoringParameters scoringParameters)
RouteSelectorParameterSet removeRouteSelector(String subpopulation)
ModeToModeTransferPenalty(String fromMode, String toMode, double transferPenalty)
void addIntermodalAccessEgress(IntermodalAccessEgressParameterSet paramSet)
RouteSelectorParameterSet getRouteSelector(String subpopulation)