desmoj
Class SimpleTransporter

java.lang.Object
desmoj.NamedObject
desmoj.ModelComponent
desmoj.Schedulable
desmoj.Entity
desmoj.SimProcess
desmoj.Transporter
desmoj.SimpleTransporter
- public class SimpleTransporter
- extends Transporter
A SimpleTransporter is a simple transporter (vehicle) associated to a
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.dist.RealDist* 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.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private TransportJunction |
homeBase
The TransportJunction this SimpleTransporter is associated to. |
private desmoj.dist.RealDist |
returnTimeStream
The random number stream determining the time it takes this SimpleTransporter
to return to its TransportJunction. |
private Transportation |
transportation
The Transportation this SimpleTransporter is performing. |
| Fields inherited from class desmoj.Entity |
|
|
Constructor Summary |
SimpleTransporter(Model owner,
java.lang.String name,
int minLoad,
int capac,
Transportation transport,
TransportJunction homeBase,
RealDist 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,
RealDist returnTime,
boolean showInTrace)
Constructs a SimpleTransporter which will carry around goods in a
manufacturing system, from and to a certain TransportJunction. |
|
Method Summary |
TransportJunction |
getHomeBase()
Returns the home base TransportJunction this SimpleTransporter
is associated to. |
SimTime |
getReturnTimeSample()
Returns a SimTime 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. |
| Methods inherited from class desmoj.SimProcess |
activate, activate, activateAfter, activateBefore, canCooperate, clearInterruptCode, cooperate, freeThread, getInterruptCode, getMaster, getSlaveWaitQueue, getSupervisor, getUsedResources, hold, interrupt, isBlocked, isComponent, isInterrupted, isReady, isTerminated, obtainResources, passivate, prepareTransport, reActivate, resetMaster, returnAllResources, returnResources, setBlocked, setRunning, setSlaveWaitQueue, setSupervisor, setTerminated, start |
| Methods inherited from class desmoj.Entity |
addQueueLink, getPriority, getQueueLink, isEqual, isLarger, isLargerOrEqual, isNotEqual, isSimProcess, isSmaller, isSmallerOrEqual, numQueues, removeQueueLink, schedule, scheduleAfter, scheduleBefore, setPriority |
| Methods inherited from class desmoj.Schedulable |
cancel, getEventNote, isCurrent, isScheduled, nextEntity, nextEvent, nextSchedulable, removeEventNote, rename, reSchedule, scheduledAt, setEventNote |
| Methods inherited from class desmoj.ModelComponent |
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, setOwner, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn |
returnTimeStream
private desmoj.dist.RealDist returnTimeStream
- The random number stream determining the time it takes this SimpleTransporter
to return to its
TransportJunction.
homeBase
private TransportJunction homeBase
- The
TransportJunction this SimpleTransporter is associated to.
From there it starts and to that TransportJunction it returns.
transportation
private Transportation transportation
- The
Transportation this SimpleTransporter is performing. That
is the joint cooperation of this SimpleTransporter and the goods
(SimProcesses).
SimpleTransporter
public SimpleTransporter(Model owner,
java.lang.String name,
int minLoad,
int capac,
Transportation transport,
TransportJunction homeBase,
RealDist returnTime,
boolean showInTrace)
- Constructs a SimpleTransporter which will carry around goods in a
manufacturing system, from and to a certain
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.
SimpleTransporter
public SimpleTransporter(Model owner,
java.lang.String name,
int capac,
Transportation transport,
TransportJunction homeBase,
RealDist returnTime,
boolean showInTrace)
- Constructs a SimpleTransporter which will carry around goods in a
manufacturing system, from and to a certain
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.
getHomeBase
public TransportJunction getHomeBase()
- Returns the home base
TransportJunction this SimpleTransporter
is associated to.
getReturnTimeSample
public SimTime getReturnTimeSample()
- Returns a
SimTime 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.
getTransportation
public Transportation getTransportation()
- Returns the
Transportation order this SimpleTransporter is
supposed to execute.
lifeCycle
public void lifeCycle()
- This SimpleTransporter has a very simple lifeCycle. He waits in his home base
(
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.
- Specified by:
lifeCycle in class Transporter
setHomeBase
public void setHomeBase(TransportJunction newHomeBase)
- Sets a new
TransportJunction as the home base this
SimpleTransporter is associated to. Must not be null!
setTransportation
public void setTransportation(Transportation newTransportation)
- Sets a new
Transportation order this SimpleTransporter is
supposed to carry out. Must not be null!