public class SimpleTransporter extends Transporter
TransportJunction
. There it waits for goods to transport
them. The goods are transported for a certain time and than released. The
SimpleTransporter returns to his TranspsortJunction
where it
waits again for some other goods to transport. The time it takes the
transporter to return to its TransportJunction
must be
specified in the parameter returnTime
. It must be some kind
of desmoj.core.dist.NumericalDist
random number stream. The
SimpleTransporter 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). The minimum load is one (1) unless something different is
specified. The SimpleTransporters lifeCycle is kept simple, as it only waits
in a TransportJunction
for goods to be transported. Than,
after having transported the goods it returns to its
TransportJunction
. The user can overwrite the method
lifeCycle()
in a subclass in order to implement a different
behavior.Transporter
Constructor and Description |
---|
SimpleTransporter(Model owner,
java.lang.String name,
int minLoad,
int capac,
Transportation transport,
TransportJunction homeBase,
NumericalDist<?> returnTime,
boolean showInTrace)
Constructs a SimpleTransporter which will carry around goods in a
manufacturing system, from and to a certain
TransportJunction . |
SimpleTransporter(Model owner,
java.lang.String name,
int capac,
Transportation transport,
TransportJunction homeBase,
NumericalDist<?> returnTime,
boolean showInTrace)
Constructs a SimpleTransporter which will carry around goods in a
manufacturing system, from and to a certain
TransportJunction . |
Modifier and Type | Method and Description |
---|---|
TransportJunction |
getHomeBase()
Returns the home base
TransportJunction this
SimpleTransporter is associated to. |
TimeSpan |
getReturnTimeSample()
Returns a
TimeSpan object representing the time it takes
the SimpleTransporter to return to his home base (
TransportJunction ) after having transported the goods to
some place. |
Transportation |
getTransportation()
Returns the
Transportation order this SimpleTransporter is
supposed to execute. |
void |
lifeCycle()
This SimpleTransporter has a very simple lifeCycle.
|
void |
setHomeBase(TransportJunction newHomeBase)
Sets a new
TransportJunction as the home base this
SimpleTransporter is associated to. |
void |
setTransportation(Transportation newTransportation)
Sets a new
Transportation order this SimpleTransporter is
supposed to carry out. |
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 SimpleTransporter(Model owner, java.lang.String name, int minLoad, int capac, Transportation transport, TransportJunction homeBase, NumericalDist<?> returnTime, boolean showInTrace)
TransportJunction
. A SimpleTransporter is associated to a
certain TransportJunction
as his home base. He will
perform the transportation of the goods as described in the
Transportation object. He needs a certain time to return to his home base
and has a capacity (maximum number of goods which can be transported) and
a mimimum load (a minimum number of goods it will carry). Use this
constructor to construct a Transporter with a certain minimum load, a
specified capacity, a given transportation order, a certain home base (
TransportJunction
) and a given return time it takes him
to return to his base. The minimum load and the capacity must not be zero
or negative.owner
- desmoj.Model : The model this SimpleTransporter is associated
to.name
- java.lang.String : The name of this SimpleTransporter.minLoad
- int : The minimum number of goods this SimpleTransporter will
carry around.capac
- int : The maximum number of goods this SimpleTransporter can
carry around.transport
- Transportation : The transportation to be carried out by this
SimpleTransporter.homeBase
- TransportJunction : The home base of this SimpleTransporter;
where he comes from and where he returns to.returnTime
- NumericalDist> : The time it takes the SimpleTransporter to return
to his home base after transporting the goods to a certain
place.showInTrace
- boolean : Flag, if this SimpleTransporter should produce a
trace output or not.public SimpleTransporter(Model owner, java.lang.String name, int capac, Transportation transport, TransportJunction homeBase, NumericalDist<?> returnTime, boolean showInTrace)
TransportJunction
. A SimpleTransporter is associated to a
certain TransportJunction
as his home base. He will
perform the transportation of the goods as described in the
Transportation object. He needs a certain time to return to his home base
and has a capacity (maximum number of goods which can be transported).
The mimimum load (a minimum number of goods it will carry) is one. Use
this constructor to construct a Transporter with a specified capacity, a
given transportation order, a certain home base (
TransportJunction
), a given return time it takes him to
return to his base and a minimum load of one.owner
- desmoj.Model : The model this SimpleTransporter is associated
to.name
- java.lang.String : The name of this SimpleTransporter.capac
- int : The maximum number of goods this SimpleTransporter can
carry around.transport
- Transportation : The transportation to be carried out by this
SimpleTransporter.homeBase
- TransportJunction : The home base of this SimpleTransporter;
where he comes from and where he returns to.returnTime
- NumericalDist> : The time it takes the SimpleTransporter to return
to his home base after transporting the goods to a certain
place.showInTrace
- boolean : Flag, if this SimpleTransporter should produce a
trace output or not.public TransportJunction getHomeBase()
TransportJunction
this
SimpleTransporter is associated to.TransportJunction
this SimpleTransporter is
associated to.public TimeSpan getReturnTimeSample()
TimeSpan
object representing the time it takes
the SimpleTransporter to return to his home base (
TransportJunction
) after having transported the goods to
some place. The time is taken from the given random number stream
returnTimeStream.TransportJunction
)
after having transported the goods to some place.public Transportation getTransportation()
Transportation
order this SimpleTransporter is
supposed to execute.Transportation
order
this SimpleTransporter is supposed to execute.public void lifeCycle() throws SuspendExecution
TransportJunction
) for goods to transport. As soon
as goods arrive at the TransportJunction
they will be
transported to their destination and the SimpleTransporter returns to his
home base.lifeCycle
in class Transporter
SuspendExecution
public void setHomeBase(TransportJunction newHomeBase)
TransportJunction
as the home base this
SimpleTransporter is associated to. Must not be null
!newHomeBase
- desmoj.TransportJunction : The new
TransportJunction
as the home base of this
SimpleTransporter.public void setTransportation(Transportation newTransportation)
Transportation
order this SimpleTransporter is
supposed to carry out. Must not be null
!newTransportation
- desmoj.Transportation : The new Transportation
order this SimpleTransporter is supposed to carry out.