public class SimpleModel extends java.util.Observable
SimpleModel(AnimatorBuilder)
.Modifier and Type | Field and Description |
---|---|
private java.util.List<Agent> |
agents |
private Animator |
animator |
private boolean |
disposed |
private double |
time |
Constructor and Description |
---|
SimpleModel(AnimatorBuilder builder)
Creates a model to be visualized using the
builder . |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Throw away this model.
|
void |
run(int duration)
Run the simulation for
duration model seconds. |
private void |
setup(AnimatorBuilder builder) |
public SimpleModel(AnimatorBuilder builder)
builder
.
If the builder is null, no visualization is performed.
Each road has one Car
.public void run(int duration)
duration
model seconds.public void dispose()
private void setup(AnimatorBuilder builder)