de.upb.swtpra05.group03.shuttle
Interface NavigationInterface

All Known Implementing Classes:
Navigation

public interface NavigationInterface

Interface of a navigation.

Version:
$Revision: 1.3 $

Method Summary
 void addOrderBehind(ExtendedOrder eo, TaskPlanInterface plan, int lastBeforePlan, int curTime)
          Adds the order to the taskplan after the current tasks of the taskplan, at least after the last station before useable tasks.
 void addOrderTo(ExtendedOrder eo, TaskPlanInterface plan, int lastBeforePlan, int curTime)
          Adds the order to the taskplan after the last station before useable tasks.
 GraphEdge getEdge(GraphNode start, GraphNode dest)
          Returns the execution graph edge between start and destination.
 GraphNode getLast(TaskPlanInterface plan, int lastBeforePlan)
          Gets the last station on route if the the taskplan isn't empty else the last station before useable tasks.
 GraphNode getNode(int stationId)
          Returns the execution graph node with the station id.
 TaskPlanInterface getShortestBetween(GraphNode start, GraphNode dest, de.upb.swtpra.kernel.id.OrderID id, GraphEdge not)
          Returns the shortest taskplan between start and destination without use of edge dontUse.
 TaskPlanInterface getShortestBetween(GraphNode start, GraphNode dest, de.upb.swtpra.kernel.id.OrderID id, GraphEdge not, boolean roundAbout, int curTime)
           
 

Method Detail

addOrderTo

public void addOrderTo(ExtendedOrder eo,
                       TaskPlanInterface plan,
                       int lastBeforePlan,
                       int curTime)
                throws java.lang.Exception
Adds the order to the taskplan after the last station before useable tasks. If the current taskplan contains the the load station [and the unload station] its [they're] reused if possible.

Parameters:
eo - The order to be added to the taskplan
plan - The taskplan to add the tasks for the order to
lastBeforePlan - The station to add the tasks for the order after
curTime -
Throws:
java.lang.Exception
java.lang.Exception - Thrown if there isn't a path to add the order

addOrderBehind

public void addOrderBehind(ExtendedOrder eo,
                           TaskPlanInterface plan,
                           int lastBeforePlan,
                           int curTime)
                    throws java.lang.Exception
Adds the order to the taskplan after the current tasks of the taskplan, at least after the last station before useable tasks.

Parameters:
eo - The feature to be added to the OrderBehindRoute attribute
plan - The feature to be added to the OrderBehindRoute attribute
lastBeforePlan - The feature to be added to the OrderBehindRoute attribute
curTime -
Throws:
java.lang.Exception
java.lang.Exception - Exception description not provided

getShortestBetween

public TaskPlanInterface getShortestBetween(GraphNode start,
                                            GraphNode dest,
                                            de.upb.swtpra.kernel.id.OrderID id,
                                            GraphEdge not)
                                     throws java.lang.Exception
Returns the shortest taskplan between start and destination without use of edge dontUse. Tasks will added to the returned taskplan with the given order id.

Parameters:
start - The start node of the returned taskplan
dest - The destination node of the returned taskplan
id - The order id that will be used to add tasks to the returned taskplan
not - The edge that don't will be contained in the returned taskplan.
Returns:
The shortest taskplan between start and destination, without use of the edge dontUse.
Throws:
java.lang.Exception - An Exception will be thrown if no path exists.

getShortestBetween

public TaskPlanInterface getShortestBetween(GraphNode start,
                                            GraphNode dest,
                                            de.upb.swtpra.kernel.id.OrderID id,
                                            GraphEdge not,
                                            boolean roundAbout,
                                            int curTime)
                                     throws java.lang.Exception
Parameters:
start - The start node of the returned taskplan
dest - The destination node of the returned taskplan
id - The order id that will be used to add tasks to the returned taskplan
not - The edge that don't will be contained in the returned taskplan.
roundAbout - choose the roundabout routes that are already disabled
curTime - the current time
Returns:
The shortest taskplan between start and destination, without use of the edge dontUse.
Throws:
java.lang.Exception

getNode

public GraphNode getNode(int stationId)
Returns the execution graph node with the station id.

Parameters:
stationId - The station id of the node
Returns:
The execution graph node with the station id

getEdge

public GraphEdge getEdge(GraphNode start,
                         GraphNode dest)
Returns the execution graph edge between start and destination.

Parameters:
start - The start node of returned edge
dest - The destination node of returned edge
Returns:
The (first) execution graph edge between start and destination

getLast

public GraphNode getLast(TaskPlanInterface plan,
                         int lastBeforePlan)
Gets the last station on route if the the taskplan isn't empty else the last station before useable tasks.

Parameters:
plan - The taskplan to get the last station from
lastBeforePlan - The station before useable tasks will be returned in case of empty taskplan
Returns:
The last station on route