|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--SimExec.Executive
Executive class to control a 3 phase simulation in which entity records are held in a Vector (details) and from which a temporary Vector (dueList) is created at each time beat to contain those entities with events due at the current event time. Entities are added to the details Vector before the start of an aPhase and unwanted entities are also deleted then. Bs are assumed part of application entity classes, represented by integers & Cs as belonging to the application alone Revised August 2000, consistent syntax
Constructor Summary | |
Executive()
Simple constructor, sets trace and traceEverOn fields to false so that no debug.txt file is created unless it is required. |
Method Summary | |
static void |
addC(Activity thisC)
Adds a new C to the end of the CList |
static void |
addNewEntity(GEntity thisEnt)
Called in user program when a new entity is to be added. |
static void |
cPhase()
Causes Cs to be attempted until none succeed. |
static void |
destroyEntity(GEntity thisEnt)
Called in user program when an entity is to be destroyed. |
static long |
getClock()
Returns with the current value of the simulation time. |
static GEntity |
getCurrEnt()
Returns with the current entity - that is, the entity whose B is about to be processed or is being processed currently. |
static long |
getRunDuration()
Returns with the intended duration of the simulation |
static boolean |
getTrace()
Returns with the boolean value of trace. |
static boolean |
getTraceEverOn()
Returns with the boolean value of traceEverOn. |
static void |
schedule(GEntity thisEnt,
Activity nextActivity,
long time)
Used when an entity needs to be committed to a B at some future time. |
static void |
setCStarted()
Sets CStarted as true to indicate that a C has been executed during the current C phase. |
static void |
setRunDuration(long duration)
Allows the user to set the planned duration of the simulation. |
static void |
setTrace(boolean thisState)
Sets the current value of trace to the indicated boolean state. |
static void |
simulate()
Executes a complete 3 phase cycle |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Executive()
Method Detail |
public static long getClock()
public static void setRunDuration(long duration)
public static long getRunDuration()
public static void setTrace(boolean thisState)
public static boolean getTraceEverOn()
public static boolean getTrace()
public static GEntity getCurrEnt()
public static void destroyEntity(GEntity thisEnt)
public static void addNewEntity(GEntity thisEnt)
public static void schedule(GEntity thisEnt, Activity nextActivity, long time)
public static void addC(Activity thisC)
public static void setCStarted()
public static void cPhase()
public static void simulate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |