public interface LaneBasedGTU
extends org.opentrafficsim.core.gtu.GTU
 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 | Field and Description | 
|---|---|
static nl.tudelft.simulation.event.EventType | 
LANE_ENTER_EVENT
The event type for pub/sub indicating that the GTU entered a new lane (with the FRONT position if driving forward; REAR
 if driving backward). 
 | 
static nl.tudelft.simulation.event.EventType | 
LANE_EXIT_EVENT
The event type for pub/sub indicating that the GTU exited a lane (with the REAR position if driving forward; FRONT if
 driving backward). 
 | 
static nl.tudelft.simulation.event.EventType | 
LANEBASED_DESTROY_EVENT
The lane-based event type for pub/sub indicating destruction of the GTU. 
 | 
static nl.tudelft.simulation.event.EventType | 
LANEBASED_INIT_EVENT
The lane-based event type for pub/sub indicating the initialization of a new GTU. 
 | 
static nl.tudelft.simulation.event.EventType | 
LANEBASED_MOVE_EVENT
The lane-based event type for pub/sub indicating a move. 
 | 
static nl.tudelft.simulation.event.EventType | 
LINK_ENTER_EVENT
The event type for pub/sub indicating that the GTU entered a new link (with the FRONT position if driving forward; REAR
 if driving backward). 
 | 
static nl.tudelft.simulation.event.EventType | 
LINK_EXIT_EVENT
The event type for pub/sub indicating that the GTU exited a link (with the REAR position if driving forward; FRONT if
 driving backward). 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addTrigger(Lane lane,
          nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent<org.opentrafficsim.core.dsol.OTSSimTimeDouble> event)
Add an event to the list of lane triggers scheduled for this GTU. 
 | 
void | 
changeLaneInstantaneously(org.opentrafficsim.core.network.LateralDirectionality laneChangeDirection)
Change lanes instantaneously. 
 | 
void | 
enterLane(Lane lane,
         org.djunits.value.vdouble.scalar.Length position,
         org.opentrafficsim.core.gtu.GTUDirectionality gtuDirection)
insert GTU at a certain position. 
 | 
double | 
fractionalPosition(Lane lane,
                  org.opentrafficsim.core.gtu.RelativePosition relativePosition)
Return the longitudinal position of a point relative to this GTU, relative to the center line of the Lane, as a fraction
 of the length of the lane. 
 | 
double | 
fractionalPosition(Lane lane,
                  org.opentrafficsim.core.gtu.RelativePosition relativePosition,
                  org.djunits.value.vdouble.scalar.Time when)
Return the longitudinal position of a point relative to this GTU, relative to the center line of the Lane, as a fraction
 of the length of the lane. 
 | 
Map<Lane,Double> | 
fractionalPositions(org.opentrafficsim.core.gtu.RelativePosition relativePosition)
Return the longitudinal positions of a point relative to this GTU, relative to the center line of the Lanes in which the
 vehicle is registered, as fractions of the length of the lane. 
 | 
Map<Lane,Double> | 
fractionalPositions(org.opentrafficsim.core.gtu.RelativePosition relativePosition,
                   org.djunits.value.vdouble.scalar.Time when)
Return the longitudinal positions of a point relative to this GTU, relative to the center line of the Lanes in which the
 vehicle is registered, as fractions of the length of the lane. 
 | 
org.opentrafficsim.core.gtu.GTUDirectionality | 
getDirection(Lane lane)
Return the directionality of a lane on which the GTU is registered for its current operational plan. 
 | 
nl.tudelft.simulation.language.d3.DirectedPoint | 
getLocation()
Return the location without a RemoteException. 
 | 
DirectedLanePosition | 
getReferencePosition()
Return the current Lane, position and directionality of the GTU. 
 | 
LaneBasedStrategicalPlanner | 
getStrategicalPlanner() | 
LaneBasedTacticalPlanner | 
getTacticalPlanner() | 
void | 
leaveLane(Lane lane)
Unregister the GTU from a lane. 
 | 
org.djunits.value.vdouble.scalar.Length | 
position(Lane lane,
        org.opentrafficsim.core.gtu.RelativePosition relativePosition)
Return the longitudinal position of a point relative to this GTU, relative to the center line of the Lane at the current
 simulation time. 
 | 
org.djunits.value.vdouble.scalar.Length | 
position(Lane lane,
        org.opentrafficsim.core.gtu.RelativePosition relativePosition,
        org.djunits.value.vdouble.scalar.Time when)
Return the longitudinal position of a point relative to this GTU, relative to the center line of the Lane. 
 | 
Map<Lane,org.djunits.value.vdouble.scalar.Length> | 
positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition)
Return the longitudinal positions of a point relative to this GTU, relative to the center line of the Lanes in which the
 vehicle is registered. 
 | 
Map<Lane,org.djunits.value.vdouble.scalar.Length> | 
positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition,
         org.djunits.value.vdouble.scalar.Time when)
Return the longitudinal positions of a point relative to this GTU, relative to the center line of the Lanes in which the
 vehicle is registered. 
 | 
org.djunits.value.vdouble.scalar.Length | 
projectedPosition(Lane projectionLane,
                 org.opentrafficsim.core.gtu.RelativePosition relativePosition,
                 org.djunits.value.vdouble.scalar.Time when)
Return the longitudinal position that this GTU would have if it were to change to another Lane with a / the current
 CrossSectionLink. 
 | 
destroy, getAcceleration, getBaseColor, getBehavioralCharacteristics, getCenter, getContourPoints, getFront, getGTUType, getId, getLength, getMaximumAcceleration, getMaximumDeceleration, getMaximumSpeed, getOdometer, getOperationalPlan, getRear, getReference, getRelativePositions, getSimulator, getSpeed, getTurnIndicatorStatus, getWidth, setTurnIndicatorStatusstatic final nl.tudelft.simulation.event.EventType LANEBASED_INIT_EVENT
static final nl.tudelft.simulation.event.EventType LANEBASED_MOVE_EVENT
static final nl.tudelft.simulation.event.EventType LANEBASED_DESTROY_EVENT
static final nl.tudelft.simulation.event.EventType LINK_ENTER_EVENT
static final nl.tudelft.simulation.event.EventType LINK_EXIT_EVENT
static final nl.tudelft.simulation.event.EventType LANE_ENTER_EVENT
static final nl.tudelft.simulation.event.EventType LANE_EXIT_EVENT
LaneBasedStrategicalPlanner getStrategicalPlanner()
getStrategicalPlanner in interface org.opentrafficsim.core.gtu.GTULaneBasedTacticalPlanner getTacticalPlanner()
getTacticalPlanner in interface org.opentrafficsim.core.gtu.GTUnl.tudelft.simulation.language.d3.DirectedPoint getLocation()
getLocation in interface nl.tudelft.simulation.dsol.animation.Locatablevoid enterLane(Lane lane, org.djunits.value.vdouble.scalar.Length position, org.opentrafficsim.core.gtu.GTUDirectionality gtuDirection) throws org.opentrafficsim.core.gtu.GTUException
lane - the lane to add to the list of lanes on which the GTU is registered.gtuDirection - the direction of the GTU on the lane (which can be bidirectional). If the GTU has a positive speed,
            it is moving in this direction.position - the position on the lane.org.opentrafficsim.core.gtu.GTUException - when positioning the GTU on the lane causes a problemvoid leaveLane(Lane lane) throws org.opentrafficsim.core.gtu.GTUException
lane - the lane to remove from the list of lanes on which the GTU is registered.org.opentrafficsim.core.gtu.GTUException - when leaveLane should not be calledvoid changeLaneInstantaneously(org.opentrafficsim.core.network.LateralDirectionality laneChangeDirection)
                        throws org.opentrafficsim.core.gtu.GTUException
laneChangeDirection - the direction to change toorg.opentrafficsim.core.gtu.GTUException - in case lane change failsMap<Lane,org.djunits.value.vdouble.scalar.Length> positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.gtu.GTUException
relativePosition - the position on the vehicle relative to the reference point.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registered.Map<Lane,org.djunits.value.vdouble.scalar.Length> positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time when) throws org.opentrafficsim.core.gtu.GTUException
relativePosition - the position on the vehicle relative to the reference point.when - the future time for which to calculate the positions.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registered.org.djunits.value.vdouble.scalar.Length position(Lane lane, org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.gtu.GTUException
lane - the position on this lane will be returned.relativePosition - the position on the vehicle relative to the reference point.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on the given lane.org.djunits.value.vdouble.scalar.Length position(Lane lane, org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time when) throws org.opentrafficsim.core.gtu.GTUException
lane - the position on this lane will be returned.relativePosition - the position on the vehicle relative to the reference point.when - the future time for which to calculate the positions.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on the given lane.Map<Lane,Double> fractionalPositions(org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.gtu.GTUException
relativePosition - the position on the vehicle relative to the reference point.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registered.Map<Lane,Double> fractionalPositions(org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time when) throws org.opentrafficsim.core.gtu.GTUException
relativePosition - the position on the vehicle relative to the reference point.when - the future time for which to calculate the positions.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registered.double fractionalPosition(Lane lane, org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time when) throws org.opentrafficsim.core.gtu.GTUException
lane - the position on this lane will be returned.relativePosition - the position on the vehicle relative to the reference point.when - the future time for which to calculate the positions.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on the given lane.double fractionalPosition(Lane lane, org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.gtu.GTUException
lane - the position on this lane will be returned.relativePosition - the position on the vehicle relative to the reference point.org.opentrafficsim.core.gtu.GTUException - when the vehicle is not on the given lane.org.djunits.value.vdouble.scalar.Length projectedPosition(Lane projectionLane, org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time when) throws org.opentrafficsim.core.gtu.GTUException
projectionLane - Lane; the lane onto which the position of this GTU must be projectedrelativePosition - RelativePosition; the point on this GTU that must be projectedwhen - Time; the time for which to project the position of this GTUorg.opentrafficsim.core.gtu.GTUException - when projectionLane it not in any of the CrossSectionLink that the GTU is onDirectedLanePosition getReferencePosition() throws org.opentrafficsim.core.gtu.GTUException
org.opentrafficsim.core.gtu.GTUException - in case the reference position of the GTU cannot be found on the lanes in its current pathorg.opentrafficsim.core.gtu.GTUDirectionality getDirection(Lane lane) throws org.opentrafficsim.core.gtu.GTUException
lane - Lane; the lane for which we want to know the directionorg.opentrafficsim.core.gtu.GTUException - in case the GTU is not registered on the Lanevoid addTrigger(Lane lane, nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent<org.opentrafficsim.core.dsol.OTSSimTimeDouble> event)
lane - Lane; the lane on which the event occursevent - SimeEvent<OTSSimTimeDouble> the eventCopyright © 2014–2017 Delft University of Technology. All rights reserved.