public class Platoons extends Object
new Platoons(...).addPlatoon(...).addGtu(...).addGtu(...).addPlatoon(...).addGtu(...).addGtu(...).start();. Method
 addGtu(...) may only determine a generation time if other info is set by fixInfo(...).LaneBasedGTUCharacteristicsGenerator or GTUCharacteristicsGeneratorOD. In the 
 former case the origin and destination nodes as well as the OD category can be null.
 
 Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
| Constructor and Description | 
|---|
Platoons(LaneBasedGTUGenerator generator,
        GTUCharacteristicsGeneratorOD characteristics,
        nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator,
        nl.tudelft.simulation.jstats.streams.StreamInterface stream,
        Set<DirectedLanePosition> position)
Constructor. 
 | 
Platoons(LaneBasedGTUGenerator generator,
        LaneBasedGTUCharacteristicsGenerator characteristics,
        nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator,
        Set<DirectedLanePosition> position)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Platoons | 
addGtu(org.djunits.value.vdouble.scalar.Time time)
Add GTU to the current platoon. 
 | 
Platoons | 
addGtu(org.djunits.value.vdouble.scalar.Time time,
      org.opentrafficsim.core.network.Node origin,
      org.opentrafficsim.core.network.Node destination,
      Category category,
      org.djunits.value.vdouble.scalar.Speed speed)
Add GTU to the current platoon. 
 | 
Platoons | 
addPlatoon(org.djunits.value.vdouble.scalar.Time start,
          org.djunits.value.vdouble.scalar.Time end)
Add a platoon. 
 | 
Platoons | 
fixInfo(org.opentrafficsim.core.network.Node origin,
       org.opentrafficsim.core.network.Node destination,
       Category category,
       org.djunits.value.vdouble.scalar.Speed speed)
Fix all info except time for GTU's added hereafter. 
 | 
void | 
start()
Starts the events. 
 | 
public Platoons(LaneBasedGTUGenerator generator, LaneBasedGTUCharacteristicsGenerator characteristics, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator, Set<DirectedLanePosition> position)
generator - LaneBasedGTUGenerator; GTU generatorcharacteristics - LaneBasedGTUCharacteristicsGenerator; characteristics generatorsimulator - DEVSSimulatorInterface.TimeDoubleUnit; simulatorposition - Set<DirectedLanePosition>; positionpublic Platoons(LaneBasedGTUGenerator generator, GTUCharacteristicsGeneratorOD characteristics, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator, nl.tudelft.simulation.jstats.streams.StreamInterface stream, Set<DirectedLanePosition> position)
generator - LaneBasedGTUGenerator; GTU generatorcharacteristics - GTUCharacteristicsGeneratorOD; characteristics generatorsimulator - DEVSSimulatorInterface.TimeDoubleUnit; simulatorstream - StreamInterface; random number streamposition - Set<DirectedLanePosition>; positionpublic Platoons addPlatoon(org.djunits.value.vdouble.scalar.Time start, org.djunits.value.vdouble.scalar.Time end) throws nl.tudelft.simulation.dsol.SimRuntimeException
addGtu.start - Time; start timeend - Time; end timenl.tudelft.simulation.dsol.SimRuntimeException - on exceptionpublic Platoons fixInfo(org.opentrafficsim.core.network.Node origin, org.opentrafficsim.core.network.Node destination, Category category, org.djunits.value.vdouble.scalar.Speed speed)
origin - Node; origindestination - Node; destinationcategory - Category; categoryspeed - Speed; generation speedpublic Platoons addGtu(org.djunits.value.vdouble.scalar.Time time)
fixInfo.time - Time; time of generationIllegalStateException - if no fixed info was set using fixInfopublic Platoons addGtu(org.djunits.value.vdouble.scalar.Time time, org.opentrafficsim.core.network.Node origin, org.opentrafficsim.core.network.Node destination, Category category, org.djunits.value.vdouble.scalar.Speed speed)
time - Time; time of generationorigin - Node; origindestination - Node; destinationcategory - Category; categoryspeed - Speed; generation speedIllegalStateException - if no platoon was started or time is outside of the platoon time rangepublic void start()
           throws nl.tudelft.simulation.dsol.SimRuntimeException
nl.tudelft.simulation.dsol.SimRuntimeException - if start of first platoon is in the pastCopyright © 2014–2018 Delft University of Technology. All rights reserved.