public class RollingLaneStructureRecord extends Object implements LaneStructureRecord, Serializable
Copyright (c) 2013-2019 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 |
RollingLaneStructureRecord.RecordLink
Link between records that defines the dependence of start position and hence how this is updated as the GTU moves.
|
| Constructor and Description |
|---|
RollingLaneStructureRecord(Lane lane,
GTUDirectionality direction,
Length startDistance) |
RollingLaneStructureRecord(Lane lane,
GTUDirectionality direction,
RollingLaneStructureRecord startDistanceSource,
RollingLaneStructureRecord.RecordLink recordLink)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNext(RollingLaneStructureRecord next) |
void |
addPrev(RollingLaneStructureRecord prev) |
boolean |
allowsRoute(Route route,
GTUType gtuType)
Returns whether this lane allows the route to be followed.
|
boolean |
allowsRouteAtEnd(Route route,
GTUType gtuType)
Returns whether the end of this lane allows the route to be followed.
|
void |
clearCutOffEnd()
Clears the cut-off at the end.
|
void |
clearCutOffStart()
Clears the cut-off at the start.
|
Length |
getCutOffEnd()
Returns distance where the structure was cut-off.
|
Length |
getCutOffStart()
Returns distance where the structure was cut-off.
|
GTUDirectionality |
getDirection()
Returns the direction of travel.
|
Node |
getFromNode()
Returns the the 'from' node of the link belonging to this lane, in the driving direction.
|
Lane |
getLane()
Returns the lane.
|
RollingLaneStructureRecord |
getLeft()
Returns the left LSR or null if not available.
|
Length |
getLength()
Returns the length of the lane.
|
List<RollingLaneStructureRecord> |
getNext()
Returns a list of next lanes.
|
List<RollingLaneStructureRecord> |
getPrev()
Returns a list of previous lanes.
|
RollingLaneStructureRecord |
getRight()
Returns the right LSR or null if not available.
|
Length |
getStartDistance()
Returns the distance from a reference to the start of this lane, negative for upstream distance.
|
Node |
getToNode()
Returns the the 'to' node of the link belonging to this lane, in the driving direction.
|
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 |
isDeadEnd()
Returns whether the record forms a dead-end.
|
boolean |
isDownstreamBranch()
Returns whether the record is part of the downstream branch.
|
boolean |
isLinkMerge() |
boolean |
isLinkSplit()
Deprecated.
|
boolean |
legalLeft()
Returns whether a left lane change is legal.
|
boolean |
legalRight()
Returns whether a right lane change is legal.
|
boolean |
physicalLeft()
Returns whether a left lane change is physically possible.
|
boolean |
physicalRight()
Returns whether a right lane change is physically possible.
|
void |
setCutOffEnd(Length cutOffEnd)
Sets this record as being cut-off, i.e.
|
void |
setCutOffStart(Length cutOffStart)
Sets this record as being cut-off, i.e.
|
void |
setLeft(RollingLaneStructureRecord leftRecord,
GTUType gtuType) |
void |
setRight(RollingLaneStructureRecord rightRecord,
GTUType gtuType) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpossibleLeft, possibleRightgetDistanceToPositionpublic RollingLaneStructureRecord(Lane lane, GTUDirectionality direction, RollingLaneStructureRecord startDistanceSource, RollingLaneStructureRecord.RecordLink recordLink)
lane - Lane; lanedirection - GTUDirectionality; direction of travel for the GTUstartDistanceSource - RollingLaneStructureRecord; record on which the start distance is basedrecordLink - RecordLink; link type to sourcepublic RollingLaneStructureRecord(Lane lane, GTUDirectionality direction, Length startDistance)
lane - Lane; the lane of the LSRdirection - GTUDirectionality; the direction on which we process this lanestartDistance - Length; distance to start of the record, negative for backwardspublic Length getLength()
getLength in interface LaneRecord<LaneStructureRecord>public final Node getFromNode()
getFromNode in interface LaneStructureRecordpublic final Node getToNode()
getToNode in interface LaneStructureRecord@Deprecated public final boolean isLinkSplit()
public final boolean isLinkMerge()
public final boolean allowsRoute(Route route, GTUType gtuType) throws NetworkException
allowsRoute in interface LaneStructureRecordroute - Route; the route to followgtuType - GTUType; gtu typeNetworkException - if no destination nodepublic final boolean allowsRouteAtEnd(Route route, GTUType gtuType) throws NetworkException
allowsRouteAtEnd in interface LaneStructureRecordroute - Route; the route to followgtuType - GTUType; gtu typeNetworkException - if no destination nodepublic final RollingLaneStructureRecord getLeft()
getLeft in interface LaneStructureRecordpublic final void setLeft(RollingLaneStructureRecord leftRecord, GTUType gtuType)
leftRecord - RollingLaneStructureRecord; set the left LSR or null if not available. Left and right are relative to
the <b>driving</b> direction.gtuType - GTUType; GTU typepublic final boolean legalLeft()
legalLeft in interface LaneStructureRecordpublic final boolean physicalLeft()
physicalLeft in interface LaneStructureRecordpublic final RollingLaneStructureRecord getRight()
getRight in interface LaneStructureRecordpublic final void setRight(RollingLaneStructureRecord rightRecord, GTUType gtuType)
rightRecord - RollingLaneStructureRecord; set the right LSR or null if not available. Left and right are relative to
the <b>driving</b> directiongtuType - GTUType; GTU typepublic final boolean legalRight()
legalRight in interface LaneStructureRecordpublic final boolean physicalRight()
physicalRight in interface LaneStructureRecordpublic final List<RollingLaneStructureRecord> getNext()
getNext in interface LaneRecord<LaneStructureRecord>public final void addNext(RollingLaneStructureRecord next) throws GTUException
next - RollingLaneStructureRecord; a next LSRs to add. Next is relative to the driving direction, not to the design
line direction.GTUException - if the records is cut-off at the endpublic final List<RollingLaneStructureRecord> getPrev()
getPrev in interface LaneRecord<LaneStructureRecord>public final void addPrev(RollingLaneStructureRecord prev) throws GTUException
prev - RollingLaneStructureRecord; a previous LSRs to add. Previous is relative to the driving direction, not to the
design line direction.GTUException - if the records is cut-off at the startpublic final void setCutOffEnd(Length cutOffEnd) throws GTUException
cutOffEnd - Length; where this lane was cut-off (in the driving direction) resulting in no next lanesGTUException - if there are next recordspublic final void setCutOffStart(Length cutOffStart) throws GTUException
cutOffStart - Length; where this lane was cut-off (in the driving direction) resulting in no prev lanesGTUException - if there are previous recordspublic final boolean isCutOffEnd()
isCutOffEnd in interface LaneStructureRecordpublic final boolean isCutOffStart()
isCutOffStart in interface LaneStructureRecordpublic final Length getCutOffEnd()
public final Length getCutOffStart()
public final void clearCutOffEnd()
public final void clearCutOffStart()
public final boolean isDeadEnd()
isDeadEnd in interface LaneStructureRecordpublic final Lane getLane()
getLane in interface LaneRecord<LaneStructureRecord>public final GTUDirectionality getDirection()
getDirection in interface LaneRecord<LaneStructureRecord>public final Length getStartDistance()
getStartDistance in interface LaneRecord<LaneStructureRecord>public boolean isDownstreamBranch()
true.isDownstreamBranch in interface LaneRecord<LaneStructureRecord>Copyright © 2014–2019 Delft University of Technology. All rights reserved.