public abstract class InternalTransporter extends Transporter
Job
to do by. InternalTransporter is derived from Transporter. Because of that he
has a certain capacity (maximum number of goods which can be carried around
at once) and a minimum load (minimum number of goods which will be carried)
that one is. Its lifeCycle()
is already implemented and
spezifies the behavior of the InternalTransporter. But its methods
importJobCycle(Job j)
and ExportJobCycle(Job j)
must be ipmlemented by the user in order to specify the behavior of the
InternalTransporter if he does an emport or export job.Transporter
,
T_Control
,
Job
Constructor and Description |
---|
InternalTransporter(Model owner,
java.lang.String name,
int capac,
double speedLoad,
double speedEmpty,
T_Control ts,
boolean showInTrace)
Constructs an Internal Transporter which will carry around containers
(goods) in a container terminal.
|
Modifier and Type | Method and Description |
---|---|
void |
driveEmpty(double distance)
This method describes the driving the certain distance of the internal
transporter if he is empty (has no goods).
|
void |
driveLoad(double distance)
This method describes the driving the certain distance of the internal
transporter if he is loaded (has some goods).
|
abstract void |
exportJobCycle(Job j)
Override this method in a subclass of InternalTransporter to implement
that internal transporter's specific behaviour if he has to do an export
job in a container terminal.
|
Crane |
getCrane()
Returns the crane (containerbridge) which this InternalTransporter is
assigned to.
|
int |
getCurrentCapacity()
Returns the current capacity of this InternalTransporter.
|
Job |
getJob()
Returns the current job of this InternalTransporter.
|
long |
getNumEmptyDrives()
Returns the number of empty drives that this InternalTransporter has
done.
|
long |
getNumLoadedDrives()
Returns the number of loaded drives that this InternalTransporter has
done.
|
double |
getSpeedEmpty()
Returns the empty speed of this InternalTransporter.
|
double |
getSpeedLoad()
Returns the loaded speed of this InternalTransporter.
|
double |
getTimeEmptyDrives()
Returns the whole time of empty drives that this InternalTransporter has
done.
|
double |
getTimeLoadedDrives()
Returns the whole time of loaded drives that this InternalTransporter has
done.
|
abstract void |
importJobCycle(Job j)
Override this method in a subclass of InternalTransporter to implement
that internal transporter's specific behaviour if he has to do an import
job in a container terminal.
|
void |
lifeCycle()
This method implements the internal transporter specific behaviour.
|
void |
pickDown(TimeSpan time)
This method describes the unloading of the internal transporter.
|
void |
pickUp(TimeSpan time)
This method describes the loading of the internal transporter.
|
void |
reset()
To reset all the statistics about this InternalTransporter.
|
void |
setCrane(Crane c)
Sets the crane that this InternalTransporter must be assigned to.
|
void |
setCurrentCapacity(int c)
Sets the current capacity of this InternalTransporter to a new value.
|
void |
setJob(Job j)
Sets the job of this InternalTransporter that he has to do.
|
void |
setSpeedEmpty(double s)
Sets the empty speed of this InternalTransporter to a new value.
|
void |
setSpeedLoad(double s)
Sets the loaded speed of this InternalTransporter to a new value.
|
getCapacity, getMinLoad, setCapacity, setMinLoad
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 InternalTransporter(Model owner, java.lang.String name, int capac, double speedLoad, double speedEmpty, T_Control ts, boolean showInTrace)
importJobCycle(Job j)
method and
exportJobCycle(Job j)
to specify its behavior when he gets
an ex- or import job. An Internal Transporter has like a Transporter a
capacity (maximum number of goods which can be transported) and a mimimum
load ( a minimum number of goods it will carry). Both must not be zero or
negative. The capacity default value is one. The minimum load has always
value one.owner
- desmoj.Model : The model this InternalTransporter is
associated to.name
- java.lang.String : The name of this InternalTransporter.capac
- int : The maximum number of goods this InternalTransporter can
carry around.speedLoad
- double : The loaded speed of this InternalTransporter.speedEmpty
- double : The empty speed of this InternalTransporter.ts
- T_Control
: The transporter control wchich this
InternalTransporter belongs to.showInTrace
- boolean : Flag, if this InternalTransporter should produce a
trace output or not.It has a certain loaded and empty speed when he drives
in a terminal and is loaded or empty. Both must not be zero or
negative. He has also a certain transporter control which he gets
his job to do by.
public Crane getCrane()
Crane
: The assigned crane of this
InternalTransporter.public void setCrane(Crane c)
c
- Crane
: The new assigned crane of this
InternalTransporter.public void driveLoad(double distance) throws SuspendExecution
distance
- double : The distance to driveSuspendExecution
public void driveEmpty(double distance) throws SuspendExecution
distance
- double : The distance to driveSuspendExecution
public void setSpeedEmpty(double s)
s
- double : The new empty speed of this InternalTransporter.public double getSpeedEmpty()
public void setSpeedLoad(double s)
s
- double : The new loaded speed of this InternalTransporter.public double getSpeedLoad()
public void setJob(Job j)
j
- Job
: The new job of this InternalTransporter.public Job getJob()
Job
: The job of this InternalTransporter.public void setCurrentCapacity(int c)
c
- int : The new current capacity of this InternalTransporter.public int getCurrentCapacity()
public abstract void importJobCycle(Job j) throws SuspendExecution
j
- Job
: The import job of this
InternalTransporter.SuspendExecution
public abstract void exportJobCycle(Job j) throws SuspendExecution
j
- Job
: The export job of this
InternalTransporter.SuspendExecution
public void lifeCycle() throws SuspendExecution
lifeCycle
in class Transporter
SuspendExecution
public long getNumEmptyDrives()
public long getNumLoadedDrives()
public double getTimeEmptyDrives()
public double getTimeLoadedDrives()
public void pickUp(TimeSpan time) throws SuspendExecution
time
- TimeSpan : The needed time to load.SuspendExecution
public void pickDown(TimeSpan time) throws SuspendExecution
time
- TimeSpan : The needed time to unload.SuspendExecution
public void reset()