|
||||||||||
| 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 ActionScheduler| Method Detail |
|---|
public void abort(ScheduledOperator sa)
IOperatorScheduler
abort in interface IOperatorSchedulersa - the scheduled operator to abortpublic int calcDuration(Operator theOperator)
IOperatorScheduler
calcDuration in interface IOperatorSchedulertheOperator - the operator to work with
public int calcInterruptableDuration(Operator theOperator)
IOperatorScheduler
calcInterruptableDuration in interface IOperatorSchedulertheOperator - the Operator to work with
public void clearOperatorResults()
IOperatorScheduler
clearOperatorResults in interface IOperatorSchedulerpublic IWorldAgent getAgent()
IAgentModule
getAgent in interface IAgentModulepublic java.util.List<ScheduledOperator> getOperatorResults()
IOperatorScheduler
getOperatorResults in interface IOperatorSchedulerpublic java.util.List<ScheduledOperator> getScheduledOperators()
IOperatorScheduler
getScheduledOperators in interface IOperatorSchedulerpublic void pulse()
IOperatorScheduler
pulse in interface IOperatorSchedulerpublic boolean schedule(Operator newOperator)
IOperatorScheduler
schedule in interface IOperatorSchedulernewOperator - the operator to schedule
public java.lang.String toString()
toString in class java.lang.Objectpublic void unschedule(ScheduledOperator sa)
IOperatorScheduler
unschedule in interface IOperatorSchedulersa - the scheduled operator to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||