|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.process.DynamicNode jsim.process.Server jsim.process.Facility
public class Facility
The Facility class allows service facilities to be created. A Facility object consists of a set of tokens (service units) feed by a common queue.
Nested Class Summary | |
---|---|
protected class |
Facility.Line
Waiting line for entities waiting to use the facility. |
Nested classes/interfaces inherited from class jsim.process.Server |
---|
Server.TokenVec |
Field Summary |
---|
Fields inherited from class jsim.process.Server |
---|
tokenV |
Fields inherited from class jsim.process.DynamicNode |
---|
costs, duration, occupancy, outgoing, props, trc |
Constructor Summary | |
---|---|
Facility(int id,
Prop props,
java.util.LinkedList<Coroutine> waitQueue,
Transport[] outgoing,
AnimationQueue queue)
Construct a Facility. |
|
Facility(Prop props,
java.util.LinkedList<Coroutine> waitQueue,
Transport[] outgoing)
Construct a Facility. |
Method Summary | |
---|---|
void |
contract()
Remove a service unit (token) from the facility. |
void |
expand()
Add a service unit (token) to the facility. |
Statistic[] |
getNodeStats()
Get all statistics for this node. |
SimObject |
preempt(int tokenNum)
Preempt the service of the entity being served by token. |
void |
pushBack(int tokenNum)
Preempt the service of the entity being served by token and push it back unto the queue. |
int |
queueLength()
Get the length of the facility's wait queue. |
void |
request(SimObject entity)
Request a token (service unit). |
void |
use(SimObject entity)
This method causes the SimObject entity to use the server. |
void |
use(SimObject entity,
double service,
double cost)
This method causes the SimObject entity to use the server. |
Methods inherited from class jsim.process.Server |
---|
getId, preempt, setId |
Methods inherited from class jsim.process.DynamicNode |
---|
getOutgoing, getProps, setBatchProperties, setPrimary, setProps |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Facility(Prop props, java.util.LinkedList<Coroutine> waitQueue, Transport[] outgoing)
property
- properties of nodelocation
- position of nodewaitQueue
- where entities waitoutgoing
- outgoing transportspublic Facility(int id, Prop props, java.util.LinkedList<Coroutine> waitQueue, Transport[] outgoing, AnimationQueue queue)
property
- properties of nodelocation
- position of nodewaitQueue
- where entities waitoutgoing
- outgoing transportsMethod Detail |
---|
public Statistic[] getNodeStats()
getNodeStats
in class DynamicNode
public int queueLength()
public void request(SimObject entity)
request
in class Server
entity
- the SimObject (entity) requesting servicepublic void use(SimObject entity, double service, double cost)
use
in class Server
entity
- the SimObject trying to use a serverservice
- service timepublic void use(SimObject entity)
use
in class Server
entity
- the SimObject trying to use a serverpublic SimObject preempt(int tokenNum)
tokenNum
- preempt the service of this token
public void pushBack(int tokenNum)
tokenNum
- preempt the service of this tokenpublic void expand()
expand
in class Server
public void contract()
contract
in class Server
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |