br.pucrio.inf.les.bdijade.core
Class BDIAgent.BDIInterpreter

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.SimpleBehaviour
          extended by jade.core.behaviours.CyclicBehaviour
              extended by br.pucrio.inf.les.bdijade.core.BDIAgent.BDIInterpreter
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
BDIAgent

 class BDIAgent.BDIInterpreter
extends jade.core.behaviours.CyclicBehaviour

This class is a CyclicBehaviour that runs during all the BDIAgent life in order to provide the reasoning engine.

Author:
ingrid

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
jade.core.behaviours.Behaviour.RunnableChangedEvent
 
Field Summary
private  org.apache.commons.logging.Log log
           
private static long serialVersionUID
           
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
BDIAgent.BDIInterpreter(BDIAgent bdiAgent)
           
 
Method Summary
 void action()
          This method is a variation of the BDI-interpreter cycle of the BDI architecture.
 BDIAgent getMyAgent()
           
 
Methods inherited from class jade.core.behaviours.CyclicBehaviour
done
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

log

private org.apache.commons.logging.Log log
Constructor Detail

BDIAgent.BDIInterpreter

public BDIAgent.BDIInterpreter(BDIAgent bdiAgent)
Method Detail

action

public void action()
This method is a variation of the BDI-interpreter cycle of the BDI architecture. It first removes from the intention set the ones that achieved their end, i.e. achieved, no longer desired and unachievable, and notifies goal listeners about this event. Then, it selects from the goal set the goals that is going to become intentions, end fires the selected goals to be executed (create intentions for them). Finally, from the set of intentions whose last executed plan has failed, it selects the ones to try one plans. So, this method dispatches the Intention.tryToAchive() method of this intentions. The not selected intentions is set as no longer desired.

Specified by:
action in class jade.core.behaviours.Behaviour
See Also:
Behaviour.action()

getMyAgent

public BDIAgent getMyAgent()