vs.worldagent
Class BasicWorldAgent

java.lang.Object
  extended by jade.core.Agent
      extended by jade.gui.GuiAgent
          extended by vs.rationalagent.RationalAgent
              extended by vs.worldagent.BasicWorldAgent
All Implemented Interfaces:
jade.core.TimerListener, java.io.Serializable, java.lang.Runnable, IAgent, IRationalAgent, IWorldAgent

public class BasicWorldAgent
extends RationalAgent
implements IWorldAgent

World Agent

Author:
swartjes Created on 20-jul-2005
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.Agent
jade.core.Agent.Interrupted
 
Field Summary
static java.lang.String PROLOG_FILE
           
static int SHOWGRAPH
           
 
Fields inherited from class vs.rationalagent.RationalAgent
CHARACTER_SERVICE, CLEAR_KB, CONSULT, EXIT, LOAD_KB, PLOT_SERVICE, QUERY_KB, SAVE_KB, TEST_KB, TRACER_SERVICE, WORLD_SERVICE
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
BasicWorldAgent()
           
 
Method Summary
 IOperatorScheduler getOperatorScheduler()
          Retrieves the Operator Scheduler
 jade.core.AID getPlotAgent()
          Retrieves the Plot Agent that is registered to the World Agent
 int getTime()
          Gets the world time (in time steps)
 boolean handlePerformOperator(PerformOperator po)
          Handle incoming operators
 void narrate(java.lang.String txt)
           
 void pulse(int roundNumber)
          Start the next time step
 void setPlotAgent(jade.core.AID agent)
          Sets the Plot Agent registering to the World Agent
 void setup()
          override jade.core.Agent.setup
 
Methods inherited from class vs.rationalagent.RationalAgent
addEventListener, findServiceType, fireEvent, genCID, getAgent, getCodec, getKnowledgeManager, getOntology, getSniffer, getStoryDomain, getTracer, removeEventListener, setTracer, takeDown, trace, trace, writeConsole, writeGui
 
Methods inherited from class jade.gui.GuiAgent
postGuiEvent
 
Methods inherited from class jade.core.Agent
addBehaviour, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vs.rationalagent.IRationalAgent
getKnowledgeManager, writeGui
 
Methods inherited from interface vs.IAgent
addEventListener, findServiceType, fireEvent, genCID, getAgent, getCodec, getLocalName, getOntology, getTracer, removeEventListener, setTracer, trace, trace
 

Field Detail

SHOWGRAPH

public static final int SHOWGRAPH
See Also:
Constant Field Values

PROLOG_FILE

public static final java.lang.String PROLOG_FILE
See Also:
Constant Field Values
Constructor Detail

BasicWorldAgent

public BasicWorldAgent()
Method Detail

getOperatorScheduler

public IOperatorScheduler getOperatorScheduler()
Description copied from interface: IWorldAgent
Retrieves the Operator Scheduler

Specified by:
getOperatorScheduler in interface IWorldAgent

getPlotAgent

public jade.core.AID getPlotAgent()
Description copied from interface: IWorldAgent
Retrieves the Plot Agent that is registered to the World Agent

Specified by:
getPlotAgent in interface IWorldAgent

getTime

public int getTime()
Description copied from interface: IRationalAgent
Gets the world time (in time steps)

Specified by:
getTime in interface IRationalAgent
Returns:
the time

handlePerformOperator

public boolean handlePerformOperator(PerformOperator po)
Description copied from interface: IWorldAgent
Handle incoming operators

Specified by:
handlePerformOperator in interface IWorldAgent

pulse

public void pulse(int roundNumber)
Description copied from interface: IWorldAgent
Start the next time step

Specified by:
pulse in interface IWorldAgent
Parameters:
roundNumber - an int representing the round number (given by Plot Agent's NextRound object)

setPlotAgent

public void setPlotAgent(jade.core.AID agent)
Description copied from interface: IWorldAgent
Sets the Plot Agent registering to the World Agent

Specified by:
setPlotAgent in interface IWorldAgent

narrate

public void narrate(java.lang.String txt)

setup

public void setup()
override jade.core.Agent.setup

Overrides:
setup in class RationalAgent