public abstract class ArrivalProcess<S extends SimProcess> extends SimProcess
ArrivalProcess
is some kind of source for
SimProcess
es. It makes them arrive from the 'outside world'
in the system of interest. So it can be viewed as the border of the system
(model). The user has to specify at which rate (frequency)
SimProcess
es are arriving in the system. See the Constructor
for more details. The user has to derive from this class to make his own
ArrivalProcesses for the arriving processes he needs in his simulated system.
He has to implement the abstract method createSuccessor()
,
which should create (instantiate) the newly arriving process. It is
recommended to use one ArrivalProcess for each different kind of arriving
process (with its specific arrival rate).Constructor and Description |
---|
ArrivalProcess(Model owner,
java.lang.String name,
NumericalDist<java.lang.Double> arrivalRate,
boolean showInTrace)
Constructor for an ArrivalProcess to make a certain kind of SimProcess
arrive automatically in the system at a given rate.
|
Modifier and Type | Method and Description |
---|---|
abstract S |
createSuccessor()
Implement this abstract method so it creates (instantiates) a new
SimProcess object which is arriving at the system
(border). |
NumericalDist<java.lang.Double> |
getArrivalRate()
Returns the rate (frequency) at which the SimProcesses arrive at the
system.
|
void |
lifeCycle()
The
ArrivalProcess is some kind of source for
SimProcess es. |
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 ArrivalProcess(Model owner, java.lang.String name, NumericalDist<java.lang.Double> arrivalRate, boolean showInTrace)
owner
- desmoj.Model : The model this ArrivalProcess belongs to.name
- java.lang.String : The name of this ArrivalProcess, should
indicate that this is a source of some kind of SimProcesses.arrivalRate
- desmoj.dist.NumericalDistshowInTrace
- boolean : Flag, if this ArrivalProcess should produce a trace
output or not.public abstract S createSuccessor()
SimProcess
object which is arriving at the system
(border). When this method returns null
the arrival
process stops its lifecycle.SimProcess
object which is
arriving next in the system.public NumericalDist<java.lang.Double> getArrivalRate()
public void lifeCycle() throws SuspendExecution
ArrivalProcess
is some kind of source for
SimProcess
es. So its lifeCycle is quite simple: Make a
new SimProcess
object and activate it. Then wait until the
next SimProcess
object is arriving at the system. Note:
the first SimProcess
object is arriving when this
ArrivalProcess
is started! This method uses the
createSuccessor()
method to create a new
SimProcess
object. If this method returns
null
the life cycle of this ArrivalProcess
will stop.lifeCycle
in class SimProcess
SuspendExecution