Package com.anylogic.engine.markup
- All Superinterfaces:
Serializable
public interface RoadDataSource extends Serializable
Modifier and Type | Method | Description |
---|---|---|
double | averageSpeed |
Returns the average speed on the given road direction near the
specified offset
|
List<Agent> | getCars |
Returns ordered list of cars located on the given direction.
|
int | nCars |
Returns number of cars located on the given direction.
|
int | nCars |
Returns number of cars located on the given direction.
|
default int | queueSize |
double averageSpeed(boolean isOnForwardSide, double offset, SpeedUnits units)
Returns the average speed on the given road direction near the
specified offset
- Parameters:
isOnForwardSide
-true
if direction is along road axis line,false
otherwiseoffset
- offset from the beginning of road axis lineunits
- speed units- Returns:
- average speed value
int nCars(boolean isOnForwardSide)
Returns number of cars located on the given direction.
- Parameters:
isOnForwardSide
-true
if direction is along road axis line,false
otherwise- Returns:
- number of cars
int nCars(boolean isOnForwardSide, int laneIndex)
Returns number of cars located on the given direction.
- Parameters:
isOnForwardSide
-true
if direction is along road axis line,false
otherwiselaneIndex
- zero-based index of lane. Lanes are numbered from outmost (that has index 0) to inmost- Returns:
- number of cars
@AnyLogicInternalAPI default int queueSize(boolean isForwardSide, int laneIndexFrom, int laneIndexTo, double offset)
List<Agent> getCars(boolean isOnForwardSide)
Returns ordered list of cars located on the given direction.
The first car in the list is the nearest one to the exit point from road
(seems like be the first one to exit the road, if there is no
acceleration)
- Parameters:
isOnForwardSide
-true
if direction is along road axis line,false
otherwise- Returns:
- ordered list of cars