public class RestockProcessMS extends SimProcess implements java.beans.PropertyChangeListener
Stock
up to a
maximum (M) inventory level every time a given safety (S) stock level is
reached.Constructor and Description |
---|
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,
NumericalDist<?> lt,
boolean showInTrace)
Constructs a
RestockProcessMS which restocks a client
Stock up to a maximum inventory level every time the
safety stock is reached. |
Modifier and Type | Method and Description |
---|---|
long |
getActualOrderQuantity()
Returns the quantity (number of units) to be stored in the Stock.
|
NumericalDist<?> |
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(NumericalDist<?> 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.
|
activate, activate, activate, activateAfter, activateBefore, activatePreempt, cancelInterruptDelayed, canCooperate, clearInterruptCode, cooperate, getActivatedBy, getInterruptCode, getInterruptException, getMaster, getRealTimeConstraint, getSchedulingPriority, getSlaveWaitQueue, getSupervisor, hold, hold, hold, interrupt, interrupt, interruptDelayed, interruptDelayed, isBlocked, isComponent, isDelayedInterruptScheduled, isInterrupted, isRepeating, isTerminated, obtainResources, passivate, prepareTransport, reActivate, reActivate, resetMaster, returnAllResources, returnResources, setBlocked, setRealTimeConstraint, setRepeating, setSchedulingPriority, setSlaveWaitQueue
getIdentNumber, getQueueingPriority, getQueues, getScheduledEvents, isEqual, isLarger, isLargerOrEqual, isNotEqual, isQueued, isSimProcess, isSmaller, isSmallerOrEqual, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, scheduleAfter, scheduleAfter, scheduleAfter, scheduleBefore, scheduleBefore, scheduleBefore, schedulePreempt, schedulePreempt, schedulePreempt, setQueueingPriority
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, rename, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportable
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public RestockProcessMS(Model owner, java.lang.String name, long mil, long safetyStk, Stock client, NumericalDist<?> lt, boolean showInTrace)
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.owner
- Model : The model this RestockProcessMS
is
associated toname
- java.lang.String : The name of the
RestockProcessMS
mil
- long : The maximum inventory level the Stock will be filled up
to with every order.safetyStk
- long : The safety stock. When this inventory level is reached
an order will be placedclient
- Stock : The Stock
which will replenished.lt
- NumericalDist> : The lead time random number
distribution to determine the time between placement and
receipt of an order. If null
the lead time is
zero.showInTrace
- boolean : Flag for showing the RestockProcessMS
in trace-files. Set it to true
if
RestockProcessMS should show up in trace. Set it to
false
if RestockProcessMS should not be shown
in trace.public RestockProcessMS(Model owner, java.lang.String name, long mil, long safetyStk, Stock client, boolean showInTrace)
RestockProcessMS
which restocks a client
Stock
up to a maximum inventory level every time the
safety stock is reached. The lead time is zero.owner
- Model : The model this RestockProcessMS
is
associated toname
- java.lang.String : The name of the
RestockProcessMS
.mil
- long : The maximum inventory level the Stock will be filled up
to with every order.safetyStk
- long : The safety stock. When this inventory level is reached
an order will be placedclient
- Stock : The Stock
which will replenished.showInTrace
- boolean : Flag for showing the RestockProcessMS
in trace-files. Set it to true
if
RestockProcessMS should show up in trace. Set it to
false
if RestockProcessMS should not be shown
in trace.public long getActualOrderQuantity()
public NumericalDist<?> getLeadTime()
public long getMaxInventoryLevel()
public long getSafetyStockLevel()
public void lifeCycle() throws SuspendExecution
RestockProcessMS
replenishes the associated
Stock
up to the maximum (M) inventory level every time the
inventory level dropped below the safety (S) stock level.lifeCycle
in class SimProcess
SuspendExecution
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- java.beans.PropertyChangeEvent : Informing the event about an
inventory level change of the Stock.public void setLeadTime(NumericalDist<?> newLeadTime)
null
the lead time is zero.newLeadTime
- NumericalDist> : The new real random number distribution
determining the lead time.public void setMaxInventoryLevel(long newMaxInventoryLevel)
newMaxInventoryLevel
- long : The new maximum inventory level. Make sure it is
greater than zero and less than the capacity of the Stock.public void setSafetyStockLevel(long newSafetyStk)
newSafetyStk
- long : The new safety stock level. Make sure it is greater
than zero and less than the capacity of the Stock.