public abstract class Worker extends SimProcess
WorkStation
and processing parts (products or goods) there.
Worker is derived from SimProcess. Its lifeCycle()
must be
implemented by the user in order to specify the behavior of the Worker.SimProcess
,
Processing
,
WorkStation
Constructor and Description |
---|
Worker(Model owner,
java.lang.String name,
boolean showInTrace)
A standard constructor for a Worker needs a model he belongs to, a name
and a flag stating if trace messages of this Worker should be displayed
in the trace file.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
lifeCycle()
Override this method in a subclass of Worker to implement the Workers
specific behaviour.
|
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 Worker(Model owner, java.lang.String name, boolean showInTrace)
owner
- desmoj.Model : The model this Worker is associated to.name
- java.lang.String : The name of this Worker.showInTrace
- boolean : Flag, if trace messages of this Worker should be
displayed in the trace file or not.public abstract void lifeCycle() throws co.paralleluniverse.fibers.SuspendExecution
WorkStation
for parts to process them,
like WorkStationXY.cooperate(processing);
lifeCycle()
method starts after a Worker has been
created and activated by the scheduler. It describes the behavior of this
special Worker when he is acting alone. All action taking place when this
Worker (as a master) acts together with other SimProcess
es (as slaves) in some process cooperation is described in that special
cooperation
method of the class Processing
.lifeCycle
in class SimProcess
co.paralleluniverse.fibers.SuspendExecution