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.
 

Method Detail

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 startNode
startX - the x coordinate of the start point
startY - the y coordinate of the start point
startStreet - the street on which the start point lies
startStreetPos - the position measured in cm from the startNode of the startStreet
targetX - the x coordinate of the target point
targetY - the y coordinate of the target point
targetStreet - the street on which the target point lies
targetStreetPos - 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 endNode
penalties - 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.