|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.coroutine.Coroutine jsim.process.SimObject
public abstract class SimObject
The SimObject abstract class allows application specific entity classes to be derived from it (e.g., Customer). SimObject factors out features common to all entities.
Field Summary | |
---|---|
protected Variate |
branch
Variate for branching |
protected int |
cloneId
Identifier of the entity's clone |
protected boolean |
cloneStatus
Clone status of the entity |
java.awt.Color |
eColor
Entity's color for animation |
double |
eStartTime
Entity's creation time |
protected boolean |
joinWait
Status of entity waiting for join |
protected int |
priority
Entity's priority |
protected int |
simClassId
Class of an entity 'Temporary change from final variable to non-final' |
protected double |
simCost
Cost statistics collected by all entities (sample or batch). |
protected int |
simId
Unique identifier for entity |
protected static java.util.logging.Logger |
trc
Tracing messages |
Fields inherited from class jsim.coroutine.Coroutine |
---|
life, name, NORM_PRIORITY |
Constructor Summary | |
---|---|
SimObject()
Construct an entity (SimObject). |
|
SimObject(int simClassID)
Construct an entity (SimObject). |
Method Summary | |
---|---|
void |
_end()
Terminate the entity. |
int |
get_Priority()
Get the priority of the entity. |
int |
get_simClassId()
Get the class type of an entity. |
int |
getCloneId()
Return the cloneId of the SimObject |
double |
getCost()
|
java.awt.Color |
getEColor()
Return the color of the SimObject |
protected Model |
getEnvironment()
Get the environment. |
java.util.LinkedList<Coroutine> |
getLiveEntity()
Get the list containing the live entities. |
double |
getServiceCost()
|
int |
getSimId()
Return the id of the SimObject |
static void |
incLostEntities()
Increment the number of lost entities. |
boolean |
isClone()
Return the clone status of the SimObject |
void |
set_Priority(int priority)
Set the priority of the entity. |
void |
set_simClassId(int simClassId)
Set the class type of an entity. |
void |
setCloneId(int cloneId)
Set the clone Id of the entity |
void |
setCloneStatus(boolean cloneStatus)
Set the clone status of the entity |
void |
setCost(double cost)
|
void |
setEColor(java.awt.Color eColor)
Set the color of the entity |
protected void |
setEnvironment(Model env)
Set the environment. |
void |
setJoinWait(boolean joinWait)
Set the join wait status of the entity |
void |
tally(double cost)
Tally the cost statistics for entities |
boolean |
waitingOnJoin()
Return the join wait status of the SimObject |
Methods inherited from class jsim.coroutine.Coroutine |
---|
DebugPQ, end, getTime, initiateJoin, isTerminal, joinGroup, kickOut, main, pause, preempt, run, setActTime, setState, start, waitForJoin, waitIn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.logging.Logger trc
protected final int simId
protected int cloneId
protected boolean cloneStatus
protected boolean joinWait
protected int simClassId
public java.awt.Color eColor
public final double eStartTime
protected final Variate branch
protected int priority
protected double simCost
Constructor Detail |
---|
public SimObject()
env
- environment (containing model)public SimObject(int simClassID)
env
- environment (containing model)Method Detail |
---|
protected void setEnvironment(Model env)
env
- The entity's environmentprotected Model getEnvironment()
public void set_Priority(int priority)
priority
- New priority.public int get_Priority()
public void set_simClassId(int simClassId)
simClassId
- Class Id.public int get_simClassId()
public void _end()
public static void incLostEntities()
public java.util.LinkedList<Coroutine> getLiveEntity()
public int getSimId()
public void setEColor(java.awt.Color eColor)
eColor
- the color of the entitypublic java.awt.Color getEColor()
public void setCloneId(int cloneId)
cloneId
- clone Id of the entitypublic int getCloneId()
public void setCloneStatus(boolean cloneStatus)
cloneStatus
- clone Id of the entitypublic boolean isClone()
public void setJoinWait(boolean joinWait)
joinWait
- join wait status of the entitypublic boolean waitingOnJoin()
public void tally(double cost)
public double getCost()
public void setCost(double cost)
public double getServiceCost()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |