Package com.anylogic.engine
- Type Parameters:
T
- a route data an agent will use to calculate a route length and determine its position on a route
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IGISRouteProvider
,INetwork<N,
P>
- All Known Implementing Classes:
AbstractGISRouteProvider
,AbstractGISRouteProviderWithCache
,AbstractNetwork
,AnyLogicOnlineRouteProvider
,BRouterOSMRouteProvider
,ConveyorNetwork
,GISNetwork
,GraphHopperRouteProvider
,JSONRouteProvider
,Network
,PlainGISRouteProvider
,YoursOSMRouteProvider
public interface IRouteProvider<T extends IPathData> extends Serializable
This is a base interface to create a route for an agent.
Route provider has several implementations: network, straight movement,
specific movement in GIS space such as movement by roads.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
-
IPathData
Agent
Modifier and Type | Method | Description |
---|---|---|
double | getDistance |
Creates a route from one point to another and calculates its length.
|
double | getLength |
Retrieves length of the specified route.
|
T | getPathData |
Retrieves the route data an agent will use to calculate
the route length and determine its position on the route
by calling
getLength(IPathData) and
getPositionAtOffset(IPathData, double, Position) respectively. |
Position | getPositionAtOffset |
Retrieves agent's position on the route.
|
T getPathData(Point startPoint, Point endPoint, T out)
Retrieves the route data an agent will use to calculate
the route length and determine its position on the route
by calling
getLength(IPathData)
and
getPositionAtOffset(IPathData, double, Position)
respectively.- Parameters:
startPoint
- Start point of the routeendPoint
- End point of the routeout
- This parameter was added to prevent creating additional instances of route data objects; could benull
- Returns:
- the route data to move an agent between specified points;
- See Also:
-
IPathData
Position getPositionAtOffset(T pathData, double reverseOffset, Position out)
Retrieves agent's position on the route.
double getDistance(Point startPoint, Point endPoint)
Creates a route from one point to another and calculates its length.
Uses route provider to create a route.
- Parameters:
startPoint
- Start point of a routeendPoint
- End point of a route- Returns:
- length of a route from one point to another
double getLength(T pathData)
Retrieves length of the specified route.
- Parameters:
pathData
- the route data- Returns:
- length of the specified route