desmoj
Class Resource

java.lang.Object
desmoj.NamedObject
desmoj.ModelComponent
desmoj.Resource
- public class Resource
- extends ModelComponent
Resources are objects needed by SimProcesses to perform certain tasks.
Every Resource has its unique ID number, so it can be identified.
Each Resource belongs to a certain resource category (resource pool) and
has the status ready (can be used) or outOfOrder if it is
broken down.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private long |
idNumber
The ID number of this Resource object. |
private boolean |
outOfOrder
Indicating if this resource is out of order (broken down) and therefore
can not be used at the moment. |
private static long |
resourceNumber
The number identifying a Resource. |
private Res |
resPool
The reference to the resource pool this resource belongs to. |
|
Constructor Summary |
Resource(Model ownerModel,
java.lang.String name,
Res resPool,
boolean showInTrace)
Constructs a resource object with the given String as name and the given
model as the associated owner of this component. |
|
Method Summary |
long |
getidNumber()
Returns the ID number of this resource object. |
Res |
getResPool()
Returns the resource pool (Res) this resource belongs to. |
boolean |
isOutOfOrder()
Is this resource out of order at the moment and therefore can not be used? |
void |
setOutOfOrder(boolean brokenDown)
This resource can be set to out of order (true) if it is
broken down and can not be used at the moment. |
| Methods inherited from class desmoj.ModelComponent |
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, setOwner, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn |
resPool
private Res resPool
- The reference to the resource pool this resource belongs to.
resourceNumber
private static long resourceNumber
- The number identifying a Resource. Because it is a class variable each
Resource will get its own ID number starting by zero.
idNumber
private long idNumber
- The ID number of this Resource object.
outOfOrder
private boolean outOfOrder
- Indicating if this resource is out of order (broken down) and therefore
can not be used at the moment.
Resource
public Resource(Model ownerModel,
java.lang.String name,
Res resPool,
boolean showInTrace)
- Constructs a resource object with the given String as name and the given
model as the associated owner of this component.
Components can only be created after the corresponding model object has
been instantiated.
The default preset for the showInTrace option is
false.
getidNumber
public long getidNumber()
- Returns the ID number of this resource object.
getResPool
public Res getResPool()
- Returns the resource pool (Res) this resource belongs to.
isOutOfOrder
public boolean isOutOfOrder()
- Is this resource out of order at the moment and therefore can not be used?
setOutOfOrder
public void setOutOfOrder(boolean brokenDown)
- This resource can be set to out of order (
true) if it is
broken down and can not be used at the moment.