|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--elge.agent.Agent | +--elge.agent.AgentContainer | +--elge.world.WorldAgent | +--elge.world.AbstractGenerator | +--elge.world.AgentGenerator
This agent is a generator of agent in a world. It has some parameters for generating some type of agent. Than it is put into a world, where it can generate agents. There is also some degenerator :) or agent deleter :) to be made. Or everything is done by this agent?
Field Summary | |
static int |
ABS_POS
|
static int |
FIX_POS
|
static int |
REL_POS
|
static String[] |
rndPositionTypes
|
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 | |
AgentGenerator()
Creates a new instance of AgentGenerator |
Method Summary | |
protected void |
agentAction()
define this method to generate, remove or whatevery you need to do. |
protected Point |
createPosition()
This method should return a position for the new agent. |
protected void |
generateAgent()
|
protected void |
generateAgent(int num)
Generates an agent from the template and then puts it in the system... |
WorldAgent |
getAgentTemplate()
|
int |
getGeneratedAgentsCount()
How many agents were generated by now. |
int |
getMaxAgents()
|
ComboInteger |
getRndPosition()
|
double |
getRndRadius()
|
void |
init()
To do some initialization? |
void |
restart()
This method performs restarting the agent. |
void |
setAgentTemplate(WorldAgent ct)
The agent template, that should be generated... |
void |
setMaxAgents(int num)
How many agents to be generated. |
void |
setRndPosition(ComboInteger ci)
|
void |
setRndRadius(double r)
|
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, 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 |
Field Detail |
public static final int ABS_POS
public static final int REL_POS
public static final int FIX_POS
public static final String[] rndPositionTypes
Constructor Detail |
public AgentGenerator()
Method Detail |
public void setMaxAgents(int num)
public int getMaxAgents()
public double getRndRadius()
public void setRndRadius(double r)
public ComboInteger getRndPosition()
public void setRndPosition(ComboInteger ci)
public void setAgentTemplate(WorldAgent ct)
public WorldAgent getAgentTemplate()
public int getGeneratedAgentsCount()
public void init()
init
in class Agent
protected void agentAction()
AbstractGenerator
agentAction
in class AbstractGenerator
protected void generateAgent(int num)
num
- how many agents to generate on one runprotected void generateAgent()
protected Point createPosition()
public void restart()
Agent
restart
in class Agent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |