|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.Execution
The Execution module of the shuttle which will execute all assigned orders.
| Field Summary | |
private ShuttleControlInterface |
agent
The shuttle control |
protected EfficientBitSet |
assignedOrders
Collection which holds all order ids which were assigned to the shuttle |
private int |
currentState
The current state the shuttle is in |
protected EfficientBitSet |
evaluatedOrders
Collection which holds all order ids the Execution evaluated |
protected EfficientBitSet |
loadedOrders
Collection which holds all order ids the shuttle has currently loaded |
private static java.util.logging.Logger |
log
Logger for debugging |
private NavigationInterface |
navigation
The navigation |
private OrderContainerInterface |
orderContainer
The order container |
private PluginMessengerInterface |
plugin
The plugin |
private RouteManagementInterface |
routeManagement
The route management |
private ShuttleDataInterface |
shuttleData
Container class, contains the constants, currentStretch, etc. |
private TaskPlanInterface |
taskPlan
Collection which holds all Task the shuttle has to process |
protected static int |
TASKPLANEMPTY
Constant which is used to assure the correct usage of any time value |
protected static int |
TIMEVARIANCE
Constant which is used to assure the correct usage of any time value |
private EfficientBitSet |
wakeUpTimes
|
| Fields inherited from interface de.upb.swtpra05.group03.shuttle.ExecutionInterface |
LOADING_STATE, MOVING_STATE, NOTHINGTODO_STATE, REPAIRING_STATE, UNLOADING_STATE |
| Fields inherited from interface de.upb.swtpra05.group03.shuttle.OrderEvaluaterInterface |
NOTEVALUATEABLE |
| Constructor Summary | |
Execution()
Constructor for class Execution |
|
| Method Summary | |
private void |
assignOrder(de.upb.swtpra.kernel.message.AssignOrder msg)
Called if execution receives an AssignOrder message |
private void |
connectionDefect(de.upb.swtpra.kernel.message.ConnectionDefectMessage msg)
Called if execution receives a ConnectionDefectMessage and handles the defect connection. |
private void |
connectionOkResponse(de.upb.swtpra.kernel.message.ConnectionOkResponse msg)
Called if execution receives a ConnectionOkResponse message |
private void |
connectionStatus(de.upb.swtpra.kernel.message.ConnectionStatusMessage msg)
Informs the route managment about a disabled connection. |
int |
evaluateOrderCosts(de.upb.swtpra.kernel.id.OrderID id,
int currentTime)
Evaluates the costs to add an order to the current route and returns the value |
private void |
executeNextTask()
Executes the next task out of the tasks collection whether it is active and there are tasks |
EfficientBitSet |
getAssignedOrders()
Returns the current assigned order ids as bit set. |
EfficientBitSet |
getEvaluatedOrders()
Returns the evaluated order ids as bit set. |
int |
getLoad()
Returns the current load of the shuttle. |
EfficientBitSet |
getLoadedOrders()
Returns the current load order ids as bit set. |
int |
getState()
Returns the current shuttle state. |
int |
getStation()
Returns the current station id |
void |
init(ModuleContainerInterface container)
Initializes this module. |
private void |
insertedInQueue(de.upb.swtpra.kernel.message.InsertedInQueueMessage msg)
Called if execution receives a InsertedInQueueMessage |
private void |
invalidDestination(de.upb.swtpra.kernel.message.InvalidDestinationMessage msg)
Called if execution receives a InvalidDestinationMessage |
private void |
loadShuttleError(de.upb.swtpra.kernel.message.LoadShuttleErrorMessage msg)
Called if execution receives a LoadShuttleErrorMessage |
private void |
maxStretchLimitReached(de.upb.swtpra.kernel.message.MaxStretchLimitReachedMessage msg)
Called if execution receives a MaxStretchLimitReachedMessage |
void |
moveToStation(int stationID)
Move the shuttle from current station to stationID if the taskplan is emtpy. |
void |
newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
React on the received message of the shuttle or not. |
void |
offerUnsuccessful(de.upb.swtpra.kernel.id.OrderID id)
Is called to notify the shuttle that an offer is supposed to be unsuccessful |
private void |
paidPenalty(de.upb.swtpra.kernel.message.PaidPenaltyMessage msg)
Calle if execution receives a PaidPenaltyMessage |
private void |
shuttleArrived(de.upb.swtpra.kernel.message.ShuttleArrivedMessage msg)
Called if execution receives a ShuttleArrivedMessage |
private void |
shuttleLoaded(de.upb.swtpra.kernel.message.ShuttleLoaded msg)
Called if execution receives a ShuttleLoaded message |
private void |
shuttleMoving(de.upb.swtpra.kernel.message.ShuttleMovingMessage msg)
Called if execution receives a ShuttleMovingMessage |
private void |
shuttleRepaired(de.upb.swtpra.kernel.message.ShuttleRepaired msg)
Called if execution receives a ShuttleRepaired message |
private void |
shuttleStatus(de.upb.swtpra.kernel.message.ShuttleStatus msg)
Called if execution receives a ShuttleStatus message |
private void |
shuttleUnloaded(de.upb.swtpra.kernel.message.ShuttleUnLoadedMessage msg)
Called if execution receives a ShuttleUnLoadedMessage |
private void |
stationNotReachable(de.upb.swtpra.kernel.message.StationNotReachableMessage msg)
Called if execution receives a StationNotReachableMessage |
private void |
unloadShuttleError(de.upb.swtpra.kernel.message.UnLoadShuttleErrorMessage msg)
Called if execution receives a UnLoadShuttleErrorMessage |
private void |
wakeUpCall(de.upb.swtpra.kernel.message.WakeUpCallMessage msg)
Called if execution receives a WakeUpCallMessage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int TASKPLANEMPTY
protected static final int TIMEVARIANCE
protected EfficientBitSet evaluatedOrders
protected EfficientBitSet assignedOrders
protected EfficientBitSet loadedOrders
private ShuttleControlInterface agent
private NavigationInterface navigation
private RouteManagementInterface routeManagement
private PluginMessengerInterface plugin
private OrderContainerInterface orderContainer
private ShuttleDataInterface shuttleData
private int currentState
private TaskPlanInterface taskPlan
private EfficientBitSet wakeUpTimes
private static final java.util.logging.Logger log
| Constructor Detail |
public Execution()
| 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 shuttlepublic void offerUnsuccessful(de.upb.swtpra.kernel.id.OrderID id)
UnsuccessfulOfferInterface
offerUnsuccessful in interface UnsuccessfulOfferInterfaceid - The order if for which the offer was sent
public int evaluateOrderCosts(de.upb.swtpra.kernel.id.OrderID id,
int currentTime)
OrderEvaluaterInterface
evaluateOrderCosts in interface OrderEvaluaterInterfaceid - The order id of the order to evaluatecurrentTime - The current time
public int getState()
ExecutionInterface
getState in interface ExecutionInterfaceprivate void assignOrder(de.upb.swtpra.kernel.message.AssignOrder msg)
msg - The AssignOrder messageprivate void connectionOkResponse(de.upb.swtpra.kernel.message.ConnectionOkResponse msg)
msg - The ConnectionOkResponse messageprivate void shuttleMoving(de.upb.swtpra.kernel.message.ShuttleMovingMessage msg)
msg - The ShuttleMovingMessageprivate void shuttleArrived(de.upb.swtpra.kernel.message.ShuttleArrivedMessage msg)
msg - The ShuttleArrivedMessageprivate void shuttleLoaded(de.upb.swtpra.kernel.message.ShuttleLoaded msg)
msg - The ShuttleLoaded messageprivate void shuttleUnloaded(de.upb.swtpra.kernel.message.ShuttleUnLoadedMessage msg)
msg - The ShuttleUnLoadedMessageprivate void shuttleRepaired(de.upb.swtpra.kernel.message.ShuttleRepaired msg)
msg - The ShuttleRepaired messageprivate void loadShuttleError(de.upb.swtpra.kernel.message.LoadShuttleErrorMessage msg)
msg - The LoadShuttleErrorMessageprivate void unloadShuttleError(de.upb.swtpra.kernel.message.UnLoadShuttleErrorMessage msg)
msg - The UnLoadShuttleErrorMessageprivate void insertedInQueue(de.upb.swtpra.kernel.message.InsertedInQueueMessage msg)
msg - The InsertedInQueueMessageprivate void invalidDestination(de.upb.swtpra.kernel.message.InvalidDestinationMessage msg)
msg - The InvalidDestinationMessageprivate void stationNotReachable(de.upb.swtpra.kernel.message.StationNotReachableMessage msg)
msg - The StationNotReachableMessageprivate void maxStretchLimitReached(de.upb.swtpra.kernel.message.MaxStretchLimitReachedMessage msg)
msg - The MaxStretchLimitReachedMessageprivate void connectionDefect(de.upb.swtpra.kernel.message.ConnectionDefectMessage msg)
msg - The ConnectionDefectMessageprivate void wakeUpCall(de.upb.swtpra.kernel.message.WakeUpCallMessage msg)
msg - The WakeUpCallMessageprivate void shuttleStatus(de.upb.swtpra.kernel.message.ShuttleStatus msg)
msg - The ShuttleStatus messageprivate void paidPenalty(de.upb.swtpra.kernel.message.PaidPenaltyMessage msg)
msg - The PaidPenaltyMessageprivate void executeNextTask()
public int getLoad()
ExecutionInterface
getLoad in interface ExecutionInterfacepublic EfficientBitSet getLoadedOrders()
ExecutionInterface
getLoadedOrders in interface ExecutionInterfacepublic EfficientBitSet getAssignedOrders()
ExecutionInterface
getAssignedOrders in interface ExecutionInterfacepublic EfficientBitSet getEvaluatedOrders()
ExecutionInterface
getEvaluatedOrders in interface ExecutionInterfacepublic int getStation()
ExecutionInterface
getStation in interface ExecutionInterfacepublic void moveToStation(int stationID)
ExecutionInterface
moveToStation in interface ExecutionInterfacestationID - id where the shuttle has to moveprivate void connectionStatus(de.upb.swtpra.kernel.message.ConnectionStatusMessage msg)
msg - The connection status message which contains the information about the disabled connection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||