VANET Simulator
 All Classes Functions Variables
Public Member Functions | List of all members
vanetsim.routing.RoutingAlgorithm Interface Referenceabstract
Inheritance diagram for vanetsim.routing.RoutingAlgorithm:
vanetsim.routing.A_Star.A_Star_Algorithm

Public Member Functions

abstract ArrayDeque< NodegetRouting (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)
 

Detailed Description

An interface for routing algorithms.

Member Function Documentation

abstract ArrayDeque<Node> vanetsim.routing.RoutingAlgorithm.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 
)
pure virtual

Gets a routing result.

Parameters
modeYou can handle over a mode for the routing algo here. 0 must be implemented by every algorithm.
direction0=don't care about direction, -1=from startNode to endNode, 1=from endNode to startNode
startXthe x coordinate of the start point
startYthe y coordinate of the start point
startStreetthe street on which the start point lies
startStreetPosthe position measured in cm from the startNode of the startStreet
targetXthe x coordinate of the target point
targetYthe y coordinate of the target point
targetStreetthe street on which the target point lies
targetStreetPosthe position measured in cm from the startNode of the targetStreet
penaltyStreetsan array with all streets which have penalties.
penaltyDirectionsan 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
penaltiesan array with all penalties measured in cm.
penaltySizehow many penalties exist.
additionalVaran 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.

Implemented in vanetsim.routing.A_Star.A_Star_Algorithm.


The documentation for this interface was generated from the following file: