Package org.opentrafficsim.road.od
Class OdOptions
java.lang.Object
org.opentrafficsim.road.od.OdOptions
Options for vehicle generation based on an OD matrix.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Utility class to store options. -
Field Summary
Modifier and TypeFieldDescriptionstatic final OdOptions.Option<GtuErrorHandler>
Error handler when GTU exceptions occur.static final OdOptions.Option<IdGenerator>
ID generator option.static final OdOptions.Option<LaneBasedGtuCharacteristicsGeneratorOd>
GTU characteristics generator option.static final OdOptions.Option<ArrivalsHeadwayGenerator.HeadwayDistribution>
Headway randomization option.static final OdOptions.Option<Boolean>
Whether to perform instantaneous lane changes.static final OdOptions.Option<GeneratorPositions.LaneBiases>
Lane bias.static final OdOptions.Option<MarkovCorrelation<GtuType,
org.djunits.value.vdouble.scalar.Frequency>> Markov chain for GTU type option.static final OdOptions.Option<org.djunits.value.vdouble.scalar.Length>
Initial distance over which lane changes shouldn't be performed option.static final OdOptions.Option<LaneBasedGtuGenerator.RoomChecker>
Room checker option. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal <K> K
get
(OdOptions.Option<K> option, Lane lane, Node node, LinkType linkType) Get option value.final <K> OdOptions
set
(LinkType linkType, OdOptions.Option<K> option, K value) Set option value for link type.final <K> OdOptions
set
(Node node, OdOptions.Option<K> option, K value) Set option value for node.final <K> OdOptions
set
(Lane lane, OdOptions.Option<K> option, K value) Set option value for lane.final <K> OdOptions
set
(OdOptions.Option<K> option, K value) Set option value.
-
Field Details
-
HEADWAY_DIST
Headway randomization option. -
GTU_ID
ID generator option. -
GTU_TYPE
GTU characteristics generator option. -
ROOM_CHECKER
Room checker option. -
MARKOV
public static final OdOptions.Option<MarkovCorrelation<GtuType,org.djunits.value.vdouble.scalar.Frequency>> MARKOVMarkov chain for GTU type option. -
NO_LC_DIST
Initial distance over which lane changes shouldn't be performed option. -
INSTANT_LC
Whether to perform instantaneous lane changes. -
ERROR_HANDLER
Error handler when GTU exceptions occur. -
LANE_BIAS
Lane bias. Default is none, i.e. uniform distribution over lanes for all GTU types.
-
-
Constructor Details
-
OdOptions
public OdOptions()
-
-
Method Details
-
set
Set option value.- Type Parameters:
K
- value type- Parameters:
option
- Option<K>; optionvalue
- K; option value- Returns:
- this option set
-
set
Set option value for lane.- Type Parameters:
K
- value type- Parameters:
lane
- Lane; laneoption
- Option<K>; optionvalue
- K; option value- Returns:
- this option set
-
set
Set option value for node.- Type Parameters:
K
- value type- Parameters:
node
- Node; nodeoption
- Option<K>; optionvalue
- K; option value- Returns:
- this option set
-
set
Set option value for link type.- Type Parameters:
K
- value type- Parameters:
linkType
- LinkType; link typeoption
- Option<K>; optionvalue
- K; option value- Returns:
- this option set
-
get
Get option value. If a value is specified for a specific category, it is returned. The following order is used:Lane
Node
(origin)LinkType
- None (global option value)
- Default option value
- Type Parameters:
K
- value type- Parameters:
option
- Option<K>; optionlane
- Lane; lane to obtain specific option value, may be nullnode
- Node; node to obtain specific option value, may be nulllinkType
- LinkType; link type to obtain specific option value, may be null- Returns:
- K; option value
-