desmoj
Class Transporter

java.lang.Object
desmoj.NamedObject
desmoj.ModelComponent
desmoj.Schedulable
desmoj.Entity
desmoj.SimProcess
desmoj.Transporter
- Direct Known Subclasses:
- SimpleTransporter
- public abstract class Transporter
- extends SimProcess
A Transporter represents any kind of vehicle or conveyor belt which carries
goods (products) around in a manufacturing system. It 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).
Transporter is derived from SimProcess. Its lifeCycle() must be
implemented by the user in order to specify the behavior of the Transporter.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private int |
capacity
The maximum number of goods which can be transported. |
private int |
minLoad
The minimum number of goods to be transported. |
| Fields inherited from class desmoj.Entity |
|
|
Constructor Summary |
Transporter(Model owner,
java.lang.String name,
int capac,
boolean showInTrace)
Constructs a Transporter which will carry around goods in a manufacturing
system. |
Transporter(Model owner,
java.lang.String name,
int minLoad,
int capac,
boolean showInTrace)
Constructs a Transporter which will carry around goods in a manufacturing
system. |
|
Method Summary |
int |
getCapacity()
Returns the capacity of this Transporter. |
int |
getMinLoad()
Returns the minimum load of this Transporter. |
abstract void |
lifeCycle()
Override this method in a subclass of Transporter to implement the
Transporters specific behaviour. |
void |
setCapacity(int newCapacity)
Sets the capacity of this Transporter to a new value. |
void |
setMinLoad(int newMinLoad)
Sets the minimum load of this Transporter to a new value. |
| 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 |
minLoad
private int minLoad
- The minimum number of goods to be transported.
capacity
private int capacity
- The maximum number of goods which can be transported.
Transporter
public Transporter(Model owner,
java.lang.String name,
int minLoad,
int capac,
boolean showInTrace)
- Constructs a Transporter which will carry around goods in a manufacturing
system. Implement its
lifeCycle() method to specify its behavior.
A Transporter has 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. Their default value is one.
Transporter
public Transporter(Model owner,
java.lang.String name,
int capac,
boolean showInTrace)
- Constructs a Transporter which will carry around goods in a manufacturing
system. Implement its
lifeCycle() method to specify its behavior.
A Transporter 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 specified capacity
and a minimum load of one.
getCapacity
public int getCapacity()
- Returns the capacity of this Transporter. That is the maximum number of goods
it can carry around the manufacturing system.
getMinLoad
public int getMinLoad()
- Returns the minimum load of this Transporter. That is the minimum number of
goods which must be loaded on this Transporter before it starts carrying them
to their destination.
lifeCycle
public abstract void lifeCycle()
- Override this method in a subclass of Transporter to implement the
Transporters specific behaviour. It will at least contain something to
let this Transporter wait in a
TransportJunction for goods to
carry around, like
TransportJunctionXY.cooperate(transportation);
This method starts after a Transporter has been created and activated
by the scheduler. It describes the behavior of this special Transporter when
he is acting alone. All action taking place when this Transporter (as a
master) acts together with other SimProcesses (as slaves) in
some process cooperation is described in that special cooperation
method of the class Transportation.
- Specified by:
lifeCycle in class SimProcess
setCapacity
public void setCapacity(int newCapacity)
- Sets the capacity of this Transporter to a new value. The new value must not
be zero or negative.
setMinLoad
public void setMinLoad(int newMinLoad)
- Sets the minimum load of this Transporter to a new value. The new value must
not be negative.