|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.engine.SimModelImpl
uchicago.src.repastdemos.sugarscape.SugarModel
public class SugarModel
An partial implementation of the Sugar Scape simulation from _Growing Artificial Societies_ by Epstein, Joshua M and Axtell, Robert. This implements rules G, R, and M from chapter II. The source code is heavily annotated as example of a simulation built using the Repast toolkit. See the html API documentation for the details of the framework objects.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.engine.SimModelImpl |
|---|
descriptors, modelManipulator |
| Constructor Summary | |
|---|---|
SugarModel()
|
|
| Method Summary | |
|---|---|
void |
addNewAgent()
|
void |
agentBirth(SugarAgent agent)
|
void |
agentDeath(SugarAgent agent)
|
void |
begin()
Begins a simulation run. |
void |
birthAgents()
|
SugarAgent |
getAgentAt(int x,
int y)
|
java.lang.String[] |
getInitParam()
Gets the names of the initial model parameters to set. |
int |
getMaxDeathAge()
|
int |
getMaxInitialSugar()
|
int |
getMaxMetabolism()
|
int |
getMaxVision()
|
int |
getMinDeathAge()
|
int |
getMinInitialSugar()
|
java.lang.String |
getName()
Gets the name of the model/simulation. |
int |
getNumAgents()
|
boolean |
getReplacement()
|
Schedule |
getSchedule()
Gets the Schedule created by the model. |
boolean |
isWrite()
|
static void |
main(java.lang.String[] args)
|
void |
moveAgent(SugarAgent agent,
int x,
int y)
|
void |
reapAgents()
|
void |
setMaxDeathAge(int age)
|
void |
setMaxInitialSugar(int maxInitSugar)
|
void |
setMaxMetabolism(int maxMeta)
|
void |
setMaxVision(int maxVis)
|
void |
setMinDeathAge(int age)
|
void |
setMinInitialSugar(int minInitSugar)
|
void |
setNumAgents(int num)
|
void |
setReplacement(boolean isReplaced)
|
void |
setup()
Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default. |
void |
setWrite(boolean write)
|
void |
shuffleAgents()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SugarModel()
| Method Detail |
|---|
public boolean isWrite()
public void setWrite(boolean write)
write - The write to set.public void shuffleAgents()
public void addNewAgent()
public void agentBirth(SugarAgent agent)
public void birthAgents()
public void agentDeath(SugarAgent agent)
public SugarAgent getAgentAt(int x,
int y)
public void reapAgents()
public void moveAgent(SugarAgent agent,
int x,
int y)
public int getNumAgents()
public void setNumAgents(int num)
public int getMaxMetabolism()
public void setMaxMetabolism(int maxMeta)
public int getMaxVision()
public void setMaxVision(int maxVis)
public int getMaxInitialSugar()
public void setMaxInitialSugar(int maxInitSugar)
public int getMinDeathAge()
public void setMinDeathAge(int age)
public int getMaxDeathAge()
public void setMaxDeathAge(int age)
public boolean getReplacement()
public void setReplacement(boolean isReplaced)
public int getMinInitialSugar()
public void setMinInitialSugar(int minInitSugar)
public java.lang.String[] getInitParam()
SimModel
public void begin()
SimModel
public void setup()
SimModel
public Schedule getSchedule()
SimModel
public java.lang.String getName()
SimModel
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||