|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvs.worldagent.BasicOperatorScheduler
public class BasicOperatorScheduler
Implements a basic version of the ActionScheduler interface.
IOperatorScheduler
Constructor Summary | |
---|---|
BasicOperatorScheduler(IWorldAgent owner)
Constructor |
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 |
IWorldAgent |
getAgent()
To get the Agent |
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 |
java.lang.String |
toString()
|
void |
unschedule(ScheduledOperator sa)
Removes a scheduled operator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicOperatorScheduler(IWorldAgent owner)
owner
- the Agent that owns this ActionSchedulerMethod Detail |
---|
public void abort(ScheduledOperator sa)
IOperatorScheduler
abort
in interface IOperatorScheduler
sa
- the scheduled operator to abortpublic int calcDuration(Operator theOperator)
IOperatorScheduler
calcDuration
in interface IOperatorScheduler
theOperator
- the operator to work with
public int calcInterruptableDuration(Operator theOperator)
IOperatorScheduler
calcInterruptableDuration
in interface IOperatorScheduler
theOperator
- the Operator to work with
public void clearOperatorResults()
IOperatorScheduler
clearOperatorResults
in interface IOperatorScheduler
public IWorldAgent getAgent()
IAgentModule
getAgent
in interface IAgentModule
public java.util.List<ScheduledOperator> getOperatorResults()
IOperatorScheduler
getOperatorResults
in interface IOperatorScheduler
public java.util.List<ScheduledOperator> getScheduledOperators()
IOperatorScheduler
getScheduledOperators
in interface IOperatorScheduler
public void pulse()
IOperatorScheduler
pulse
in interface IOperatorScheduler
public boolean schedule(Operator newOperator)
IOperatorScheduler
schedule
in interface IOperatorScheduler
newOperator
- the operator to schedule
public java.lang.String toString()
toString
in class java.lang.Object
public void unschedule(ScheduledOperator sa)
IOperatorScheduler
unschedule
in interface IOperatorScheduler
sa
- the scheduled operator to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |