public interface LaneBasedGTU
extends org.opentrafficsim.core.gtu.GTU
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
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 |
enterLane(Lane lane,
org.djunits.value.vdouble.scalar.Length.Rel 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.Abs 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.Abs 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.
|
LaneBasedBehavioralCharacteristics |
getBehavioralCharacteristics() |
Map<Lane,org.opentrafficsim.core.gtu.GTUDirectionality> |
getLanes() |
LanePerceptionFull |
getPerception() |
LaneBasedStrategicalPlanner |
getStrategicalPlanner() |
void |
leaveLane(Lane lane)
Unregister the GTU from a lane.
|
org.djunits.value.vdouble.scalar.Length.Rel |
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.Rel |
position(Lane lane,
org.opentrafficsim.core.gtu.RelativePosition relativePosition,
org.djunits.value.vdouble.scalar.Time.Abs 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.Rel> |
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.Rel> |
positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition,
org.djunits.value.vdouble.scalar.Time.Abs 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.Rel |
projectedPosition(Lane projectionLane,
org.opentrafficsim.core.gtu.RelativePosition relativePosition,
org.djunits.value.vdouble.scalar.Time.Abs 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, getAcceleration, getBounds, getFront, getGTUType, getId, getLength, getLocation, getMaximumAcceleration, getMaximumDeceleration, getMaximumVelocity, getOdometer, getOperationalPlan, getRear, getReference, getRelativePositions, getSimulator, getTacticalPlanner, getTurnIndicatorStatus, getVelocity, getVelocity, getWidth, setTurnIndicatorStatus
LanePerceptionFull getPerception()
getPerception
in interface org.opentrafficsim.core.gtu.GTU
LaneBasedBehavioralCharacteristics getBehavioralCharacteristics()
getBehavioralCharacteristics
in interface org.opentrafficsim.core.gtu.GTU
LaneBasedStrategicalPlanner getStrategicalPlanner()
getStrategicalPlanner
in interface org.opentrafficsim.core.gtu.GTU
Map<Lane,org.opentrafficsim.core.gtu.GTUDirectionality> getLanes()
void enterLane(Lane lane, org.djunits.value.vdouble.scalar.Length.Rel 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
velocity, 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 calledMap<Lane,org.djunits.value.vdouble.scalar.Length.Rel> 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.Rel> positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time.Abs 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.Rel 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.Rel position(Lane lane, org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time.Abs 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.Abs 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.Abs 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.Rel projectedPosition(Lane projectionLane, org.opentrafficsim.core.gtu.RelativePosition relativePosition, org.djunits.value.vdouble.scalar.Time.Abs 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.Abs; 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 onvoid 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–2016 Delft University of Technology. All rights reserved.