Class ODApplier
- java.lang.Object
-
- org.opentrafficsim.road.gtu.generator.od.ODApplier
-
public final class ODApplier extends Object
Utility to create vehicle generators on a network from an OD.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 30 nov. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ODApplier.GeneratorObjects
Class to contain created generator objects.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,ODApplier.GeneratorObjects>
applyOD(OTSRoadNetwork network, ODMatrix od, ODOptions odOptions)
Applies the OD to the network by creating vehicle generators.
-
-
-
Method Detail
-
applyOD
public static Map<String,ODApplier.GeneratorObjects> applyOD(OTSRoadNetwork network, ODMatrix od, ODOptions odOptions) throws ParameterException, SimRuntimeException
Applies the OD to the network by creating vehicle generators. The map returned contains objects created for vehicle generation. These are bundled in aGeneratorObjects
and mapped to the vehicle generator id. Vehicle generator id is equal to the origin node id. For lane-based generators the id's are appended with an ordered number (e.g. A1), where the ordering is first by link id, and then right to left concerning the lateral lane position at the start of the lane. For node "A" this would for example be:
Generator id Link Lateral start offset A1 AB -1.75m A2 AB 1.75m A3 AC -3.5m A4 AC 0.0m - Parameters:
network
- OTSRoadNetwork; networkod
- ODMatrix; OD matrixodOptions
- ODOptions; options for vehicle generation- Returns:
- Map<String, GeneratorObjects> map of generator id's and created generator objects mainly for testing
- Throws:
ParameterException
- if a parameter is missingSimRuntimeException
- if this method is called after simulation time 0
-
-