edu.udo.cs.ie.cowbots.bdi.desgen
Class CDesire
java.lang.Object
edu.udo.cs.ie.cowbots.bdi.desgen.CDesire
- All Implemented Interfaces:
- java.lang.Comparable<CDesire>
- Direct Known Subclasses:
- DefaultDesire
public abstract class CDesire
- extends java.lang.Object
- implements java.lang.Comparable<CDesire>
Abstract class for any class which represents an agents
desire. Each desire must have an unique name represented
by a Literal. When returned to other classes as needed
for intensity update, intensity of a desire should never
be less than one.
This interface also provides methods for intensity
update, one for the normal update based on the current
agents beliefs, and one for proof of mitigation, if
the associated goal is fulfilled.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
CDesire
public CDesire()
getUniqueName
public abstract Literal getUniqueName()
- Returns:
- The desires unique name
getIntensity
public abstract int getIntensity()
- Returns:
- The desires current intensity
updateIntensity
public abstract int updateIntensity(IEpistemicState bel)
- Updates the desires intensity based on the current
agents beliefs.
- Parameters:
Current
- agents beliefs for intensity update
- Returns:
- Updated desires intensity
updateMitigation
public abstract int updateMitigation(IEpistemicState bel)
- Prooves if the associated goal is fulfilled to mitigate
the desires intensity. This usually sets intensity to
zero to cause deletion of the desire.
- Parameters:
Current
- agents beliefs for mitigation
- Returns:
- Updated desires intensity
equals
public boolean equals(java.lang.Object d)
- The equals method of all desires must be overwritten to
check equality of the desires unique names.
- Overrides:
equals
in class java.lang.Object
- Parameters:
Desire
- to check equality with
- Returns:
- True, if the compared desire is equal