Navigator
Description
A class that represents a TaskExecuter's navigator. In other words, the object that manages travel tasks for the task executer.
Methods
getCost | A generic method that gets route costing information associated with a TaskExecuter traveling from some origin to some destination. |
Details
Navigator.getCost()
double getCost( Variant origin , Variant destination , Variant info ) |
Parameters
origin | Navigator-dependent parameter defining the origin. This can be the following: Default Navigator
Node Network Navigator
AGV Navigator
A* Navigator
GIS Navigator
|
destination | Navigator-dependent parameter defining the destination. This can generally take the same values as the origin parameter, with the following exceptions:
|
info | Navigator-dependent parameter to modify how the cost is calculated, as described below: AGV NavigatorIf this parameter is a reference to a TaskExecuter, it will assume that agv-dependent cost calculations are to be associated with that object traveling in its current state, most importantly its current load type. This is useful in calculating speed-based costs when speed is dependent on load type. GIS NavigatorA value of 1 will return distance, a value of 2 will return duration, and a value of 3 will return general cost. |
Description
A generic method that gets route costing information associated with a TaskExecuter traveling from some origin to some destination.
The implementation of this method is polymorphic as it depends somewhat on which navigator it is being called on. For example, a default navigator's getCost() will only work if you pass a TaskExecuter as the origin, and some other object as a destination, and it will return the same result as if you were to call distancetotravel(). On the other hand, a network navigator can take a network node as an origin and a network node as a destination. In this case, the result is the same as calling getnetworkdistance().