AnyLogic
Expand
Font size
All Superinterfaces:
java.io.Serializable

public interface RoadDataSource
extends java.io.Serializable

Method Summary

All Methods Instance Methods Abstract Methods Default Methods 
double averageSpeed​(boolean isOnForwardSide, double offset, SpeedUnits units)
Returns the average speed on the given road direction near the specified offset
java.util.List<Agent> getCars​(boolean isOnForwardSide)
Returns ordered list of cars located on the given direction.
int nCars​(boolean isOnForwardSide)
Returns number of cars located on the given direction.
int nCars​(boolean isOnForwardSide, int laneIndex)
Returns number of cars located on the given direction.
default int queueSize​(boolean isForwardSide, int laneIndexFrom, int laneIndexTo, double offset)  
Modifier and Type Method Description

Method Detail

averageSpeed

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 otherwise
offset - offset from the beginning of road axis line
units - speed units
Returns:
average speed value

nCars

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

nCars

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 otherwise
laneIndex - zero-based index of lane. Lanes are numbered from outmost (that has index 0) to inmost
Returns:
number of cars

queueSize

@AnyLogicInternalAPI
default int queueSize​(boolean isForwardSide,
                      int laneIndexFrom,
                      int laneIndexTo,
                      double offset)

getCars

java.util.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
How can we improve this article?