|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jasi.sim.basic.control.AbstractSimListener jasi.sim.basic.control.AbstractSimController
public abstract class AbstractSimController
Basic simulation controller. An instance of this class allows to control the execution the simulation task. This simulation controller will always run as fast as possible.
Constructor Summary | |
---|---|
AbstractSimController()
|
Method Summary | ||
---|---|---|
Time |
advance(Time time,
Time next)
Request an advance of the simulation time. |
|
|
change(Element element,
java.lang.String name,
T value)
Request the change of the value of a simulation element's attribute/property. |
|
void |
createdElement(Element element)
A new simulation element has been created and registered. |
|
void |
finish(Time time)
A simulation thread has finished. |
|
double |
getSpeed()
Get the simulation speed factor, given in multiples of real-time. |
|
void |
gotException(java.lang.Exception e)
An exception occurred during simulation. |
|
|
request(Element element,
java.lang.String name,
T value)
The value of a simulation element's attribute/property is requested for reading. |
|
void |
setSpeed(double speed)
Set the simulation speed factor, given in multiples of real-time. |
|
Time |
start(Time time)
A simulation thread will be started. |
|
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class jasi.sim.basic.control.AbstractSimListener |
---|
advancedTime, changedElement, deletedElement, finishedReadingArchive, finishedSimulation, finishedWritingArchive, gotMessage, poppedEvent, pushedEvent, removedEvent, requestedElement, startedSimulation, startReadingArchive, startWritingArchive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jasi.sim.basic.control.SimListener |
---|
advancedTime, finishedReadingArchive, finishedSimulation, finishedWritingArchive, gotMessage, startedSimulation, startReadingArchive, startWritingArchive |
Methods inherited from interface jasi.sim.basic.element.ElementsListener |
---|
changedElement, deletedElement, requestedElement |
Methods inherited from interface jasi.sim.basic.event.CalendarListener |
---|
poppedEvent, pushedEvent, removedEvent |
Constructor Detail |
---|
public AbstractSimController()
Method Detail |
---|
public Time start(Time time)
start
in interface SimController
time
- The requested start time.
AbstractSimKernel.startSimulation()
public Time advance(Time time, Time next)
advance
in interface SimController
time
- The current time.next
- The requested time advance.
AbstractSimKernel.continueSimulation(jasi.sim.basic.value.Time, jasi.sim.basic.value.Time)
public void finish(Time time)
finish
in interface SimController
time
- The current time.AbstractSimKernel.finishSimulation()
public <T> boolean change(Element element, java.lang.String name, T value)
change
in interface SimController
T
- The value type.element
- The simulation element.name
- The attribute's name.value
- The new value of the attribute.
public <T> T request(Element element, java.lang.String name, T value)
request
in interface SimController
T
- The value type.element
- The simulation element.name
- The attribute's name.value
- The current value of the attribute.
public void createdElement(Element element)
createdElement
in interface ElementsListener
createdElement
in class AbstractSimListener
element
- The created simulation element.public void gotException(java.lang.Exception e)
gotException
in interface SimListener
gotException
in class AbstractSimListener
e
- The exception.public void setSpeed(double speed)
setSpeed
in interface SimController
speed
- The simulation speed factor.public double getSpeed()
getSpeed
in interface SimController
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 |