vanetsim.routing
Interface RoutingAlgorithm
- All Known Implementing Classes:
- A_Star_Algorithm
public interface RoutingAlgorithm
An interface for routing algorithms.
Method Summary |
ArrayDeque<Node> |
getRouting(int mode,
int direction,
int startX,
int startY,
Street startStreet,
double startStreetPos,
int targetX,
int targetY,
Street targetStreet,
double targetStreetPos,
Street[] penaltyStreets,
int[] penaltyDirections,
int[] penalties,
int penaltySize,
int additionalVar)
Gets a routing result. |
getRouting
ArrayDeque<Node> getRouting(int mode,
int direction,
int startX,
int startY,
Street startStreet,
double startStreetPos,
int targetX,
int targetY,
Street targetStreet,
double targetStreetPos,
Street[] penaltyStreets,
int[] penaltyDirections,
int[] penalties,
int penaltySize,
int additionalVar)
- Gets a routing result.
- Parameters:
mode
- You can handle over a mode for the routing algo here. 0
must be implemented by every algorithm.direction
- 0
=don't care about direction, -1
=from startNode to endNode, 1
=from endNode to startNodestartX
- the x coordinate of the start pointstartY
- the y coordinate of the start pointstartStreet
- the street on which the start point liesstartStreetPos
- the position measured in cm from the startNode of the startStreet
targetX
- the x coordinate of the target pointtargetY
- the y coordinate of the target pointtargetStreet
- the street on which the target point liestargetStreetPos
- the position measured in cm from the startNode of the targetStreet
penaltyStreets
- an array with all streets which have penalties.penaltyDirections
- an array with directions corresponding to penaltyStreets. 1
in the array means from endNode to startNode,
0
means both directions and -1
means from startNode to endNodepenalties
- an array with all penalties measured in cm.penaltySize
- how many penalties exist.additionalVar
- an additional variable specific to the routing algorithm.
- Returns:
- An
ArrayDeque
for returning the result. The first element will be the start node and the last will be the end node of the routing.