Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

desmoj
Class DemandProcess  view DemandProcess download DemandProcess.java

java.lang.Object
  extended bydesmoj.NamedObject
      extended bydesmoj.ModelComponent
          extended bydesmoj.Schedulable
              extended bydesmoj.Entity
                  extended bydesmoj.SimProcess
                      extended bydesmoj.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.SimProcess
 
Fields inherited from class desmoj.Entity
 
Fields inherited from class desmoj.Schedulable
myNote
 
Fields inherited from class desmoj.ModelComponent
 
Fields inherited from class desmoj.NamedObject
 
Constructor Summary
DemandProcess(Model owner, java.lang.String name, Entrepot supplier, IntDist quantity, RealDist interval, boolean showInTrace)
          Constructor of a DemandProcess.
 
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
 
Methods inherited from class desmoj.NamedObject
getName, getQuotedName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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.

Constructor Detail

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.

Method Detail

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.