desmoj
Class CustomerProcess

java.lang.Object
desmoj.NamedObject
desmoj.ModelComponent
desmoj.Schedulable
desmoj.Entity
desmoj.SimProcess
desmoj.CustomerProcess
- public class CustomerProcess
- extends SimProcess
CustomerProcess is a kind of process representing a customer. He is fetching
a certain number of products from an Entrepot to use them up.
He is not doing anything special with them and so the products will be
collected by the garbage collector. To change this behavior overwrite the
method lifeCycle() in a subclass. The CustomerProcess can be
viewed as the border of the simulated system, where the products disappear.
It is intended to be used in conjunction with the DemandProcess.
CustomerProcess has two main parameters to be specified
(see the Constructor): The Entrepot where the products
are to be fetched from and the number of demanded products.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private int |
demand
The number of demanded products. |
private Entrepot |
entrepot
The Entrepot supplying the products this CustomerProcess is
demanding. |
| Fields inherited from class desmoj.Entity |
|
|
Method Summary |
void |
lifeCycle()
The CustomerProcess is fetching the given number of products from the given
Entrepot. |
| Methods inherited from class desmoj.SimProcess |
activate, activate, activateAfter, activateBefore, canCooperate, clearInterruptCode, cooperate, freeThread, getInterruptCode, getMaster, getSlaveWaitQueue, getSupervisor, getUsedResources, hold, interrupt, isBlocked, isComponent, isInterrupted, isReady, isTerminated, obtainResources, passivate, prepareTransport, reActivate, resetMaster, returnAllResources, returnResources, setBlocked, setRunning, setSlaveWaitQueue, setSupervisor, setTerminated, start |
| Methods inherited from class desmoj.Entity |
addQueueLink, getPriority, getQueueLink, isEqual, isLarger, isLargerOrEqual, isNotEqual, isSimProcess, isSmaller, isSmallerOrEqual, numQueues, removeQueueLink, schedule, scheduleAfter, scheduleBefore, setPriority |
| Methods inherited from class desmoj.Schedulable |
cancel, getEventNote, isCurrent, isScheduled, nextEntity, nextEvent, nextSchedulable, removeEventNote, rename, reSchedule, scheduledAt, setEventNote |
| 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 |
demand
private int demand
- The number of demanded products.
entrepot
private Entrepot entrepot
- The
Entrepot supplying the products this CustomerProcess is
demanding.
CustomerProcess
public CustomerProcess(Model owner,
java.lang.String name,
Entrepot supplier,
int quantity,
boolean showInTrace)
- Constructor for a CustomerProcess. The CustomerProcess is fetching a given
number of products from the given
Entrepot.
lifeCycle
public void lifeCycle()
- The CustomerProcess is fetching the given number of products from the given
Entrepot. As there are not enough products available at the
moment this CustomerProcess has to wait in a queue in the
Entrepot. The obtained products are consumed (used up),
that means all references to them are released and the product SimProcess is
activated (as the process is not terminated yet), to end its lifeCycle and
terminate by itself. Then the garbage collector can delete it.
Therefore the ComplexSimProcesses are disassembled automatically.
- Specified by:
lifeCycle in class SimProcess