21 package org.matsim.core.config.groups;
23 import org.apache.logging.log4j.LogManager;
24 import org.apache.logging.log4j.Logger;
32 import jakarta.validation.constraints.Positive;
33 import jakarta.validation.constraints.PositiveOrZero;
35 import java.util.stream.Collectors;
49 private static final String
END_TIME =
"endTime";
53 final static String REMOVE_STUCK_VEHICLES_STRING =
54 "Boolean. `true': stuck vehicles are removed, aborting the plan; `false': stuck vehicles are forced into the next link. `false' is probably the better choice.";
60 final static String NOTIFY_ABOUT_STUCK_VEHICLES_STRING =
61 "Boolean. `true': when a vehicle is moved to the next link because the stuck time is exceeded, a PersonStuckAndContinueEvent is thrown.";
67 final static String STUCK_TIME_STRING =
68 "time in seconds. Time after which the frontmost vehicle on a link is called `stuck' if it does not move.";
165 Map<String, String> map = super.getComments();
167 StringBuilder options =
new StringBuilder();
169 options.append(style.toString());
172 map.put(SNAPSHOT_STYLE,
"snapshotStyle. One of: " + options);
174 map.put(NUMBER_OF_THREADS,
"Number of threads used for the QSim. " 175 +
"Note that this setting is independent from the \"global\" threads setting. " 176 +
"In contrast to earlier versions, the non-parallel special version is no longer there.");
177 map.put(REMOVE_STUCK_VEHICLES, REMOVE_STUCK_VEHICLES_STRING);
178 map.put(STUCK_TIME, STUCK_TIME_STRING);
179 map.put(NOTIFY_ABOUT_STUCK_VEHICLES, NOTIFY_ABOUT_STUCK_VEHICLES_STRING);
181 StringBuilder options =
new StringBuilder(60);
183 options.append(dyn).append(
' ');
185 map.put(TRAFFIC_DYNAMICS,
"options: " + options);
188 StringBuilder options =
new StringBuilder(60);
190 options.append(ii).append(
' ');
192 map.put(SIM_STARTTIME_INTERPRETATION,
"Options: " + options);
195 StringBuilder options =
new StringBuilder(60);
197 options.append(behav).append(
' ');
199 map.put(VEHICLE_BEHAVIOR,
"Defines what happens if an agent wants to depart, but the specified vehicle is not available. " +
200 "One of: " + options);
202 map.put(MAIN_MODE,
"[comma-separated list] Defines which modes are congested modes. Technically, these are the modes that " +
203 "the departure handler of the netsimengine handles. Effective cell size, effective lane width, flow capacity " +
204 "factor, and storage capacity factor need to be set with diligence. Need to be vehicular modes to make sense.");
207 map.put(NODE_OFFSET,
"Shortens a link in the visualization, i.e. its start and end point are moved into towards the center. Does not affect traffic flow. ");
208 map.put(LINK_WIDTH,
"The (initial) width of the links of the network. Use positive floating point values. This is used only for visualisation.");
210 StringBuilder stb =
new StringBuilder();
212 stb.append(
" ").append(ld.toString());
214 map.put(LINK_DYNAMICS,
"default: FIFO; options:" + stb);
216 map.put(USE_PERSON_ID_FOR_MISSING_VEHICLE_ID,
"If a route does not reference a vehicle, agents will use the vehicle with the same id as their own.");
217 map.put(FAST_CAPACITY_UPDATE,
"If false, the qsim accumulates fractional flows up to one flow unit in every time step. If true, " 218 +
"flows are updated only if an agent wants to enter the link or an agent is added to buffer. " 219 +
"Default is true.");
220 map.put(
USE_LANES,
"Set this parameter to true if lanes should be used, false if not.");
222 StringBuilder stb =
new StringBuilder();
224 stb.append(
" ").append(src.toString());
226 map.put(VEHICLES_SOURCE,
"If vehicles should all be the same default vehicle, or come from the vehicles file, " 227 +
"or something else. Possible values: " + stb);
230 map.put(IS_SEEP_MODE_STORAGE_FREE,
"If link dynamics is set as " +
LinkDynamics.
SeepageQ +
", set to true if seep mode do not consumes any space on the link. Default is false.");
249 moveVehByVehDeterministicPriorities_nodeBlockedWhenSingleOutlinkFull
265 Set<String> modes = Arrays.stream(value.split(
",")).map(String::trim).collect(Collectors.toSet());
475 MAX_CAP_FOR_ONE_LANE}
495 throw new IllegalArgumentException(
"Number of threads must be strictly positive, got "+
numberOfThreads );
540 "decides if waiting vehicles enter the network after or before the already driving vehicles were moved. Default: false";
633 Set<String> modes = Arrays.stream(value.split(
",")).map(String::trim).collect(Collectors.toSet());
676 static final String PCU_THRESHOLD_FOR_FLOW_CAPACITY_EASING =
677 "Flow capacity easing is activated for vehicles of size equal or smaller than the specified threshold. " 678 +
"Introduced to minimise the chances of buses being severely delayed in downsampled scenarios";
void setEndTime(final double endTime)
void setTrafficDynamics(final TrafficDynamics str)
VehiclesSource vehiclesSource
static final String STUCK_TIME
InflowCapacitySetting getInflowCapacitySetting()
void setPcuThresholdForFlowCapacityEasing(double pcuThresholdForFlowCapacityEasing)
TrafficDynamics getTrafficDynamics()
void setNodeTransitionLogic(NodeTransition nodeTransitionLogic)
void setStuckTime(final double stuckTime)
final boolean isUsingFastCapacityUpdate()
void setStartTime(String value)
void setSeepModes(Collection< String > seepModes)
emptyBufferAfterBufferRandomDistribution_dontBlockNode
static final String TRAFFIC_DYNAMICS
static final String SIM_STARTTIME_INTERPRETATION
modeVehicleTypesFromVehiclesData
double getStorageCapFactor()
FilterSnapshots getFilterSnapshots()
void setSnapshotPeriod(String value)
boolean usePersonIdForMissingVehicleId
FilterSnapshots filterSnapshots
Collection< String > mainModes
Collection< String > getMainModes()
boolean isNotifyAboutStuckVehicles()
final Map< String, String > getComments()
boolean setUsingTravelTimeCheckInTeleportation(boolean val)
static final String STORAGE_CAPACITY_FACTOR
static String setToString(final Set< String > values)
StarttimeInterpretation simStarttimeInterpretation
boolean usingTravelTimeCheckInTeleportation
static final String SIM_ENDTIME_INTERPRETATION
TrafficDynamics trafficDynamics
static final String NUMBER_OF_THREADS
static final String SEEP_MODE
void setMainModes(String value)
void setRestrictingSeepage(boolean isRestrictingSeepage)
String getEndTimeAsString()
LinkDynamics getLinkDynamics()
boolean removeStuckVehicles
EndtimeInterpretation getSimEndtimeInterpretation()
boolean notifyAboutStuckVehicles
boolean isRemoveStuckVehicles()
moveVehByVehRandomDistribution_nodeBlockedWhenSingleOutlinkFull
void setFlowCapFactor(final double flowCapFactor)
OptionalTime getStartTime()
void setInflowCapacitySetting(InflowCapacitySetting inflowCapacitySetting)
void setUseLanes(final boolean useLanes)
void setRemoveStuckVehicles(final boolean removeStuckVehicles)
static final String NODE_OFFSET
boolean isSeepModeStorageFree()
void setMainModes(Collection< String > mainModes)
double getFlowCapFactor()
String getSeepModesAsString()
LinkDynamics linkDynamics
emptyBufferAfterBufferRandomDistribution_nodeBlockedWhenSingleOutlinkFull
void setSimEndtimeInterpretation(EndtimeInterpretation str)
static final String IS_RESTRICTING_SEEPAGE
void setStartTime(final double startTime)
void setSeepModeStorageFree(boolean isSeepModeStorageFree)
NodeTransition nodeTransitionLogic
static final OptionalTime parseOptionalTime(final String time)
String getSnapshotPeriodAsString()
static final double parseTime(final String time)
StarttimeInterpretation getSimStarttimeInterpretation()
VehicleBehavior getVehicleBehavior()
String getTimeStepSizeAsString()
Collection< String > seepModes
String getMainModesAsString()
static final String FAST_CAPACITY_UPDATE
void setSeepModes(String value)
final VehiclesSource getVehiclesSource()
static final String USE_PERSON_ID_FOR_MISSING_VEHICLE_ID
static final String SNAPSHOT_STYLE
static final String MAIN_MODE
static final String LINK_WIDTH
void setNotifyAboutStuckVehicles(final boolean notifyAboutStuckVehicles)
EndtimeInterpretation simEndtimeInterpretation
boolean insertingWaitingVehiclesBeforeDrivingVehicles
void setStorageCapFactor(final double val)
VehicleBehavior vehicleBehavior
static final String FLOW_CAPACITY_FACTOR
SnapshotStyle snapshotStyle
static final String FILTER_SNAPSHOTS
Collection< String > getSeepModes()
static final String START_TIME
float getLinkWidthForVis()
void setInsertingWaitingVehiclesBeforeDrivingVehicles(boolean val)
InflowCapacitySetting inflowCapacitySetting
void setVehicleBehavior(VehicleBehavior value)
boolean isInsertingWaitingVehiclesBeforeDrivingVehicles()
SnapshotStyle getSnapshotStyle()
static final String writeTime(final double seconds, final String timeformat)
static OptionalTime defined(double seconds)
void setSnapshotPeriod(final double snapshotPeriod)
void setLinkWidthForVis(final float linkWidth)
final void setVehiclesSource(VehiclesSource source)
void setFilterSnapshots(FilterSnapshots value)
static final String GROUP_NAME
static final String VEHICLES_SOURCE
String getStartTimeAsString()
void setNumberOfThreads(final int numberOfThreads)
static final String NOTIFY_ABOUT_STUCK_VEHICLES
void setEndTime(String value)
String getFilterSnapshotsAsString()
static final String INSERTING_WAITING_VEHICLES_BEFORE_DRIVING_VEHICLES
double pcuThresholdForFlowCapacityEasing
void setNodeOffset(double nodeOffset)
static final String END_TIME
void setTimeStepSize(final double seconds)
boolean isUsingTravelTimeCheckInTeleportation()
boolean getUsePersonIdForMissingVehicleId()
void setLinkDynamics(LinkDynamics linkDynamics)
moveVehByVehRandomDistribution_dontBlockNode
static final String IS_SEEP_MODE_STORAGE_FREE
static OptionalTime undefined()
boolean usingFastCapacityUpdate
static final String VEHICLE_BEHAVIOR
boolean isRestrictingSeepage()
void setSnapshotStyle(final SnapshotStyle style)
OptionalTime getEndTime()
static final String GENERATE_SNAPSHOT_FOR_LINK_KEY
final void testForLocked()
static final String REMOVE_STUCK_VEHICLES
static final String SNAPSHOT_PERIOD
void setTimeStepSize(String value)
final void setUsingFastCapacityUpdate(boolean val)
static final String LINK_DYNAMICS
double getPcuThresholdForFlowCapacityEasing()
maxOfStarttimeAndEarliestActivityEnd
void setSimStarttimeInterpretation(StarttimeInterpretation str)
void setFilterSnapshots(String value)
static final String TIME_STEP_SIZE
NodeTransition getNodeTransitionLogic()
static final String INSERTING_WAITING_VEHICLES_BEFORE_DRIVING_VEHICLES_CMT
static final String USE_LANES
void setUsePersonIdForMissingVehicleId(boolean value)
double getSnapshotPeriod()