|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Simulation executive interface.
Each Simulation contains one instance of a class implementing Executive.
Model developers use Executive implementation methods indirectly by extending classes
Simulation and Entity. These extensions inherit methods that use
Executive implementation methods.
Copyright © 2003-2004 The MITRE Corporation
Method Summary | |
void |
actionMethodInvoked(LogicalProcess lp)
Inform the executive that LogicalProcess lp
has received an action method invocation. |
Population |
createPopulation(java.lang.Class c,
LogicalProcess lp)
Create a population of class c entities for entity lp. |
java.util.Set |
getLogicalProcessesByState(State s)
Used to test Executive implementations and is not needed
by simulation developers. |
long |
getPace()
Get the minimum amount of real time that must pass before the simulation advances one unit of simulation time. |
double |
getTimeLast()
Called by LogicalProcess |
double |
getTimeNow()
Called by LogicalProcess |
void |
registerLogicalProcess(LogicalProcess lp)
Add the supplied lp to the collection of logical processes managed by an implementation of Executive. |
void |
runLogicalProcess(LogicalProcess lp)
Begin the execution of the LogicalProcess. |
void |
schedule(java.lang.reflect.Method eventMethod,
double eventDelay,
LogicalProcess lp,
java.lang.Object[] arguments)
Schedule a method for execution. |
void |
setFlow(Flow f)
|
void |
setLogger(java.util.logging.Logger l)
Provides a logger that the executive uses to log diagnostic and other error messages. |
void |
setPace(long period)
Set the minimum amount of real time that must pass before the simulation advances one unit of simulation time. |
void |
setProperties(java.util.Properties p)
|
void |
setTimeLast(double t)
Set the final value of simulation time that the Executive implementation will recognize. |
void |
startSimulation()
Begin the evolution of simulation time. |
void |
stopSimulation(LogicalProcess lp)
Stop the evolution of simulation time and end the simulation. |
java.lang.String |
version()
Returns the version of the class implementing interface Executive. |
WaitResult |
waitForEvent(Trigger[] triggers,
double backStop,
LogicalProcess lp)
Wait for a Trigger to be true or an action method invocation. |
WaitResult |
waitForTime(double t,
LogicalProcess lp)
Wait for simulation time to pass. |
Method Detail |
public java.lang.String version()
public void startSimulation()
Called by Simulation
public void stopSimulation(LogicalProcess lp)
Called by LogicalProcess
public void registerLogicalProcess(LogicalProcess lp)
Called by Simulation and LogicalProcess
lp
- public void runLogicalProcess(LogicalProcess lp)
Called by LogicalProcess
lp
- ReferenceExecutive.runLogicalProcess(LogicalProcess)
public void actionMethodInvoked(LogicalProcess lp) throws java.lang.IllegalStateException
LogicalProcess
lp
has received an action method invocation.
Called by LogicalProcess
lp
-
java.lang.IllegalStateException
public double getTimeNow()
Called by LogicalProcess
public void setTimeLast(double t)
Called by LogicalProcess
t
- public double getTimeLast()
Called by LogicalProcess
public void setPace(long period)
period
- Minimum number of real milliseconds that must pass before one
unit of simulation time passes.public long getPace()
public WaitResult waitForTime(double t, LogicalProcess lp)
Called by LogicalProcess
t
- lp
-
WaitResult
public WaitResult waitForEvent(Trigger[] triggers, double backStop, LogicalProcess lp)
Called by LogicalProcess
triggers
- backStop
- lp
-
WaitResult
public void setFlow(Flow f)
public void setProperties(java.util.Properties p)
public java.util.Set getLogicalProcessesByState(State s)
Executive
implementations and is not needed
by simulation developers.
public Population createPopulation(java.lang.Class c, LogicalProcess lp)
c
- All entities in the population must be of this class.lp
- Entity that created the population.
public void schedule(java.lang.reflect.Method eventMethod, double eventDelay, LogicalProcess lp, java.lang.Object[] arguments)
eventMethod
- Method to be invoked.eventDelay
- Amount of simulation time that must pass before eventMethod
is invoked.lp
- Entity instance that contains method eventMethod
.public void setLogger(java.util.logging.Logger l)
l
- The logger for the executive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |