public abstract class Crane extends SimProcess
lifeCycle() must be implemented to spezify the behavior of the
Crane.SimProcess,
C_Control| Constructor and Description |
|---|
Crane(Model owner,
java.lang.String name,
C_Control cs,
boolean showInTrace)
Constructs a Crane which will loads/unloads containers(goods) onto/from
an external/internal transporter or into/from yard in a container
terminal.
|
Crane(Model owner,
java.lang.String name,
int bufferCapacity,
C_Control cs,
boolean showInTrace)
Constructs a Crane which will loads/unloads containers(goods) onto/from
an external/internal transporter or into/from yard in a container
terminal.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drive(TimeSpan time)
This method describes the driving of the crane ( crane speader).
|
Stock |
getBuffer()
Returns the buffer of this crane.
|
C_Control |
getCS()
Returns the crane control this crane belongs to.
|
double |
getLoadTime()
Returns the whole loading time of this crane.
|
long |
getNumLoadedUnits()
Returns the number of the units that this Crane has loaded.
|
long |
getNumToLoadUnits()
Returns the number of the units this crane has to load.
|
long |
getNumToUnloadUnits()
Returns the number of the units this crane has to unload.
|
long |
getNumUnloadedUnits()
Returns the number of the units that this Crane has unloaded.
|
Ship |
getShip()
Returns the ship this Crane is assigned to.
|
double |
getUnloadTime()
Returns the whole unloading time of this crane.
|
WaitQueue |
getWLoadQueue()
Returns the queue where this Crane waits to load an internal transporter.
|
WaitQueue |
getWUnloadQueue()
Returns the queue where this Crane waits to unload an internal
transporter.
|
boolean |
load(Loading loading)
This method describes the loading action of this crane if has to wait for
an internal transporter before loading it.
|
void |
load(TimeSpan time)
This method describes the loading action of this crane.
|
void |
reset()
To reset the statistics about unloaded und loaded units of this Crane.
|
void |
setBuffer(Stock b)
Sets the buffer of this crane to a new value.
|
void |
setCS(C_Control cs)
Sets the crane control of this crane to a new value.
|
void |
setNumToLoadUnits(long n)
Sets the number of the units this crane to has to load.
|
void |
setNumToUnloadUnits(long n)
Sets the number of the units this crane to has to unload.
|
void |
setShip(Ship s)
Sets the ship this crane is assigned to.
|
void |
setWLoadQueue(WaitQueue wq)
Sets the queue where this crane waits for an internal transpoter to load
it to a new value.
|
void |
setWUnloadQueue(WaitQueue wq)
Sets the queue where this crane waits for an internal transpoter to
unload it to a new value.
|
void |
unload(TimeSpan time)
This method describes the unloading action of this crane.
|
boolean |
unload(Unloading unloading)
This method describes the unloading action of this crane if has to wait
for an internal transporter before unloading it.
|
boolean |
waitOnLoading()
This method must be used by an internal transporter if he wants to be
loaded by this crane.
|
boolean |
waitOnUnloading()
This method must be used by an internal transporter if he wants to be
unloaded by this crane.
|
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, lifeCycle, obtainResources, passivate, prepareTransport, reActivate, reActivate, resetMaster, returnAllResources, returnResources, setBlocked, setRealTimeConstraint, setRepeating, setSchedulingPriority, setSlaveWaitQueuegetIdentNumber, 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, setQueueingPriorityassignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, rename, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportablecurrent, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOngetName, getQuotedName, toStringpublic Crane(Model owner, java.lang.String name, int bufferCapacity, C_Control cs, boolean showInTrace)
lifeCycle method to specify its
behavior.owner - desmoj.Model : The model this Crane is associated to.name - java.lang.String : The name of this Crane.bufferCapacity - int : The maximum number of containers(goods) this Crane can
store in its buffer.cs - C_Control: The crane control which this Crane
belongs to.showInTrace - boolean : Flag, if this Crane should produce a trace output or
not.public Crane(Model owner, java.lang.String name, C_Control cs, boolean showInTrace)
lifeCycle method to specify its
behavior.owner - desmoj.Model : The model this Crane is associated to.name - java.lang.String : The name of this Crane.cs - C_Control: The crane control which this Crane
belongs to.showInTrace - boolean : Flag, if this Crane should produce a trace output or
not.public void load(TimeSpan time) throws SuspendExecution
time - TimeSpan : The loading time.SuspendExecutionpublic void unload(TimeSpan time) throws SuspendExecution
time - TimeSpan : The unloading time.SuspendExecutionpublic void drive(TimeSpan time) throws SuspendExecution
time - TimeSpan : The time to drive.SuspendExecutionpublic long getNumLoadedUnits()
public long getNumUnloadedUnits()
public void reset()
public void setShip(Ship s)
s - Ship : The new ship for this crane .public Ship getShip()
Ship: The ship of this Crane.public C_Control getCS()
C_Control: The crane control of this Crane.public void setCS(C_Control cs)
cs - C_Control: The new crane control for this
crane.public Stock getBuffer()
Stock: The buffer of this Crane.public void setBuffer(Stock b)
b - Stock: The new buffer for this crane.public long getNumToLoadUnits()
public long getNumToUnloadUnits()
public void setNumToLoadUnits(long n)
n - long : The number of the units this crane has to load.public void setNumToUnloadUnits(long n)
n - long : The number of the units this crane has to unload.public boolean load(Loading loading) throws SuspendExecution
Loading action.loading - Loading: The loading process.SuspendExecutionpublic boolean unload(Unloading unloading) throws SuspendExecution
Unloading action.unloading - Unloading: The unloading process.SuspendExecutionpublic boolean waitOnUnloading()
throws SuspendExecution
SuspendExecutionpublic boolean waitOnLoading()
throws SuspendExecution
SuspendExecutionpublic WaitQueue getWLoadQueue()
WaitQueue: The waiting load queue of this Crane.public WaitQueue getWUnloadQueue()
WaitQueue: The waiting unload queue of this
Crane.public void setWLoadQueue(WaitQueue wq)
wq - WaitQueue: The waiting load queue for this
crane .public void setWUnloadQueue(WaitQueue wq)
wq - WaitQueue: The waiting unload queue for this
crane .public double getLoadTime()
public double getUnloadTime()