desmoj
Class DemandProcess

java.lang.Object
desmoj.NamedObject
desmoj.ModelComponent
desmoj.Schedulable
desmoj.Entity
desmoj.SimProcess
desmoj.DemandProcess
- public class DemandProcess
- extends SimProcess
DemandProcess is a kind of process representing the demand in a manufacturing
system. It is some kind of drain for the products manufactured in the
production system. So it can be viewed as the border of the simulated system,
where the products disappear. It is meant to model the demand of the market
where the finished products leaving the manufacturing system are sold.
It has three main parameters to be specified (see the Constructor): The
Entrepot where the products to be sold are stored, the random
number distribution to determine the quantity of demanded products, the rate
(frequenzy) also a random number distribution, at which the demand occurs.
Once the DemandProcess has obtained the products, they are consumed and will
leave the simulated system for ever. Actually they will be destroyed as the
the garbage collector will get them.
Internally CustomerProcessses are set up and initialized, which
are the ones actually fetching the products from the Entrepot.
But this is done automatically, so the user does not have to care about it.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private desmoj.dist.RealDist |
demandInterval
The random number distribution determining the intervals in which the
demand occurs. |
private desmoj.dist.IntDist |
demandQuantity
The random number distribution determining the quantity of demanded products. |
private Entrepot |
entrepot
The Entrepot supplying the products this DemandProcess is
demanding. |
| Fields inherited from class desmoj.Entity |
|
|
Method Summary |
desmoj.dist.RealDist |
getDemandInterval()
Returns the random number distribution determining the intervals in which the
demand occurs. |
desmoj.dist.IntDist |
getDemandQuantity()
Returns the random number distribution determining the demand (quantity). |
Entrepot |
getEntrepot()
Returns the Entrepot supplying the products this DemandProcess is
demanding. |
void |
lifeCycle()
The DemandProcess is fetching in certain intervals a certain quantity of
products from the given Entrepot and destroys them. |
void |
setDemandInterval(desmoj.dist.RealDist newDemandInterval)
Sets the intervals in which the demand occurs to the new given random number
distribution. |
void |
setDemandQuantity(desmoj.dist.IntDist newDemandQuantity)
Sets the demand (quantity) to the new given random number distribution. |
| 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 |
demandQuantity
private desmoj.dist.IntDist demandQuantity
- The random number distribution determining the quantity of demanded products.
demandInterval
private desmoj.dist.RealDist demandInterval
- The random number distribution determining the intervals in which the
demand occurs.
entrepot
private Entrepot entrepot
- The
Entrepot supplying the products this DemandProcess is
demanding.
DemandProcess
public DemandProcess(Model owner,
java.lang.String name,
Entrepot supplier,
IntDist quantity,
RealDist interval,
boolean showInTrace)
- Constructor of a DemandProcess. The DemandProcess is fetching a certain
quantity of products from the given
Entrepot in certain
intervals.
getDemandInterval
public desmoj.dist.RealDist getDemandInterval()
- Returns the random number distribution determining the intervals in which the
demand occurs.
getDemandQuantity
public desmoj.dist.IntDist getDemandQuantity()
- Returns the random number distribution determining the demand (quantity).
getEntrepot
public Entrepot getEntrepot()
- Returns the
Entrepot supplying the products this DemandProcess is
demanding.
lifeCycle
public void lifeCycle()
- The DemandProcess is fetching in certain intervals a certain quantity of
products from the given
Entrepot and destroys them. So it serves
as a drain for the finished products. To prevent this process from being
blocked waiting in the queue of the Entrepot, it will instantiate
CustomerProcesses which will actually fetching the products from
the Entrepot.
- Specified by:
lifeCycle in class SimProcess
setDemandInterval
public void setDemandInterval(desmoj.dist.RealDist newDemandInterval)
- Sets the intervals in which the demand occurs to the new given random number
distribution. Use
desmoj.dist.RealDistConstant to simulate
constant intervals.
setDemandQuantity
public void setDemandQuantity(desmoj.dist.IntDist newDemandQuantity)
- Sets the demand (quantity) to the new given random number distribution.
Use
desmoj.dist.IntDistConstant to simulate a constant demand.