|
||||||||||
| 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.jiggle.JiggleModel
public class JiggleModel
A simple example model that illustrates how to create and display a non-grid network.
The JiggleModel creates two networks of oval and rectangular agents where each agent is linked to every other node in its network. These agents then randomly pick another member of the network and if the two agents do not overlap, the first agent moves towards the second. If they do overlap the first moves away.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.engine.SimModelImpl |
|---|
descriptors, modelManipulator |
| Constructor Summary | |
|---|---|
JiggleModel()
|
|
| Method Summary | |
|---|---|
void |
begin()
Begins a simulation run. |
void |
buildDisplay()
|
void |
buildModel()
|
java.lang.String[] |
getInitParam()
Gets the names of the initial model parameters to set. |
java.lang.String |
getName()
Gets the name of the model/simulation. |
int |
getNumOvals()
|
int |
getNumRects()
|
Schedule |
getSchedule()
Gets the Schedule created by the model. |
int |
getWorldXSize()
|
int |
getWorldYSize()
|
boolean |
isLoadFromFile()
|
static void |
main(java.lang.String[] args)
|
void |
setLoadFromFile(boolean load)
|
void |
setNumOvals(int n)
|
void |
setNumRects(int n)
|
void |
setup()
Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default. |
void |
setWorldXSize(int size)
|
void |
setWorldYSize(int size)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JiggleModel()
| Method Detail |
|---|
public void setLoadFromFile(boolean load)
public boolean isLoadFromFile()
public void setNumRects(int n)
public int getNumRects()
public void setNumOvals(int n)
public int getNumOvals()
public int getWorldXSize()
public void setWorldXSize(int size)
public int getWorldYSize()
public void setWorldYSize(int size)
public void buildModel()
public void buildDisplay()
public void begin()
SimModel
public void setup()
SimModel
public java.lang.String[] getInitParam()
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 | |||||||||