edu.udo.cs.ie.cowbots.bdi.desgen
Class DefaultDesire
java.lang.Object
edu.udo.cs.ie.cowbots.bdi.desgen.CDesire
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.
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 |
uniqueName
protected Literal uniqueName
intensity
protected java.lang.Integer intensity
updateELP
protected ELP updateELP
mitigateELP
protected ELP mitigateELP
DefaultDesire
public DefaultDesire(Literal uniqueName,
int i)
DefaultDesire
public DefaultDesire(Literal uniqueName,
int i,
ELP updateELP,
ELP mitigateELP)
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)