You are on page 1of 2

Problem:

I have a machine that uses some material and produces some material, and Id like to provide replenishment of the
material once depleted, and model this process. (Enhancement of WorkstationWithMaterialConsumption.spfx).
Categories:
Workstations
Key Concepts:
Bill of Materials, Event, Material Element, Monitor, OutputStatistic, Produce Step, QuantityAvailable,
QuantityConsumed, QuantityProduced, Workstation
Assumptions:
The source has infinite arrivals. One bookshelf is created for every entity that enters the workstation and for each
bookshelf that is created, 8 nails and 2 pieces of wood are consumed. There are initially 30 units of wood and 60
units of nails. Each time wood is depleted, we replenish 40 of it; each time nails are depleted, we replenish 80 of
them. Due to different replenishment policies, the lead time of replenishment for wood and nails are different.
Technical Approach:
A Workstation object is used and it consumes materials from a Bill of Materials. The Workstation object produces a
material (bookshelf). The number of bookshelves produced and the number of nails and pieces of wood consumed
is recorded with an output statistic. We use two Monitor elements to watch Model States that keep track of the
numbers of wood and nails remaining in the system. Each monitor fires an event when the number of the material
it monitors in the system goes below a certain threshold value, and then this event triggers the replenishment
process for this material.
Details for Building the Model:
Simple System Setup

Place a Source, Workstation and Sink from the Standard Library into the Facility Window. Change the
Interarrival Time of the Source to be Random.Exponential(1.0).

Creating the Bill of Materials

Open the Definitions Window and select the Elements panel. Create four new Material elements by
clicking on the Material Icon in the top ribbon menu.
Change the Name of the first material element to be Wood. The Initial Quantity should be set to 30.
Change the Name of the second to be Nails. The Initial Quantity should be set to 60.
Change the Name of the third material element to be BookShelf. The Initial Quantity is 0.
Change the Name of the fourth material element to be BookShelfMaterials.
Add two rows to the BillofMaterial property for BookShelfMaterials one for the Material Name Nails,
which should have a Quantity of 8 and the other row for Material Name Wood, which should have a
Quantity of 2.

Creating the Monitor Elements

Open the Definitions Window and select the Elements panel. Click on the Monitor icon in the General
Ribbon group. The Monitor Type is CrossingStateChange and the State Variable Name is
Wood.QuantityAvailable. The Threshold Value is 10 and the Crossing Direction is Negative. This
monitor will fire an event named Wood_Monitor_OnEventProcess whenever the state variable crosses
from 10 to 9.

Add a second Monitor element which is very similar to the first. The differences with this monitor are that
the State Variable Name is Nails.QuantityAvailable, the Threshold Value is set to 20 and fired event
name is Nails_Monitor_OnEventProcess.

Process of Creating Replenishment

Go to the Processes Window. There will be two processes: Wood_Monitor_OnEventProcess and


Nails_Monitor_OnEventProcess shown in this window.
For the process Nails_Monitor_OnEventProcess, place a Delay step in the Process. The Delay Time is 0.5,
and the units is set to Minutes. Then place a Produce step in the process. The Production Type is
Material, Material Name is Nails, and the Quantity is 80. This process will be executed when the
remaining quantity of Nails is below 20, and then the process will delay for 0.5 minute as the delivery lead
time, and replenish 80 Nails.
For the process Wood_Monitor_OnEventProcess, its very similar to the first process. The differences are
the Delay Time for Delay step is set to 2; within the Produce step, the Material Name is Wood, and the
Quantity is 40.

Generating Output Statistics

Within the Definitions Window, Elements panel, create three output statistics by clicking on the Output
Statistic icon.
The first output statistic can have the Name BookShelvesProduced and the Expression should be
BookShelf.QuantityProduced.
The second output statistic can have the Name NailsUsed and the Expression should be
Nails.QuantityConsumed.
The third output statistic can have the Name WoodUsed and the Expression should be
Wood.QuantityConsumed.

Defining the Workstation

Within the Facility Window, edit the Workstation object and change the Processing Batch Size property to
1 and the Processing Time to Random.Triangular(0.5,0.8,1.2).
Within the Materials and Other Constraints section of the Workstation, open the Materials repeating
property editor. Add one entry that has Action Type set to Consume, Consumption Type as Bill of
Materials and Material Name as BookShelfMaterials. The Quantity is 1. Add a second entry in which
the Action Type is Produce, the Production Type is Material and the Material Name is BookShelf. The
Quantity is 1 and the Production Delay Time in Advanced Options is 1.5 minutes.

Embellishments:
We can add some animation, to show the current remaining number of materials while were running this model.
Choose Status Plot from Animation under Facility Tools, create a Status Plot, with the name Material Available,
then set the X Axis label to be Time and the Y Axis label to be Pieces, and change the time interval shown on the
X Axis to be 30 minutes.
Then click on the plot, go to Properties Window, add 2 rows in the Additional Expressions. One row has the
Expression set to Nails.QuantityAvailable, and the Label set to Nails. The other row has the Expression set to
Wood.QuantityAvailable, and the Label set to Wood. Then well have two animation lines within the plot, one
represents the number of remaining nails and the other one represents the number of remaining wood.

You might also like