|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--SimObs.GEntity
General entity class for three phase simulation. Will be used to define the entities required in a particular simulation. GEntity needs to be known by the Executive class, since it creates several Vectors to contain GEntity objects.
Field Summary | |
protected boolean |
avail
If true, the entity is currently not committed to a B |
protected int |
entNum
Unique counter ID for this entity |
java.lang.String |
name
The name of the entity |
protected Activity |
nextB
The B in which this entity will engage when clock reaches the time cell |
protected long |
prevTime
The previous time cell of the entity |
protected long |
tCell
The time cell (time of next state change) of the entity |
protected long |
util
Total time for which the entity has been committed thus far |
Constructor Summary | |
GEntity(java.lang.String thisName)
Simple constructor. |
Method Summary | |
void |
commit(long thisTime,
Activity nextAct)
Updates the time cell, availability and next B of the entity. |
void |
doNextB()
Calls the method representing the next B. |
boolean |
getAvail()
Returns with a boolean state showing whether the entity is currently committed to a B. |
int |
getEntNum()
Returns with the number of the entity. |
java.lang.String |
getName()
Returns with the name of the entity. |
long |
getTCell()
Returns with the current value of the time cell of the entity. |
long |
getUtil()
Returns with the current utilisation of the entity. |
void |
release()
Releases an entity by putting avail to false and updating tCell. |
void |
show()
Writes information about the entity to the tracefile. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.lang.String name
protected long tCell
protected long prevTime
protected boolean avail
protected long util
protected int entNum
protected Activity nextB
Constructor Detail |
public GEntity(java.lang.String thisName)
Method Detail |
public java.lang.String getName()
public int getEntNum()
public long getTCell()
public boolean getAvail()
public void commit(long thisTime, Activity nextAct)
public void release()
public void doNextB()
public long getUtil()
public void show()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |