|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimKernel
hades.simulator.BatchModeSimKernel
BatchModeSimKernel -- A subclass of the event-based HADES simulation engine with the standard 'batch mode' behaviour.
Once started, the BatchModeSimKernel will dispatch Events as fast as possible. If no Events remain, the BatchModeSimKernel will enter into a sleep phase, increasing the simulation time once by 5 nsecs. and afterwards polling the EventList all 100msec, to look for further interactive (user generated) Events.
Field Summary | |
(package private) double |
eventTime
|
(package private) int |
global_errors
|
(package private) double |
sleepDeltaTime
|
static int |
t_sleep
|
(package private) long |
t0
|
(package private) long |
t1
|
(package private) static java.lang.String |
versionString
|
Fields inherited from class hades.simulator.SimKernel |
commandQueue, console, controlPanel, debug, design, ELABORATE, endTime, eventList, n_interactive, n_interactive_transferred, n_iterations, n_processed, n_scheduled, n_simulators, name, painter, PAUSED, RESET, runner, RUNNING, shouldStop, simTime, simulatorID, SINGLESTEP, state, STOPPED |
Constructor Summary | |
BatchModeSimKernel()
construct a new and idle BatchModeSimKernel |
|
BatchModeSimKernel(Design design)
construct a BatchModeSimKernel for a given Design |
|
BatchModeSimKernel(java.lang.String name)
construct a named simulation engine |
Method Summary | |
void |
initializeSimulator()
initialize the simulator: stop any running simulation, then create a new eventlist, initialize start and end times, ... |
void |
printStatus()
printStatus(): print a short message about current simulation and real times, as well as the number of scheduled and processed events. |
void |
run()
run the simulation until ready or interrupted. |
void |
runForever()
set the simulation end time to Double.MAX_VALUE, then start/continue the simulation from the current time. |
void |
sleep()
sleep for t_sleep milliseconds. |
java.lang.String |
toString()
standard identification method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static java.lang.String versionString
double eventTime
double sleepDeltaTime
long t0
long t1
int global_errors
public static int t_sleep
Constructor Detail |
public BatchModeSimKernel()
public BatchModeSimKernel(java.lang.String name)
public BatchModeSimKernel(Design design)
Method Detail |
public void runForever()
runForever
in class SimKernel
public void initializeSimulator()
SimKernel
initializeSimulator
in class SimKernel
public void run()
Variable 't0' holds the JVM clock at start of the simulation, 't1' is used for the curent JVM clock value.
run
in interface java.lang.Runnable
run
in class SimKernel
public void printStatus()
printStatus
in class SimKernel
public void sleep()
public java.lang.String toString()
toString
in class SimKernel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |