modelling
Class EatingAgent.IsHungry

java.lang.Object
  extended bymodelling.Satisfactor
      extended bymodelling.EatingAgent.IsHungry
Enclosing class:
EatingAgent

protected class EatingAgent.IsHungry
extends Satisfactor

Satisfactor informing on the feeding level.


Field Summary
protected  float hunger
           
protected  float hungryCeil
           
protected  float hungryFloor
           
protected  boolean unfiniteHungry
           
 
Constructor Summary
EatingAgent.IsHungry()
          Constructor for an infinite hunger
EatingAgent.IsHungry(float hunger, float hungryFloor, float hungryCeil)
          Constructor for a countable hunger.
 
Method Summary
 void changeHunger(float difference)
          Allows to set the current hunger.
 float getReserves()
          Return the amongs of food avaiable.
 int heuristic()
          Informs of the achievement of this goal.
 boolean isSatisfying()
          Returns wether the agent may still eat.
 
Methods inherited from class modelling.Satisfactor
and, not, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hunger

protected float hunger

hungryFloor

protected float hungryFloor

hungryCeil

protected float hungryCeil

unfiniteHungry

protected boolean unfiniteHungry
Constructor Detail

EatingAgent.IsHungry

public EatingAgent.IsHungry(float hunger,
                            float hungryFloor,
                            float hungryCeil)
Constructor for a countable hunger.


EatingAgent.IsHungry

public EatingAgent.IsHungry()
Constructor for an infinite hunger

Method Detail

isSatisfying

public boolean isSatisfying()
Returns wether the agent may still eat.

Specified by:
isSatisfying in class Satisfactor

heuristic

public int heuristic()
Informs of the achievement of this goal.

Overrides:
heuristic in class Satisfactor

getReserves

public float getReserves()
Return the amongs of food avaiable.


changeHunger

public void changeHunger(float difference)
Allows to set the current hunger.