|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjasi.sim.basic.AbstractSimKernel
jasi.sim.user.Simulation
public final class Simulation
The simulation kernel. It is implemented as singleton by static creation of an kernel instance.
Field Summary | |
---|---|
static java.lang.String |
ARC_FILE
The simulation's default archive file name. |
Constructor Summary | |
---|---|
Simulation(SimController ctrl,
AbstractSimArchive arc,
SimListener out)
Constructor of simulation. |
Method Summary | |
---|---|
static Simulation |
kernel()
Get the instance of the simulation kernel. |
void |
run()
Run simulation and execute all events. |
void |
setEndTime(Time endTime)
Set a new ending time of this simulation. |
void |
setStartTime(Time startTime)
Set a new starting time for the simulation. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class jasi.sim.basic.AbstractSimKernel |
---|
archive, calendar, continueSimulation, controller, currentTime, elements, finishSimulation, getInstance, init, initialize, isRunning, join, proxy, readArchive, start, startSimulation, stop, tables, writeArchive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ARC_FILE
Constructor Detail |
---|
public Simulation(SimController ctrl, AbstractSimArchive arc, SimListener out)
ctrl
- The simulation's controller.arc
- The simulation's archive.out
- The simulation's output module.Method Detail |
---|
public static Simulation kernel()
public final void setStartTime(Time startTime)
startTime
- The starting time.
java.lang.IllegalStateException
- If simulation is already running or not initialized.
java.lang.IllegalArgumentException
- If the provided starting time is smaller (earlier) than
the next event's or current starting time.public final void setEndTime(Time endTime)
endTime
- The new ending time.
java.lang.IllegalStateException
- If simulation is already running or not initialized.
java.lang.IllegalArgumentException
- If the provided ending time is smaller (earlier) than the
starting time.public void run()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |