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 |
---|---|
Lane |
bestAccessibleAdjacentLane(Lane currentLane,
org.opentrafficsim.core.network.LateralDirectionality lateralDirection,
org.djunits.value.vdouble.scalar.Length.Rel longitudinalPosition)
Determine whether there is a lane to the left or to the right of this lane, which is accessible from this lane, or null
if no lane could be found.
|
org.djunits.value.vdouble.scalar.Time.Rel |
deltaTimeForDistance(org.djunits.value.vdouble.scalar.Length.Rel distance)
Determine the time since last evaluation when this GTU has covered the specified distance from the position of the last
evaluation time.
|
void |
enterLane(Lane lane,
org.djunits.value.vdouble.scalar.Length.Rel position)
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.
|
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration() |
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration(org.djunits.value.vdouble.scalar.Time.Abs when) |
GTUFollowingModel |
getGTUFollowingModel()
Retrieve the GTU following model of this LaneBasedGTU.
|
LaneChangeUrgeGTUColorer.LaneChangeDistanceAndDirection |
getLaneChangeDistanceAndDirection()
Return the distance available for the next needed lane change and the lateral direction of that lane change.
|
org.djunits.value.vdouble.scalar.Time.Abs |
getLastEvaluationTime() |
org.djunits.value.vdouble.scalar.Speed |
getLateralVelocity() |
org.djunits.value.vdouble.scalar.Speed |
getLongitudinalVelocity()
v(t) = v0 + (t - t0) * a.
|
org.djunits.value.vdouble.scalar.Speed |
getLongitudinalVelocity(org.djunits.value.vdouble.scalar.Time.Abs when)
Return the speed of this GTU at the specified time.
|
org.djunits.value.vdouble.scalar.Time.Abs |
getNextEvaluationTime() |
HeadwayGTU |
headway(Lane lane,
org.djunits.value.vdouble.scalar.Length.Rel maxDistance)
Determine by what distance the front of this GTU is behind the rear an other GTU, or the rear of this GTU is ahead of the
front of an other GTU.
|
HeadwayGTU |
headway(org.djunits.value.vdouble.scalar.Length.Rel maxDistance)
Determine which GTU in front of this GTU, or behind this GTU.
|
void |
leaveLane(Lane lane)
Unregister the GTU from a lane.
|
Set<LaneBasedGTU> |
parallel(Lane lane,
org.djunits.value.vdouble.scalar.Time.Abs when)
Determine which GTUs are parallel with us on another lane, based on fractional positions.
|
Set<LaneBasedGTU> |
parallel(org.opentrafficsim.core.network.LateralDirectionality lateralDirection,
org.djunits.value.vdouble.scalar.Time.Abs when)
Determine which GTUs are parallel with us in a certain lateral direction, based on fractional positions.
|
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.
|
org.djunits.value.vdouble.scalar.Time.Abs |
timeAtDistance(org.djunits.value.vdouble.scalar.Length.Rel distance)
Determine the time when this GTU will have covered the specified distance from the position of the last evaluation time.
|
org.djunits.value.vdouble.scalar.Speed getLongitudinalVelocity()
org.djunits.value.vdouble.scalar.Speed getLongitudinalVelocity(org.djunits.value.vdouble.scalar.Time.Abs when)
when
- time for which the speed must be returnedorg.djunits.value.vdouble.scalar.Acceleration getAcceleration()
getAcceleration
in interface org.opentrafficsim.core.gtu.GTU
org.djunits.value.vdouble.scalar.Acceleration getAcceleration(org.djunits.value.vdouble.scalar.Time.Abs when)
when
- time for which the speed must be returnedorg.djunits.value.vdouble.scalar.Speed getLateralVelocity()
org.djunits.value.vdouble.scalar.Time.Abs getLastEvaluationTime()
org.djunits.value.vdouble.scalar.Time.Abs getNextEvaluationTime()
void enterLane(Lane lane, org.djunits.value.vdouble.scalar.Length.Rel position) throws org.opentrafficsim.core.network.NetworkException
lane
- the lane to add to the list of lanes on which the GTU is registered.position
- the position on the lane.org.opentrafficsim.core.network.NetworkException
- on network inconsistencyvoid leaveLane(Lane lane)
lane
- the lane to remove from the list of lanes on which the GTU is registered.Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> positions(org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.network.NetworkException
relativePosition
- the position on the vehicle relative to the reference point.org.opentrafficsim.core.network.NetworkException
- 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.network.NetworkException
relativePosition
- the position on the vehicle relative to the reference point.when
- the future time for which to calculate the positions.org.opentrafficsim.core.network.NetworkException
- 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.network.NetworkException
lane
- the position on this lane will be returned.relativePosition
- the position on the vehicle relative to the reference point.org.opentrafficsim.core.network.NetworkException
- 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.network.NetworkException
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.network.NetworkException
- when the vehicle is not on the given lane.Map<Lane,Double> fractionalPositions(org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.network.NetworkException
relativePosition
- the position on the vehicle relative to the reference point.org.opentrafficsim.core.network.NetworkException
- 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.network.NetworkException
relativePosition
- the position on the vehicle relative to the reference point.when
- the future time for which to calculate the positions.org.opentrafficsim.core.network.NetworkException
- 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.network.NetworkException
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.network.NetworkException
- when the vehicle is not on the given lane.double fractionalPosition(Lane lane, org.opentrafficsim.core.gtu.RelativePosition relativePosition) throws org.opentrafficsim.core.network.NetworkException
lane
- the position on this lane will be returned.relativePosition
- the position on the vehicle relative to the reference point.org.opentrafficsim.core.network.NetworkException
- 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.network.NetworkException
projectionLane
- Lane; the lane onto which the position of this GTU must be projectedrelativePosition
- RelativePosition; the point on this GTU that must be projectedwhen
- DoubleScalar.Abs<TimeUnit>; the time for which to project the position of this GTUorg.opentrafficsim.core.network.NetworkException
- when projectionLane it not in any of the CrossSectionLink that the GTU is onHeadwayGTU headway(org.djunits.value.vdouble.scalar.Length.Rel maxDistance) throws org.opentrafficsim.core.network.NetworkException
maxDistance
- the maximum distance to look for the nearest GTU; positive values search forwards; negative values
search backwardsorg.opentrafficsim.core.network.NetworkException
- when there is an error with the next lanes in the network.HeadwayGTU headway(Lane lane, org.djunits.value.vdouble.scalar.Length.Rel maxDistance) throws org.opentrafficsim.core.network.NetworkException
new DoubleScalar.Rel<LengthUnit>(Double.MAX_VALUE, METER)
is returned. The search will extend into
successive lanes if the maxDistance is larger than the length of the lane.lane
- the lane to look for another GTUmaxDistance
- the maximum distance to look for; if positive, the search is forwards; if negative, the search is
backwardsorg.opentrafficsim.core.network.NetworkException
- when the vehicle's route is inconclusive or vehicles are not registered correctly on their lanesSet<LaneBasedGTU> parallel(Lane lane, org.djunits.value.vdouble.scalar.Time.Abs when) throws org.opentrafficsim.core.network.NetworkException
lane
- the lane to look for parallel (partial or full overlapping) GTUs.when
- the future time for which to calculate the headwayorg.opentrafficsim.core.network.NetworkException
- when the vehicle's route is inconclusive, when vehicles are not registered correctly on their
lanes, or when the given lane is not parallel to one of the lanes where we are registered.Set<LaneBasedGTU> parallel(org.opentrafficsim.core.network.LateralDirectionality lateralDirection, org.djunits.value.vdouble.scalar.Time.Abs when) throws org.opentrafficsim.core.network.NetworkException
lateralDirection
- the direction of the adjacent lane(s) to look for parallel (partial or full overlapping) GTUs.when
- the future time for which to calculate the headwayorg.opentrafficsim.core.network.NetworkException
- when the vehicle's route is inconclusive, when vehicles are not registered correctly on their
lanes, or when there are no lanes parallel to one of the lanes where we are registered in the given
direction.Lane bestAccessibleAdjacentLane(Lane currentLane, org.opentrafficsim.core.network.LateralDirectionality lateralDirection, org.djunits.value.vdouble.scalar.Length.Rel longitudinalPosition)
currentLane
- the lane to look for the best accessible adjacent lanelateralDirection
- the direction (LEFT, RIGHT) to look atlongitudinalPosition
- DoubleScalar.Rel<LengthUnit>; the position of the GTU along this Laneorg.djunits.value.vdouble.scalar.Time.Abs timeAtDistance(org.djunits.value.vdouble.scalar.Length.Rel distance)
distance
- DoubleScalar.Rel<LengthUnit>; the distanceorg.djunits.value.vdouble.scalar.Time.Rel deltaTimeForDistance(org.djunits.value.vdouble.scalar.Length.Rel distance)
distance
- DoubleScalar.Rel<LengthUnit>; the distanceGTUFollowingModel getGTUFollowingModel()
LaneChangeUrgeGTUColorer.LaneChangeDistanceAndDirection getLaneChangeDistanceAndDirection()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.