Class GTUGeneratorIndividualOld
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld
-
- org.opentrafficsim.road.gtu.generator.GTUGeneratorIndividualOld
-
- All Implemented Interfaces:
Serializable,Locatable,EventProducerInterface,GtuGeneratorQueue
public class GTUGeneratorIndividualOld extends AbstractGTUGeneratorOld implements Serializable
Generate GTUs.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: 1401 $, $LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, by $Author: averbraeck $,
initial version Feb 2, 2015
- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld
numberGTUs
-
Fields inherited from class org.djutils.event.EventProducer
eventProducerImpl
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
-
Constructor Summary
Constructors Constructor Description GTUGeneratorIndividualOld(String name, OTSSimulatorInterface simulator, GTUType gtuType, Class<?> gtuClass, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> initialSpeedDist, ContinuousDistDoubleScalar.Rel<Duration,DurationUnit> interarrivelTimeDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> lengthDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> widthDist, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> maximumSpeedDist, long maxGTUs, Time startTime, Time endTime, Lane lane, Length position, GTUDirectionality direction, LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> strategicalPlannerFactory, Generator<Route> routeGenerator, OTSRoadNetwork network)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContinuousDistDoubleScalar.Rel<Length,LengthUnit>getLengthDist()ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>getMaximumSpeedDist()OTSSimulatorInterfacegetSimulator()SerializablegetSourceId()ContinuousDistDoubleScalar.Rel<Length,LengthUnit>getWidthDist()StringtoString()-
Methods inherited from class org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld
checkCarBuilderList, enoughSpace, generate, getBounds, getEndTime, getGtuClass, getGtuType, getInitialSpeedDist, getInterarrivelTimeDist, getLocation, getMaxGTUs, getName, getQueueLengths, getStartTime, getStrategicalPlannerFactory, headway
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
-
-
-
Constructor Detail
-
GTUGeneratorIndividualOld
public GTUGeneratorIndividualOld(String name, OTSSimulatorInterface simulator, GTUType gtuType, Class<?> gtuClass, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> initialSpeedDist, ContinuousDistDoubleScalar.Rel<Duration,DurationUnit> interarrivelTimeDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> lengthDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> widthDist, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> maximumSpeedDist, long maxGTUs, Time startTime, Time endTime, Lane lane, Length position, GTUDirectionality direction, LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> strategicalPlannerFactory, Generator<Route> routeGenerator, OTSRoadNetwork network) throws SimRuntimeException
- Parameters:
name- String; the name of the generatorgtuType- GTUType; the type of GTU to generategtuClass- Class<?>; the gtu class to instantiateinitialSpeedDist- ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>; distribution of the initial speed of the GTUinterarrivelTimeDist- ContinuousDistDoubleScalar.Rel<Duration,DurationUnit>; distribution of the interarrival timemaxGTUs- long; maximum number of GTUs to generatestartTime- Time; start time of generation (delayed start)endTime- Time; end time of generationsimulator- OTSSimulatorInterface; simulator to schedule next arrival eventslengthDist- ContinuousDistDoubleScalar.Rel<Length,LengthUnit>; distribution of the length of the GTUwidthDist- ContinuousDistDoubleScalar.Rel<Length,LengthUnit>; distribution of the width of the GTUmaximumSpeedDist- ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>; distribution of the maximum speed of the GTUlane- Lane; Lane on which newly GTUs are placedposition- Length; position on the lane, relative to the design line of the linkdirection- GTUDirectionality; the direction on the lane in which the GTU has to be generated (DIR_PLUS, or DIR_MINUS)strategicalPlannerFactory- LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner>; the lane-based strategical planner factory to userouteGenerator- Generator<Route>; route generatornetwork- OTSRoadNetwork; the network to register the GTU into- Throws:
SimRuntimeException- when simulation scheduling fails
-
-
Method Detail
-
getSimulator
public final OTSSimulatorInterface getSimulator()
- Specified by:
getSimulatorin classAbstractGTUGeneratorOld- Returns:
- simulator.
-
getLengthDist
public final ContinuousDistDoubleScalar.Rel<Length,LengthUnit> getLengthDist()
- Specified by:
getLengthDistin classAbstractGTUGeneratorOld- Returns:
- lengthDist.
-
getWidthDist
public final ContinuousDistDoubleScalar.Rel<Length,LengthUnit> getWidthDist()
- Specified by:
getWidthDistin classAbstractGTUGeneratorOld- Returns:
- widthDist.
-
getMaximumSpeedDist
public final ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> getMaximumSpeedDist()
- Specified by:
getMaximumSpeedDistin classAbstractGTUGeneratorOld- Returns:
- maximumSpeedDist.
-
getSourceId
public Serializable getSourceId()
- Specified by:
getSourceIdin interfaceEventProducerInterface- Specified by:
getSourceIdin classEventProducer
-
-