public class CustomerProcess extends SimProcess
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.DemandProcess
Constructor and Description |
---|
CustomerProcess(Model owner,
java.lang.String name,
Entrepot supplier,
long quantity,
boolean showInTrace)
Constructor for a CustomerProcess.
|
Modifier and Type | Method and Description |
---|---|
void |
lifeCycle()
The CustomerProcess is fetching the given number of products from the
given
Entrepot . |
activate, activate, activate, activateAfter, activateBefore, activatePreempt, cancelInterruptDelayed, canCooperate, clearInterruptCode, cooperate, getActivatedBy, getInterruptCode, getInterruptException, getMaster, getRealTimeConstraint, getSchedulingPriority, getSlaveWaitQueue, getSupervisor, hold, hold, hold, interrupt, interrupt, interruptDelayed, interruptDelayed, isBlocked, isComponent, isDelayedInterruptScheduled, isInterrupted, isRepeating, isTerminated, obtainResources, passivate, prepareTransport, reActivate, reActivate, resetMaster, returnAllResources, returnResources, setBlocked, setRealTimeConstraint, setRepeating, setSchedulingPriority, setSlaveWaitQueue
getIdentNumber, getQueueingPriority, getQueues, getScheduledEvents, isEqual, isLarger, isLargerOrEqual, isNotEqual, isQueued, isSimProcess, isSmaller, isSmallerOrEqual, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, scheduleAfter, scheduleAfter, scheduleAfter, scheduleBefore, scheduleBefore, scheduleBefore, schedulePreempt, schedulePreempt, schedulePreempt, setQueueingPriority
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, rename, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportable
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public CustomerProcess(Model owner, java.lang.String name, Entrepot supplier, long quantity, boolean showInTrace)
Entrepot
.owner
- desmoj.Model : The model this CustomerProcess is associated
to.name
- java.lang.String : The name of this CustomerProcess.supplier
- desmoj.Entrepot : The Entrepot
supplying the
products this CustomerProcess is buying.quantity
- long : The number of products this CustomerProcess is fetching
from the Entrepot
.showInTrace
- boolean : Flag, if this CustomerProcess should produce a trace
output or not.public void lifeCycle() throws SuspendExecution
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
Sim-process 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 ComplexSimProcess
es are
disassembled automatically.lifeCycle
in class SimProcess
SuspendExecution