|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectyass.simulation.Simulator
public abstract class Simulator
Simulator framework component in which a given simulation scenario can be simulated until such time as all completion criteria are met.
| Field Summary | |
|---|---|
protected java.util.Set<CompletionCriterion> |
completionCriteria
The criteria which must be satisfied before simulation activity can end |
protected Simulation |
simulation
The current simulation state |
| Constructor Summary | |
|---|---|
protected |
Simulator(Simulation simulation,
java.util.Set<CompletionCriterion> completionCriteria)
Constructs a new instance of Simulator with the specified
simulation state and completion criteria set (which can be empty) |
| Method Summary | |
|---|---|
void |
addCompletionCriterion(CompletionCriterion criterion)
Adds the specified completion criterion to those which must be satisfied prior to conclusion of simulation activity |
abstract void |
executeNextIteration()
Executes the next iteration of the simulation, which should bring the simulation state closer to satisfying the registered simulation completion criteria. |
java.util.Set<CompletionCriterion> |
getCompletionCriteria()
Obtains the set of simulation completion criteria |
Simulation |
getSimulation()
Obtains the current simulation state |
void |
initialise()
Initialises the simulator. |
boolean |
isComplete()
Determines if the current simulation state satisfies all criteria for cessation of simulation activity. |
void |
removeCompletionCriterion(CompletionCriterion criterion)
Removes the specified completion criterion from those which must be satisfied prior to conclusion of simulation activity |
void |
tidyup()
Tidies up the simulator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Set<CompletionCriterion> completionCriteria
protected Simulation simulation
| Constructor Detail |
|---|
protected Simulator(Simulation simulation,
java.util.Set<CompletionCriterion> completionCriteria)
Simulator with the specified
simulation state and completion criteria set (which can be empty)
completionCriteria - the criteria by which simulation completion
is to be judgedsimulation - the simulation state| Method Detail |
|---|
public abstract void executeNextIteration()
throws SimulationException
SimulationException - if a problem is encountered while updating
the simulation statepublic boolean isComplete()
public void initialise()
throws SimulationException
SimulationException - if the simulation state cannot be initialised
public void tidyup()
throws SimulationException
SimulationException - if tidyup cannot be completedpublic void addCompletionCriterion(CompletionCriterion criterion)
criterion - the completion criterionpublic void removeCompletionCriterion(CompletionCriterion criterion)
criterion - the completion criterionpublic java.util.Set<CompletionCriterion> getCompletionCriteria()
public Simulation getSimulation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||