public class CharacteristicsGenerator extends Object implements LaneBasedGTUCharacteristicsGenerator
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
CharacteristicsGenerator(LaneBasedStrategicalRoutePlannerFactory strategicalFactory,
org.opentrafficsim.core.network.route.RouteGenerator routeGenerator,
org.opentrafficsim.core.idgenerator.IdGenerator idGenerator,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.network.OTSNetwork network,
GTUTypeGenerator gtuTypeGenerator,
org.djunits.value.vdouble.scalar.Speed generationSpeed,
Set<DirectedLanePosition> positions) |
Modifier and Type | Method and Description |
---|---|
LaneBasedGTUCharacteristics |
draw()
Generate a LaneBasedGTUCharacteristics object.
|
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface |
getSimulator()
Return the simulator.
|
public CharacteristicsGenerator(LaneBasedStrategicalRoutePlannerFactory strategicalFactory, org.opentrafficsim.core.network.route.RouteGenerator routeGenerator, org.opentrafficsim.core.idgenerator.IdGenerator idGenerator, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.network.OTSNetwork network, GTUTypeGenerator gtuTypeGenerator, org.djunits.value.vdouble.scalar.Speed generationSpeed, Set<DirectedLanePosition> positions)
strategicalFactory
- strategical planner factoryrouteGenerator
- route generatoridGenerator
- generator for the GTU idsimulator
- the simulatornetwork
- the networkgtuTypeGenerator
- the generator for the GTU typegenerationSpeed
- the initial speedpositions
- the positions for generationpublic LaneBasedGTUCharacteristics draw() throws org.opentrafficsim.core.distributions.ProbabilityException, org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException, org.opentrafficsim.core.gtu.GTUException
draw
in interface LaneBasedGTUCharacteristicsGenerator
org.opentrafficsim.core.distributions.ProbabilityException
- when the generator is improperly configuredorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- in case of a parameter problem.org.opentrafficsim.core.gtu.GTUException
- if strategical planner cannot be createdpublic org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface getSimulator() throws org.opentrafficsim.core.distributions.ProbabilityException
getSimulator
in interface LaneBasedGTUCharacteristicsGenerator
org.opentrafficsim.core.distributions.ProbabilityException
- when the generator cannot retrieve the simulatorCopyright © 2014–2017 Delft University of Technology. All rights reserved.