vs.worldagent
Interface IOperatorScheduler

All Superinterfaces:
IAgentModule
All Known Implementing Classes:
BasicOperatorScheduler

public interface IOperatorScheduler
extends IAgentModule

Interface for operator scheduler

Author:
swartjes Created on 15-jul-2005

Method Summary
 void abort(ScheduledOperator sa)
          Aborts a scheduled operator
 int calcDuration(Operator theOperator)
          Calculates the duration of given Action in a certain knowledge context
 int calcInterruptableDuration(Operator theOperator)
          Calculates the interruptableDuration of given Operator in a certain knowledge context
 void clearOperatorResults()
          Clears the history of scheduled actions
 java.util.List<ScheduledOperator> getOperatorResults()
          Returns the history of scheduled actions, including their state (like aborted or finished)
 java.util.List<ScheduledOperator> getScheduledOperators()
          Returns the list of scheduled actions
 void pulse()
          Increases the time step and handles everything that has to be done in response to it
 boolean schedule(Operator newOperator)
          Schedules an operator
 void unschedule(ScheduledOperator sa)
          Removes a scheduled operator
 
Methods inherited from interface vs.IAgentModule
getAgent
 

Method Detail

abort

void abort(ScheduledOperator sa)
Aborts a scheduled operator

Parameters:
sa - the scheduled operator to abort

calcDuration

int calcDuration(Operator theOperator)
Calculates the duration of given Action in a certain knowledge context

Parameters:
theOperator - the operator to work with
Returns:
the duration in timesteps

calcInterruptableDuration

int calcInterruptableDuration(Operator theOperator)
Calculates the interruptableDuration of given Operator in a certain knowledge context

Parameters:
theOperator - the Operator to work with
Returns:
the interruptableDuration in timesteps

clearOperatorResults

void clearOperatorResults()
Clears the history of scheduled actions


getOperatorResults

java.util.List<ScheduledOperator> getOperatorResults()
Returns the history of scheduled actions, including their state (like aborted or finished)

Returns:
a List of previously scheduled actions

getScheduledOperators

java.util.List<ScheduledOperator> getScheduledOperators()
Returns the list of scheduled actions


pulse

void pulse()
Increases the time step and handles everything that has to be done in response to it


schedule

boolean schedule(Operator newOperator)
Schedules an operator

Parameters:
newOperator - the operator to schedule
Returns:
true if operator was succesfully scheduled and false otherwise

unschedule

void unschedule(ScheduledOperator sa)
Removes a scheduled operator

Parameters:
sa - the scheduled operator to remove