public class HoldingArea extends WaitQueue
InternalTransporter
s serve
(load/unload) Truck
s at a container terminal. So what happens
at the HoldingArea is some kind of Rendezvous synchronisation, where
InternalTransporter
s meet the Truck
s to
load/unload them. There is one wait queue for the masters
(InternalTransporter
s) and one queue for the slaves (
Truck
s), where they have to wait for each other to cooperate.
The InternalTransporter
s are the masters which perform the
loading/unloading operation. The corporate loading/unloading operation is
described in the method cooperation
in a subclass of
Loading
or Unloading
. The Truck
s loaded/unloaded as slaves keep still during the loading/unloading operation
and will be reactivated thereafter. The first sort criteria for the queues is
always highest priorities first, the second queueing discipline of the
underlying queues and the capacity limit can be determined by the user
(default is FIFO and unlimited capacity). HoldingArea is derived from
WaitQueue
which in turn is derived from
QueueBased
, which provides all the statistical functionality
for the queues.WaitQueue
,
QueueBased
,
ProcessCoop
QueueBased.QueueAction
FIFO, LIFO, RANDOM, UNDEFINED
Constructor and Description |
---|
HoldingArea(Model owner,
java.lang.String name,
int mSortOrder,
int mQCapacity,
int sSortOrder,
int sQCapacity,
int nLanes,
boolean showInReport,
boolean showInTrace)
Constructor for a HoldingArea.
|
Modifier and Type | Method and Description |
---|---|
Lane |
getLane()
Gets a Line from the HoldingArea and provides it to the sim-process to use
it.
|
void |
takeBack(Lane l)
A process is using this method to put lane it has used back in the
HoldingArea.
|
avail, availMaster, cancelCoop, cooperate, cooperate, createDefaultReporter, getCooperationsCompleted, getMQueueStrategy, getMRefused, getMRemoved, getSlaveQueue, getSQueueStrategy, getSRefused, getSRemoved, mAverageCoopTime, mAverageLength, mAverageWaitTime, mIsEmpty, mLength, mMaxLength, mMaxLengthAt, mMaxWaitTime, mMaxWaitTimeAt, mMinLength, mMinLengthAt, mStdDevLength, mStdDevWaitTime, mZeroWaits, reset, sAverageLength, sAverageWaitTime, sIsEmpty, sLength, sMaxLength, sMaxLengthAt, sMaxWaitTime, sMaxWaitTimeAt, sMinLength, sMinLengthAt, sStdDevLength, sStdDevWaitTime, sZeroWaits, waitOnCoop
addObserver, averageLength, averageWaitTime, deleteObserver, getQueueLimit, length, maxLength, maxLengthAt, maxWaitTime, maxWaitTimeAt, minLength, minLengthAt, notifyObservers, setQueueImpWarning, stdDevLength, stdDevWaitTime, zeroWaits
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReporter
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 HoldingArea(Model owner, java.lang.String name, int mSortOrder, int mQCapacity, int sSortOrder, int sQCapacity, int nLanes, boolean showInReport, boolean showInTrace)
QueueList
for the
InternalTransporter
s (masters) and one separate
ProcessQueue
for the Truck
s (slave)
processes . The queueing discipline and the capacity limit of the
underlying queues can be chosen. Highest priority are always first in the
queues.owner
- desmoj.Model : The model this HoldingArea is associated to.name
- java.lang.String : The name of this HoldingArea.mSortOrder
- int : determines the sort order of the underlying master queue
implementation. Choose a constant from QueueBased
like QueueBased.FIFO
or
QueueBased.LIFO
or ...mQCapacity
- int : The capacity of the master queue, that is how many
processes can be enqueued. Zero (0) means unlimited capacity.sSortOrder
- int : determines the sort order of the underlying slave queue
implementation. Choose a constant from QueueBased
like QueueBased.FIFO
or
QueueBased.LIFO
or ...sQCapacity
- int : The capacity of the slave queue, that is how many
processes can be enqueued. Zero (0) means unlimited capacity.int
- nLanes: the number of the lanes of this HoldingArea.showInReport
- boolean : Flag, if this HoldingArea should produce a report or
not.showInTrace
- boolean : Flag, if trace messages of this HoldingArea should
be displayed in the trace file.public Lane getLane() throws SuspendExecution
Lane
: The available lane of this HoldingArea.SuspendExecution
public void takeBack(Lane l)
l
- Lane
: The lane which should be returned to the
HoldingArea.