edu.udo.cs.ie.cowbots.bdi.desgen
Class DefaultDesire

Package class diagram package DefaultDesire
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.bdi.desgen.CDesire
      extended by edu.udo.cs.ie.cowbots.bdi.desgen.DefaultDesire
All Implemented Interfaces:
java.lang.Comparable<CDesire>
Direct Known Subclasses:
CowbotDesire

public class DefaultDesire
extends CDesire

Default implementation of a cowbots desire.


Field Summary
protected  java.lang.Integer intensity
           
protected  ELP mitigateELP
           
protected  Literal uniqueName
           
protected  ELP updateELP
           
 
Constructor Summary
DefaultDesire(Literal uniqueName, int i)
           
DefaultDesire(Literal uniqueName, int i, ELP updateELP, ELP mitigateELP)
           
 
Method Summary
 int compareTo(CDesire o)
           
 int getIntensity()
           
protected  int getNewIntensityWithELP(IEpistemicState bel, ELP elp)
           
 Literal getUniqueName()
           
 java.lang.String toString()
           
 int updateIntensity(IEpistemicState bel)
          Updates the desires intensity based on the current agents beliefs.
 int updateMitigation(IEpistemicState bel)
          Prooves if the associated goal is fulfilled to mitigate the desires intensity.
 
Methods inherited from class edu.udo.cs.ie.cowbots.bdi.desgen.CDesire
equals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

uniqueName

protected Literal uniqueName

intensity

protected java.lang.Integer intensity

updateELP

protected ELP updateELP

mitigateELP

protected ELP mitigateELP
Constructor Detail

DefaultDesire

public DefaultDesire(Literal uniqueName,
                     int i)

DefaultDesire

public DefaultDesire(Literal uniqueName,
                     int i,
                     ELP updateELP,
                     ELP mitigateELP)
Method Detail

getIntensity

public int getIntensity()
Specified by:
getIntensity in class CDesire
Returns:
The desires current intensity

getUniqueName

public Literal getUniqueName()
Specified by:
getUniqueName in class CDesire
Returns:
The desires unique name

updateIntensity

public int updateIntensity(IEpistemicState bel)
Description copied from class: CDesire
Updates the desires intensity based on the current agents beliefs.

Specified by:
updateIntensity in class CDesire
Returns:
Updated desires intensity

updateMitigation

public int updateMitigation(IEpistemicState bel)
Description copied from class: CDesire
Prooves if the associated goal is fulfilled to mitigate the desires intensity. This usually sets intensity to zero to cause deletion of the desire.

Specified by:
updateMitigation in class CDesire
Returns:
Updated desires intensity

compareTo

public int compareTo(CDesire o)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getNewIntensityWithELP

protected int getNewIntensityWithELP(IEpistemicState bel,
                                     ELP elp)