desmoj
Class RestockProcessMS

java.lang.Object
desmoj.NamedObject
desmoj.ModelComponent
desmoj.Schedulable
desmoj.Entity
desmoj.SimProcess
desmoj.RestockProcessMS
- All Implemented Interfaces:
- java.util.EventListener, java.beans.PropertyChangeListener
- public class RestockProcessMS
- extends SimProcess
- implements java.beans.PropertyChangeListener
RestockProcessMS is a process restocking a Stock up to a
maximum (M) inventory level every time a given safety (S) stock level is
reached.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private Stock |
clientStock
The clientStock which will be supplied by this
RestockProcess. |
private desmoj.dist.RealDist |
leadTime
The random distribution stream determining the lead time. |
private long |
maxInventoryLevel
The maximum inventory level the Stock should be refilled up to. |
private long |
orderQuantity
The quantity of units the Stock will be replenished with. |
private long |
safetyStockLevel
The safety stock level. |
| Fields inherited from class desmoj.Entity |
|
|
Constructor Summary |
RestockProcessMS(Model owner,
java.lang.String name,
long mil,
long safetyStk,
Stock client,
boolean showInTrace)
Constructs a RestockProcessMS which restocks a client
Stock up to a maximum inventory level every time the safety stock is
reached. |
RestockProcessMS(Model owner,
java.lang.String name,
long mil,
long safetyStk,
Stock client,
RealDist lt,
boolean showInTrace)
Constructs a RestockProcessMS which restocks a client
Stock up to a maximum inventory level every time the safety stock is
reached. |
|
Method Summary |
long |
getActualOrderQuantity()
Returns the quantity (number of units) to be stored in the Stock. |
desmoj.dist.RealDist |
getLeadTime()
Returns the random number distribution for the lead time (time between
placement and receipt of an order). |
long |
getMaxInventoryLevel()
Returns the maximum inventory level up to which the Stock will be refilled in
every cycle. |
long |
getSafetyStockLevel()
Returns the safety stock level. |
void |
lifeCycle()
The RestockProcessMS replenishes the associated Stock
up to the maximum (M) inventory level every time the inventory level dropped
below the safety (S) stock level. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Informs the RestockProcessMS every time the inventory level of the Stock
changes. |
void |
setLeadTime(desmoj.dist.RealDist newLeadTime)
Set the lead time to a new real random number distribution. |
void |
setMaxInventoryLevel(long newMaxInventoryLevel)
Sets the maximum inventory level to a new value. |
void |
setSafetyStockLevel(long newSafetyStk)
Sets the safety stock level 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 |
orderQuantity
private long orderQuantity
- The quantity of units the
Stock will be replenished with.
Will be recalculated in every cycle: Maximum inventory level minus actual
available units in the Stock (when the inventory level dropped below the
safety stock level).
clientStock
private Stock clientStock
- The client
Stock which will be supplied by this
RestockProcess.
leadTime
private desmoj.dist.RealDist leadTime
- The random distribution stream determining the lead time. That is the time
between the placement and receipt of an order. If
null lead time
is zero.
safetyStockLevel
private long safetyStockLevel
- The safety stock level. In case this level is reached a new order will be
placed.
maxInventoryLevel
private long maxInventoryLevel
- The maximum inventory level the
Stock should be refilled up to.
RestockProcessMS
public RestockProcessMS(Model owner,
java.lang.String name,
long mil,
long safetyStk,
Stock client,
RealDist lt,
boolean showInTrace)
- Constructs a
RestockProcessMS which restocks a client
Stock up to a maximum inventory level every time the safety stock is
reached.
The lead time (time gap between placement and receipt of an order) will be
given as a real random number distribution.
RestockProcessMS
public RestockProcessMS(Model owner,
java.lang.String name,
long mil,
long safetyStk,
Stock client,
boolean showInTrace)
- Constructs a
RestockProcessMS which restocks a client
Stock up to a maximum inventory level every time the safety stock is
reached.
The lead time is zero.
getActualOrderQuantity
public long getActualOrderQuantity()
- Returns the quantity (number of units) to be stored in the Stock.
Changes every time a new order is placed!
getLeadTime
public desmoj.dist.RealDist getLeadTime()
- Returns the random number distribution for the lead time (time between
placement and receipt of an order).
getMaxInventoryLevel
public long getMaxInventoryLevel()
- Returns the maximum inventory level up to which the Stock will be refilled in
every cycle.
getSafetyStockLevel
public long getSafetyStockLevel()
- Returns the safety stock level. When this inventory level is reached a new
order will be placed.
lifeCycle
public void lifeCycle()
- The
RestockProcessMS replenishes the associated Stock
up to the maximum (M) inventory level every time the inventory level dropped
below the safety (S) stock level.
- Specified by:
lifeCycle in class SimProcess
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Informs the RestockProcessMS every time the inventory level of the Stock
changes. If the inventory level of the Stock drops below the safety stock
level this RestockProcessMS must be woken up to place an order.
- Specified by:
propertyChange in interface java.beans.PropertyChangeListener
setLeadTime
public void setLeadTime(desmoj.dist.RealDist newLeadTime)
- Set the lead time to a new real random number distribution.
If set to
null the lead time is zero.
setMaxInventoryLevel
public void setMaxInventoryLevel(long newMaxInventoryLevel)
- Sets the maximum inventory level to a new value. Make sure it is greater than
zero and less than the capacity of the Stock.
setSafetyStockLevel
public void setSafetyStockLevel(long newSafetyStk)
- Sets the safety stock level to a new value. Make sure it is greater than
zero and less than the capacity of the Stock.