public abstract class Ship extends ExternalTransporter
ExternalTransporter
wich arrives in a container
terminal to deliver and /or pick up some containers (goods). It has a certain
number of import/export containers that must have loaded/unloaded before it
can leave a container terminal. The both numbers must be not negative. It
also has a certain length that he needs to take from a berth for his berthing
and a ceratin number of cranes (containerbridges) that he needs for his
unloading and/or loading. The ship can leave the terminal after his whole
unloading and/or loading. These both parameters must be not negative or zero.
Ship is derived from ExternalTrasnporter. Its lifeCycle()
must
be implemented by the user in order to specify the behavior of the Ship.ExternalTransporter
Constructor and Description |
---|
Ship(Model owner,
java.lang.String name,
long nImportGoods,
long nExportGoods,
int berthLength,
int nCranes,
boolean showInTrace)
Constructs a Ship which arrives at a container terminal to deliver and/or
pick up some containers (goods).
|
Modifier and Type | Method and Description |
---|---|
Berth |
getBerth()
Returns the berth of this Ship where it's berthing.
|
int |
getBerthLength()
Returns the length of a berth that this Ship needs for its berthing
there.
|
int |
getNumOfCranes()
Returns the number of the cranes (containerbridges)that this Ship needs
for his unloading and/or loading.
|
void |
setBerth(Berth b)
Sets (assings) the berth of this Ship to a new value.
|
void |
setBerthLength(int l)
Sets the length that this Ship needs from a berth to berth there to a new
value.
|
void |
setNumOfCranes(int n)
Sets the number of the cranes that this Ship needs for its unloading and
/or loading to a new value.
|
getNumberOfExportGoods, getNumberOfImportGoods, setNumberOfExportGoods, setNumberOfImportGoods
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, 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 Ship(Model owner, java.lang.String name, long nImportGoods, long nExportGoods, int berthLength, int nCranes, boolean showInTrace)
lifeCycle()
method to specify its behavior. A Ship has a number of import/export
containers that must have loaded/unloaded before it can leave a container
terminal. Both must not be negative. Their default value is one. A Ship
has also a certain length that he needs to take from a berth for his
berthing and a ceratin number of cranes (containerbridges) that he needs
for his unloading and /or loading. The default value for the number of
the cranes is one.owner
- desmoj.Model : The model this Ship is associated to.name
- java.lang.String : The name of this Ship.nImportGoods
- long : The number of import goods this Ship delivers to a
container terminal.nExportGoods
- long : The number of export goods this Ship has to pick up
from a container terminal.berthLength
- int : The length of the berth that this Ship needs for its
berthing.nCranes
- int : The number of cranes (containerbridges) that this Ship
needs for its complete unloading and /or loading.showInTrace
- boolean : Flag, if this Ship should produce a trace output or
not.public void setBerthLength(int l)
l
- int : The new needed length of the berth for this Ship.public int getBerthLength()
public void setNumOfCranes(int n)
n
- int : The new number of cranes (containerbridges) of this
Ship.public int getNumOfCranes()
public Berth getBerth()
Berth
: The berth of this Ship.public void setBerth(Berth b)
b
- Berth : The new berth of this Ship.