public class LaneStructureRecord extends Object implements Serializable
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.
| Constructor and Description |
|---|
LaneStructureRecord(Lane lane,
org.opentrafficsim.core.gtu.GTUDirectionality direction,
org.djunits.value.vdouble.scalar.Length startDistance) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNext(LaneStructureRecord next) |
void |
addPrev(LaneStructureRecord prev) |
boolean |
allowsRoute(org.opentrafficsim.core.network.route.Route route,
org.opentrafficsim.core.gtu.GTUType gtuType)
Returns whether this lane allows the route to be followed.
|
boolean |
allowsRouteAtEnd(org.opentrafficsim.core.network.route.Route route,
org.opentrafficsim.core.gtu.GTUType gtuType)
Returns whether the end of this lane allows the route to be followed.
|
org.djunits.value.vdouble.scalar.Length |
getCutOffEnd()
Returns distance where the structure was cut-off.
|
org.djunits.value.vdouble.scalar.Length |
getCutOffStart()
Returns distance where the structure was cut-off.
|
org.opentrafficsim.core.gtu.GTUDirectionality |
getDirection() |
org.djunits.value.vdouble.scalar.Length |
getDistanceToPosition(org.djunits.value.vdouble.scalar.Length longitudinalPosition)
Returns total distance towards the object at the given position.
|
org.opentrafficsim.core.network.Node |
getFromNode() |
Lane |
getLane() |
LaneStructureRecord |
getLeft() |
List<LaneStructureRecord> |
getNext() |
List<LaneStructureRecord> |
getPrev() |
LaneStructureRecord |
getRight() |
org.djunits.value.vdouble.scalar.Length |
getStartDistance() |
org.opentrafficsim.core.network.Node |
getToNode() |
boolean |
isCutOffEnd()
Returns whether this lane has no next records as the lane structure was cut-off.
|
boolean |
isCutOffStart()
Returns whether this lane has no previous records as the lane structure was cut-off.
|
boolean |
isLinkMerge() |
boolean |
isLinkSplit() |
void |
setCutOffEnd(org.djunits.value.vdouble.scalar.Length cutOffEnd)
Sets this record as being cut-off, i.e.
|
void |
setCutOffStart(org.djunits.value.vdouble.scalar.Length cutOffStart)
Sets this record as being cut-off, i.e.
|
void |
setLeft(LaneStructureRecord left) |
void |
setNextList(List<LaneStructureRecord> nextList) |
void |
setPrevList(List<LaneStructureRecord> prevList) |
void |
setRight(LaneStructureRecord right) |
String |
toString() |
public LaneStructureRecord(Lane lane, org.opentrafficsim.core.gtu.GTUDirectionality direction, org.djunits.value.vdouble.scalar.Length startDistance)
lane - the lane of the LSRdirection - the direction on which we process this lanestartDistance - distance to start of the record, negative for backwardspublic final org.opentrafficsim.core.network.Node getFromNode()
public final org.opentrafficsim.core.network.Node getToNode()
public final org.djunits.value.vdouble.scalar.Length getDistanceToPosition(org.djunits.value.vdouble.scalar.Length longitudinalPosition)
longitudinalPosition - position on the design linepublic final boolean isLinkSplit()
public final boolean isLinkMerge()
public final boolean allowsRoute(org.opentrafficsim.core.network.route.Route route,
org.opentrafficsim.core.gtu.GTUType gtuType)
throws org.opentrafficsim.core.network.NetworkException
route - Route; the route to followgtuType - GTUType; gtu typeorg.opentrafficsim.core.network.NetworkException - if no destination nodepublic final boolean allowsRouteAtEnd(org.opentrafficsim.core.network.route.Route route,
org.opentrafficsim.core.gtu.GTUType gtuType)
throws org.opentrafficsim.core.network.NetworkException
route - Route; the route to followgtuType - GTUType; gtu typeorg.opentrafficsim.core.network.NetworkException - if no destination nodepublic final LaneStructureRecord getLeft()
public final void setLeft(LaneStructureRecord left)
left - set the left LSR or null if not available. Left and right are relative to the driving direction.public final LaneStructureRecord getRight()
public final void setRight(LaneStructureRecord right)
right - set the right LSR or null if not available. Left and right are relative to the driving directionpublic final List<LaneStructureRecord> getNext()
public final void setNextList(List<LaneStructureRecord> nextList) throws org.opentrafficsim.core.gtu.GTUException
nextList - set the next LSRs. The list is empty if no LSRs are available. Next is relative to the driving direction,
not to the design line direction.org.opentrafficsim.core.gtu.GTUException - if the records is cut-off at the endpublic final void addNext(LaneStructureRecord next) throws org.opentrafficsim.core.gtu.GTUException
next - a next LSRs to add. Next is relative to the driving direction, not to the design line direction.org.opentrafficsim.core.gtu.GTUException - if the records is cut-off at the endpublic final List<LaneStructureRecord> getPrev()
public final void setPrevList(List<LaneStructureRecord> prevList) throws org.opentrafficsim.core.gtu.GTUException
prevList - set the next LSRs. The list is empty if no LSRs are available. Previous is relative to the driving
direction, not to the design line direction.org.opentrafficsim.core.gtu.GTUException - if the records is cut-off at the startpublic final void addPrev(LaneStructureRecord prev) throws org.opentrafficsim.core.gtu.GTUException
prev - a previous LSRs to add. Previous is relative to the driving direction, not to the design line direction.org.opentrafficsim.core.gtu.GTUException - if the records is cut-off at the startpublic final void setCutOffEnd(org.djunits.value.vdouble.scalar.Length cutOffEnd)
throws org.opentrafficsim.core.gtu.GTUException
cutOffEnd - where this lane was cut-off (in the driving direction) resulting in no prev lanesorg.opentrafficsim.core.gtu.GTUException - if there are next recordspublic final void setCutOffStart(org.djunits.value.vdouble.scalar.Length cutOffStart)
throws org.opentrafficsim.core.gtu.GTUException
cutOffStart - where this lane was cut-off (in the driving direction) resulting in no next lanesorg.opentrafficsim.core.gtu.GTUException - if there are previous recordspublic final boolean isCutOffEnd()
public final boolean isCutOffStart()
public final org.djunits.value.vdouble.scalar.Length getCutOffEnd()
public final org.djunits.value.vdouble.scalar.Length getCutOffStart()
public final Lane getLane()
public final org.opentrafficsim.core.gtu.GTUDirectionality getDirection()
public final org.djunits.value.vdouble.scalar.Length getStartDistance()
Copyright © 2014–2017 Delft University of Technology. All rights reserved.