|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.Navigation
Navigation module which is responsible for all topology relatated tasks.
| Field Summary | |
private DoubleHashtable |
connectionHash
contains the Connection-Objects. |
private Dijkstra |
dijkstraAlgorithm
the dijkstraEngine |
private java.util.Hashtable |
executionGraph
|
(package private) static java.util.logging.Logger |
log
|
private java.util.HashMap |
shortestPaths
|
private ShuttleDataInterface |
shuttleData
The shuttle data |
private TaskPlanInterface |
taskPlan
The taskplan |
| Constructor Summary | |
Navigation()
Constructor |
|
| Method Summary | |
void |
addOrderBehind(ExtendedOrder order,
TaskPlanInterface aTaskPlan,
int lastStationBeforeUseableTasks,
int currentTime)
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 order,
TaskPlanInterface aTaskPlan,
int lastStationBeforeUseableTasks,
int currentTime)
Adds the order to the taskplan after the last station before useable tasks. |
protected void |
checkForUnuseableNodes()
|
GraphEdge |
getEdge(GraphNode start,
GraphNode destination)
Returns the execution graph edge between start and destination. |
GraphNode |
getLast(TaskPlanInterface aTaskPlan,
int lastStationBeforeUseableTasks)
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 destination,
de.upb.swtpra.kernel.id.OrderID orderId,
GraphEdge dontUse)
Returns the shortest taskplan between start and destination without use of edge dontUse. |
TaskPlanInterface |
getShortestBetween(GraphNode start,
GraphNode destination,
de.upb.swtpra.kernel.id.OrderID orderId,
GraphEdge dontUse,
boolean roundAbout,
int currentTime)
|
void |
init(ModuleContainerInterface container)
Initializes this module. |
void |
newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
React on the received message of the shuttle or not. |
protected void |
parseTopology(de.upb.swtpra.kernel.TopologyData td)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Dijkstra dijkstraAlgorithm
private java.util.Hashtable executionGraph
private DoubleHashtable connectionHash
private java.util.HashMap shortestPaths
static final java.util.logging.Logger log
private ShuttleDataInterface shuttleData
private TaskPlanInterface taskPlan
| Constructor Detail |
public Navigation()
| Method Detail |
public void init(ModuleContainerInterface container)
Module
init in interface Modulecontainer - The module manager which contain all modulespublic void newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
ShuttleModule
newMessageReceived in interface ShuttleModulemsg - The received message of the shuttle
public void addOrderTo(ExtendedOrder order,
TaskPlanInterface aTaskPlan,
int lastStationBeforeUseableTasks,
int currentTime)
throws java.lang.Exception
NavigationInterface
addOrderTo in interface NavigationInterfaceorder - aTaskPlan - lastStationBeforeUseableTasks - currentTime -
java.lang.Exception - Thrown if there isn't a path to add the order
public void addOrderBehind(ExtendedOrder order,
TaskPlanInterface aTaskPlan,
int lastStationBeforeUseableTasks,
int currentTime)
throws java.lang.Exception
NavigationInterface
addOrderBehind in interface NavigationInterfaceorder - aTaskPlan - lastStationBeforeUseableTasks - currentTime -
java.lang.Exception
public TaskPlanInterface getShortestBetween(GraphNode start,
GraphNode destination,
de.upb.swtpra.kernel.id.OrderID orderId,
GraphEdge dontUse)
throws java.lang.Exception
NavigationInterface
getShortestBetween in interface NavigationInterfacestart - destination - orderId - dontUse -
java.lang.Exception
public TaskPlanInterface getShortestBetween(GraphNode start,
GraphNode destination,
de.upb.swtpra.kernel.id.OrderID orderId,
GraphEdge dontUse,
boolean roundAbout,
int currentTime)
throws java.lang.Exception
getShortestBetween in interface NavigationInterfacestart - destination - orderId - roundAbout - dontUse - currentTime -
java.lang.Exceptionprotected void parseTopology(de.upb.swtpra.kernel.TopologyData td)
td - protected void checkForUnuseableNodes()
public GraphNode getNode(int stationId)
NavigationInterface
getNode in interface NavigationInterfacestationId - The station id of the node
public GraphEdge getEdge(GraphNode start,
GraphNode destination)
NavigationInterface
getEdge in interface NavigationInterfacestart - The start node of returned edgedestination - The destination node of returned edge
public GraphNode getLast(TaskPlanInterface aTaskPlan,
int lastStationBeforeUseableTasks)
NavigationInterface
getLast in interface NavigationInterfaceaTaskPlan - The taskplan to get the last station fromlastStationBeforeUseableTasks - The station before useable tasks will be returned in case of
empty taskplan
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||