elge.world
Class AgentRemover

java.lang.Object
  |
  +--elge.agent.Agent
        |
        +--elge.agent.AgentContainer
              |
              +--elge.world.WorldAgent
                    |
                    +--elge.world.AbstractGenerator
                          |
                          +--elge.world.AgentRemover
All Implemented Interfaces:
MoveableAgent

public class AgentRemover
extends AbstractGenerator

Author:
Palino

Field Summary
 
Fields inherited from class elge.world.AbstractGenerator
EXACT_GEN, FIRST_GEN, genCycleTypes, NO_GEN, PERIOD_GEN, TICK_GEN
 
Fields inherited from class elge.agent.AgentContainer
agents, innerAgency
 
Fields inherited from class elge.agent.Agent
actualSituation, agency, agencyClass, agentClassCounter, id, name, registered
 
Fields inherited from interface elge.world.MoveableAgent
PROP_POSITION
 
Constructor Summary
AgentRemover()
          Creates a new instance of AgentRemover
 
Method Summary
protected  void agentAction()
          define this method to generate, remove or whatevery you need to do.
 int getMinAgents()
           
 int getToRemove()
           
protected  void removeAgent()
          Call the function to remove the agents...
protected  void removeAgent(int num)
           
 void restart()
          This method performs restarting the agent.
 void setMinAgents(int min)
           
 void setToRemove(int num)
           
 
Methods inherited from class elge.world.AbstractGenerator
getGenCycleType, getGenPeriod, getGenProb, getInOneStep, chooseAction, isGenerator, setGenCycleType, setGenPeriod, setGenProb, setInOneStep
 
Methods inherited from class elge.world.WorldAgent
addVetoableChangeListener, getFullName, getGenerated, getGroup, getHidden, getPosition, paint, removeVetoableChangeListener, setGenerated, setGroup, setHidden, setPosition
 
Methods inherited from class elge.agent.AgentContainer
add, add, add, agentsLife, del, getAgentCount, getAgents, life, setAgents
 
Methods inherited from class elge.agent.Agent
ask, ask, ask, createDefaultAgency, createUniqueID, getAgency, getID, getName, init, life, memorize, sense, setAgency, setAgency, setAgency, setID, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentRemover

public AgentRemover()
Creates a new instance of AgentRemover

Method Detail

restart

public void restart()
Description copied from class: Agent
This method performs restarting the agent. It should restart what wver it needs, like some counter, memory and so. A brand new simulation should be runned with it !

Overrides:
restart in class Agent

agentAction

protected void agentAction()
Description copied from class: AbstractGenerator
define this method to generate, remove or whatevery you need to do.

Specified by:
agentAction in class AbstractGenerator

setToRemove

public void setToRemove(int num)

getToRemove

public int getToRemove()

removeAgent

protected void removeAgent(int num)

removeAgent

protected void removeAgent()
Call the function to remove the agents...


getMinAgents

public int getMinAgents()

setMinAgents

public void setMinAgents(int min)