public interface LaneStructure
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 | Interface and Description |
---|---|
static class |
LaneStructure.Entry<T extends LaneBasedObject>
Wrapper to hold lane-based object and it's distance.
|
Modifier and Type | Method and Description |
---|---|
<T extends LaneBasedObject> |
getDownstreamObjects(Class<T> clazz,
LaneBasedGTU gtu,
RelativePosition.TYPE pos)
Retrieve objects of a specific type.
|
<T extends LaneBasedObject> |
getDownstreamObjects(RelativeLane lane,
Class<T> clazz,
LaneBasedGTU gtu,
RelativePosition.TYPE pos)
Retrieve objects on a lane of a specific type.
|
<T extends LaneBasedObject> |
getDownstreamObjectsOnRoute(Class<T> clazz,
LaneBasedGTU gtu,
RelativePosition.TYPE pos,
Route route)
Retrieve objects of a specific type.
|
<T extends LaneBasedObject> |
getDownstreamObjectsOnRoute(RelativeLane lane,
Class<T> clazz,
LaneBasedGTU gtu,
RelativePosition.TYPE pos,
Route route)
Retrieve objects on a lane of a specific type.
|
SortedSet<RelativeLane> |
getExtendedCrossSection()
Returns the extended cross-section, which includes all lanes for which a first record is present.
|
LaneStructureRecord |
getFirstRecord(RelativeLane lane)
Returns the first record on the given lane.
|
LaneStructureRecord |
getRootRecord()
Returns the root record.
|
<T extends LaneBasedObject> |
getUpstreamObjects(RelativeLane lane,
Class<T> clazz,
LaneBasedGTU gtu,
RelativePosition.TYPE pos)
Retrieve objects on a lane of a specific type.
|
void |
update(DirectedLanePosition pos,
Route route,
GTUType gtuType)
Updates the underlying structure shifting the root position to the input.
|
void update(DirectedLanePosition pos, Route route, GTUType gtuType) throws GTUException
pos
- DirectedLanePosition; current position of the GTUroute
- Route; current route of the GTUgtuType
- GTUType; GTU typeGTUException
- on a problem while updating the structureLaneStructureRecord getRootRecord()
SortedSet<RelativeLane> getExtendedCrossSection()
LaneStructureRecord getFirstRecord(RelativeLane lane)
lane
- RelativeLane; lanenull
if no such record<T extends LaneBasedObject> Map<RelativeLane,SortedSet<LaneStructure.Entry<T>>> getDownstreamObjects(Class<T> clazz, LaneBasedGTU gtu, RelativePosition.TYPE pos) throws GTUException
T
- type of objects to findclazz
- Class<T>; class of objects to findgtu
- LaneBasedGTU; gtupos
- RelativePosition.TYPE; relative position to start search fromGTUException
- if lane is not in current set<T extends LaneBasedObject> SortedSet<LaneStructure.Entry<T>> getDownstreamObjects(RelativeLane lane, Class<T> clazz, LaneBasedGTU gtu, RelativePosition.TYPE pos) throws GTUException
T
- type of objects to findlane
- RelativeLane; laneclazz
- Class<T>; class of objects to findgtu
- LaneBasedGTU; gtupos
- RelativePosition.TYPE; relative position to start search fromGTUException
- if lane is not in current set<T extends LaneBasedObject> Map<RelativeLane,SortedSet<LaneStructure.Entry<T>>> getDownstreamObjectsOnRoute(Class<T> clazz, LaneBasedGTU gtu, RelativePosition.TYPE pos, Route route) throws GTUException
T
- type of objects to findclazz
- Class<T>; class of objects to findgtu
- LaneBasedGTU; gtupos
- RelativePosition.TYPE; relative position to start search fromroute
- Route; the routeGTUException
- if lane is not in current set<T extends LaneBasedObject> SortedSet<LaneStructure.Entry<T>> getDownstreamObjectsOnRoute(RelativeLane lane, Class<T> clazz, LaneBasedGTU gtu, RelativePosition.TYPE pos, Route route) throws GTUException
T
- type of objects to findlane
- RelativeLane; laneclazz
- Class<T>; class of objects to findgtu
- LaneBasedGTU; gtupos
- RelativePosition.TYPE; relative position to start search fromroute
- Route; the routeGTUException
- if lane is not in current set<T extends LaneBasedObject> SortedSet<LaneStructure.Entry<T>> getUpstreamObjects(RelativeLane lane, Class<T> clazz, LaneBasedGTU gtu, RelativePosition.TYPE pos) throws GTUException
T
- type of objects to findlane
- RelativeLane; laneclazz
- Class<T>; class of objects to findgtu
- LaneBasedGTU; gtupos
- RelativePosition.TYPE; relative position to start search fromGTUException
- if lane is not in current setCopyright © 2014–2019 Delft University of Technology. All rights reserved.