public class CranesSystem extends QueueBased
QueueBased
QueueBased.QueueAction
FIFO, LIFO, RANDOM, UNDEFINED
Constructor and Description |
---|
CranesSystem(Model owner,
java.lang.String name,
int cSortOrder,
int cQCapacity,
int tSortOrder,
int tQCapacity,
boolean showInReport,
boolean showInTrace)
Constructor for a CranesSystem.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addCrane(Crane c)
This method is used to add a crane to the cranes queue of this
CranesSystem.
|
void |
addSumLoadTime(double t)
Change the whole time that all the cranes needed to load the transporters
to a new value.
|
void |
addSumNumLoadedUnits(long n)
Change the number of the loaded units of all the cranes to a new value.
|
void |
addSumNumUnloadedUnits(long n)
Change the number of the unloaded units of all the cranes to a new value.
|
void |
addSumUnloadTime(double t)
Change the whole time that all the cranes needed to unload the
transporters to a new value.
|
boolean |
addTransporter(SimProcess t)
This method is used to add a transporter (external/internal) to the
transporter queue of this CranesSystem.
|
double |
avgUsage()
Returns the average utilization of a crane of this cranes system.
|
Reporter |
createDefaultReporter()
Returns a Reporter to produce a report about this CranesSystem.
|
Crane[] |
getCranes(int n)
Returns the n cranes of this cranes system that are idle now.
|
ProcessQueue<Crane> |
getCranesQueue()
Returns the cranes queue of this cranes system.
|
double |
getSumLoadTime()
Returns the whole loading time of all the cranes.
|
long |
getSumNumLoadedUnits()
Returns the number of the loaded units of all the cranes.
|
long |
getSumNumUnloadedUnits()
Returns the number of the unloaded units of all the cranes.
|
double |
getSumUnloadTime()
Returns the whole unloading time of all the cranes.
|
SimProcess |
getTransporter()
Returns the last transporter of the transporter queue.
|
ProcessQueue<SimProcess> |
getTransporterQueue()
Returns the transporter queue of this cranes system.
|
ProcessQueue<Crane> |
getWorkingCranes()
Returns the queue of the now working cranes of this cranes system.
|
void |
reset()
Resets all statistical counters to their default values.
|
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 CranesSystem(Model owner, java.lang.String name, int cSortOrder, int cQCapacity, int tSortOrder, int tQCapacity, boolean showInReport, boolean showInTrace)
owner
- Model : The model this CranesSystem is associated to.name
- java.lang.String : The CranesSystem's namecsortOrder
- int : determines the sort order of the underlying cranes queue
implementation. Choose a constant from QueueBased
like QueueBased.FIFO
or
QueueBased.LIFO
or ...cQCapacity
- int : The capacity of the cranes queue, that is how many
cranes can be enqueued. Zero (0) means unlimited capacity.tsortOrder
- int : determines the sort order of the underlying transporter
queue implementation. Choose a constant from
QueueBased
like QueueBased.FIFO
or QueueBased.LIFO
or ...tQCapacity
- int : The capacity of the transporter queue, that is how many
transporters can be enqueued. Zero (0) means unlimited
capacity.showInReport
- boolean : Flag, if this CranesSystem should produce a report
or not.showInTrace
- boolean : Flag for trace to produce trace messages.public long getSumNumLoadedUnits()
public void addSumNumLoadedUnits(long n)
n
- long : The number of loaded units of this CranesSystem that
must be added to the old value.public long getSumNumUnloadedUnits()
public void addSumNumUnloadedUnits(long n)
n
- long : The number of unloaded units of this CranesSystem that
must be added to the old value.public Reporter createDefaultReporter()
public boolean addCrane(Crane c)
c
- Crane : The Crane to enqueue.public Crane[] getCranes(int n)
public ProcessQueue<Crane> getCranesQueue()
ProcessQueue
: The cranes queue.public ProcessQueue<SimProcess> getTransporterQueue()
ProcessQueue
: The transporter queue.public void reset()
reset
in class QueueBased
public boolean addTransporter(SimProcess t)
t
- SimProcess
: The transporter that me be
enqueued.public SimProcess getTransporter()
public double avgUsage()
public double getSumLoadTime()
public double getSumUnloadTime()
public void addSumLoadTime(double t)
t
- double : The loading time of this CranesSystem that must be
added to the old value.public void addSumUnloadTime(double t)
t
- double : The unloading time of this CranesSystem that must be
added to the old value.public ProcessQueue<Crane> getWorkingCranes()
ProcessQueue
: The queue of the working cranes.