20 package org.matsim.core.config.groups;
24 import org.apache.logging.log4j.LogManager;
25 import org.apache.logging.log4j.Logger;
53 Map<String,String> map = super.getComments();
56 final String message =
"Deprecated, do not use. The file is loaded when the filename is given. Functionality needs to be switched on elsewhere.";
57 map.put(USE_LANES, message) ;
58 map.put(USE_HOUSEHOLDS, message);
59 map.put(USE_VEHICLES, message);
60 map.put(USE_TRANSIT,
"Deprecated, do not use. See transit section of config file.") ;
66 public final void addParam(
final String paramName,
final String value) {
68 if (
"null".equalsIgnoreCase( value ) )
return;
70 if (USE_LANES.equals(paramName)) {
71 this.setUseLanes( Boolean.parseBoolean(value) );
72 }
else if (USE_HOUSEHOLDS.equals(paramName)) {
73 this.setUseHouseholds( Boolean.parseBoolean(value) );
74 }
else if (USE_VEHICLES.equals(paramName)) {
75 this.setUseVehicles( Boolean.parseBoolean(value) );
76 }
else if (USE_TRANSIT.equals(paramName)) {
77 this.setUseTransit( Boolean.parseBoolean(value) );
79 throw new IllegalArgumentException(
"Parameter '" + paramName +
"' is not supported by config group '" + GROUP_NAME +
"'.");
83 public final String
getValue(
final String param_name) {
84 throw new UnsupportedOperationException(
"Use getters for accessing values!");
89 Map<String, String>
params = super.getParams();
134 return "The " + module +
" switch is no longer operational. The file is loaded if the file name" 135 +
" is different from null. If you needed this for the creation of the container, use the ScenarioBuilder in " 136 +
"ScenarioUtils. Note that loading the file does not mean that it is used anywhere; such functionality needs to be " 137 +
"switched on elsewhere (e.g. in qsim, in transit, ...). If this does not work for you, please let us know. kai, jun'15";
static final String USE_TRANSIT
static final String USE_LANES
void setSimulationPeriodInDays(final double simulationPeriodInDays)
static String getMessage(String module)
static final String USE_HOUSEHOLDS
static final String SIMULATION_PERIOD_DAYS
final String getValue(final String param_name)
double simulationPeriodInDays
static final String GROUP_NAME
final void addParam(final String paramName, final String value)
Map< String, String > getComments()
final TreeMap< String, String > params
static final String USE_VEHICLES
final Map< String, String > getParams()
double getSimulationPeriodInDays()