public class LaneBasedIndividualGTU extends AbstractLaneBasedIndividualGTU
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder
Build an individual car and use easy setter methods to instantiate the car.
|
DESTROY_EVENT, INIT_EVENT, MOVE_EVENT
Constructor and Description |
---|
LaneBasedIndividualGTU(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Length width,
org.djunits.value.vdouble.scalar.Speed maximumSpeed,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass,
org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer,
org.opentrafficsim.core.network.OTSNetwork network)
Construct a new LaneBasedIndividualCar.
|
LaneBasedIndividualGTU(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Length width,
org.djunits.value.vdouble.scalar.Speed maximumSpeed,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.network.OTSNetwork network) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
org.opentrafficsim.core.gtu.RelativePosition |
getCenter() |
Set<org.opentrafficsim.core.gtu.RelativePosition> |
getContourPoints() |
org.opentrafficsim.core.gtu.RelativePosition |
getFront() |
org.opentrafficsim.core.gtu.RelativePosition |
getRear() |
Map<org.opentrafficsim.core.gtu.RelativePosition.TYPE,org.opentrafficsim.core.gtu.RelativePosition> |
getRelativePositions() |
String |
toString() |
getLength, getMaximumSpeed, getWidth
addTrigger, enterLane, fractionalPosition, fractionalPosition, fractionalPositions, fractionalPositions, getBehavioralCharacteristics, getBounds, getLanes, getStrategicalPlanner, getTacticalPlanner, init, leaveLane, leaveLane, move, position, position, positions, positions, projectedPosition
getAcceleration, getGTUType, getId, getLocation, getMaximumAcceleration, getMaximumDeceleration, getOdometer, getOperationalPlan, getPerceivableContext, getReference, getSimulator, getSpeed, getTurnIndicatorStatus, init, interruptMove, isDestroyed, setMaximumAcceleration, setMaximumDeceleration, setTurnIndicatorStatus
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public LaneBasedIndividualGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length width, org.djunits.value.vdouble.scalar.Speed maximumSpeed, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.network.OTSNetwork network) throws NamingException, org.opentrafficsim.core.gtu.GTUException
id
- ID; the id of the GTUgtuType
- GTUType; the type of GTU, e.g. TruckType, CarType, BusTypelength
- Length; the maximum length of the GTU (parallel with driving direction)width
- Length; the maximum width of the GTU (perpendicular to driving direction)maximumSpeed
- Speed;the maximum speed of the GTU (in the driving direction)simulator
- OTSDEVSSimulatorInterface; the simulatornetwork
- the network that the GTU is initially registered inNamingException
- if an error occurs when adding the animation handlerorg.opentrafficsim.core.gtu.GTUException
- when a parameter is invalidpublic LaneBasedIndividualGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length width, org.djunits.value.vdouble.scalar.Speed maximumSpeed, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass, org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer, org.opentrafficsim.core.network.OTSNetwork network) throws NamingException, org.opentrafficsim.core.gtu.GTUException
id
- ID; the id of the GTUgtuType
- GTUTYpe; the type of GTU, e.g. TruckType, CarType, BusTypelength
- Length; the maximum length of the GTU (parallel with driving direction)width
- Length; the maximum width of the GTU (perpendicular to driving direction)maximumSpeed
- Speed;the maximum speed of the GTU (in the driving direction)simulator
- OTSDEVSSimulatorInterface; the simulatoranimationClass
- Class<? extends Renderable2D>; the class for animation or null if no animationgtuColorer
- GTUColorer; the GTUColorer that will be linked from the animation to determine the color (may be null
in which case a default will be used)network
- the network that the GTU is initially registered inNamingException
- if an error occurs when adding the animation handlerorg.opentrafficsim.core.gtu.GTUException
- when a parameter is invalidpublic final org.opentrafficsim.core.gtu.RelativePosition getFront()
public final org.opentrafficsim.core.gtu.RelativePosition getRear()
public final org.opentrafficsim.core.gtu.RelativePosition getCenter()
public final Map<org.opentrafficsim.core.gtu.RelativePosition.TYPE,org.opentrafficsim.core.gtu.RelativePosition> getRelativePositions()
public final Set<org.opentrafficsim.core.gtu.RelativePosition> getContourPoints()
public final void destroy()
destroy
in interface org.opentrafficsim.core.gtu.GTU
destroy
in class AbstractLaneBasedGTU
public final String toString()
toString
in class AbstractLaneBasedGTU
Copyright © 2014–2016 Delft University of Technology. All rights reserved.