MANUFACTURING SYSTEMS  SIMULATION

An application of the 
PSM++(new version of PASION) simulation system:
flexible assembly operations

   Simulation, manufacturing, queuing models, flexible systems, FMS

Consult also:  http://www.raczynski.com/pn/pn.htm  (PSM++ home page)  http://www.raczynski.com/pn/qms.htm  (Queuing model simulator=

FREE download : a marketing model

    SIMULATION ENCYCLOPEDIA

Queuing model simulator / animator (no programming, low cost)
 Robot Kinematics

This page shows some new features of the Queuing Model Generator (QMGW) that is one of the modules of the PSM++ simulation system. Recall that PSM++ is a general-purpose simulation system for Delphi Pascal users. QMGW  is a program generator for queuing models. The output from QMGW can be:

The user can simulate queuing models without programming. The model structure is created on the screen by means of graphic icons, and analyzed by QMGW. Then, the user is asked to give the parameters for the model blocks and the corresponding PSM++ program is generated. For more complicated models the user can provide his own Pascal procedures for service time distributions, priorities etc. A PSM++ programmers can work on the resulting PSM++ code, making necessary changes or adding other processes to the model.

QMGW was originally created to simulate mass service systems, mainly queuing models. As it contains some elements of the manufacturing systems like assembly operation and conveyor, it became a widely used tool for manufacturing systems simulation. Models with up to 800 blocks (servers, queues, assembly etc.) have been successfully simulated. The actual version of the QMGW module permits up to 1000 blocks per model.

The new feature shown here is the capability of the assembly block to change its parameters according to the type of product being assembled. This feature can be useful while simulating flexible manufacturing systems. The QMGW assembly block simulates an assembly operation. It must have at least two inputs. The parts are taken from the inputs and assembled. This operation consists in creating a new part from the necessary components. Consequently, the parts that enter the block disappear from the model and a new part appears. The new part inherits most of the attributes from the main part (arriving at the uppermost assembly input).  Server, assembly operation, generator and terminal point can perform any user-defined operations on the attributes of the processed part. These operations are coded by the user in PASCAL. The QMGW assembly block has the following parameters:

The assembly operation can be executed only if at each input the necessary number of parts (components to assemble) are available in the corresponding buffers. However, in many practical applications this numbers may depend on what is actually assembled. For example, if there are two types of motors assembled, ane may need four and the other six pistons. In the new version of QMGW, this number can change according to the motor type stored in an attribute of the part (e.g. motor block) that arrives at the input number one). The assembly time (random or deterministic) can also depend on the motor type. These properties of the assembly block make it a flexible and util QMGW component.

Consider the following simple model of a manufacturing system.

The product is assembled in two assembly operations shown as blocks no.9 and 13. The parts to assemble come from five sources (QMGW generators) no. 17,1,2,3 and 10. The generators 17 and 1 provide parts of type 1 and 2, respectively. In QMGW the number of the generator where the part is created is stored in part attribute SOURCE. As this attribute is erased by the assembly operations (they give it the value of assembly block number), we will store the part type (1 or 2) in an additional attribute X. To define X we use the following simple code inserted in the SVOP procedure. Recall that this procedure is called by each QMGW block, including the generators. So, each part generated in blocks 17 amd 1 will be given the value of X (1 or 2).

PROCEDURE SVOP(N,SOURCE:INTEGER; TIMIN,TIMQ:REAL; var x:integer);
BEGIN
if n=17 then x:=1;
if n=1 then x:=2
  END;

The parts from generators 17 and 1 wait in the buffer (queue) 18, then are processed by the machine (server) no.5, and pass to the buffer 19. Generators 2 and 3 provide other parts needed for the assemble operation. The numbers of parts N needed change according to the part type, and are as follows.

If the part on input 1 is of type 1, then N = 1,3 and 5 for inputs 1,2 and 3, respectively.
If the part on input 1 is of type 2, then N = 1,2 and 7 for inputs 1,2 and 3, respectively.

This assembly parameters can be defined by the following code (ASSEMF is the obligatory name of the procedure).

procedure assemf(source,n:integer; var np:typinasse);
begin
if n=9 then begin {block number, the first assembly}
  if source=17 then begin {if the part comes from generator 17...}
     np[1]:=1; np[2]:=3; np[3]:=5 end;
  if source=1 then begin {if the part comes from generator 1...}
     np[1]:=1; np[2]:=2; np[3]:=7 end
end end;

Note that we can use the attribute X instead of SOURCE, as well, testing it for value 1 or 2. TYPINASSE is a PSM++ pre-defined type used in assembly specification.
The operation time of the second assembly (block 13) depends on the product type. As we have this information stored in the attribute X, the following random number generator can be used.

function assemtime(x:integer):real;
begin
if x=1 then assemtime:=erlang(3,2.5);
if x=2 then assemtime:=erlang(3,3.4) end;

The number of parts needed to assemble for this block are 1 and 5 on the inputs 1 and 2, respectively.

Finally, we want to count the number of assembled products of type 1 and 2. This can be done using two different terminal blocks (15 and 16), where the products will be passed. In QMGW the split point (block 14) can route the entering entity by probability, by priority or by any other rule. The split rule must be defined as "other rule" and provided as a user code in a separate function. In our case we use again the attribute X. The split rule is as follows.

function splitrul(x:integer):integer; begin splitrul:=x end;

All above procedures can be stored in the same file, declared as an include file while running QMGW simulation.

The GPSS-like final statistics are shown below. These are results averaged over 200 simulation runs. The complete specifications of the model blocks are given at the end of this page. We will not discuss the results in detail. The final statistics show the queue statistics, like the average waiting time, maximal and minimal length and average length. The "lost" column shows eventual lost entities. The entity can be lost if it can not enter the following block and there is no buffer to wait in. In our case there are no lost entities. Note, for example, the short waiting time for queue 7. This queue is not short, but it provides entities from the fast generator no.3. The parts does not wait long time in this queue, because the assembly block 9 needs several (5 or 7) parts and empties frequently the buffer.

Final Statistics:  C:\PSM\ASSEM2.BLW
Final time =   480.00
QUEUES:     Av waiting time   Lmax   Lmin   Av length     Lost
QUEUE6  :        12.536        123      0      23.598     0.00
QUEUE7  :         0.612        102      0       7.812     0.00
QUEUE12 :         1.064         58      0       7.051     0.00
QUEUE18 :         3.652         27      0       1.622     0.00
QUEUE19 :        69.860        101      0      30.357     0.00
QUEUE20 :        35.725         43      0      11.093     0.00

SERVERS:    Service time   Idle time    Idle %     Lost   Served
SERV5  :         359.163     120.837     25.17     0.00   210.70
ASSEMBL.:   Service time   Idle time    Idle %     Lost   Served
ASSE9  :         345.328     134.672     28.06     0.00   150.61
ASSE13 :         389.145      90.856     18.93     0.00   126.53
TERMINAL:   Count(average)
TERM15:       43.93
TERM16:       82.58
TOTAL Terminal output =     126.51

Total cost =    1927.83
Average time in system =      14.19
 

The following image shows the confidence intervals for the length of the queue 7. The yellow line is the average queue length and the other two lines show the upper and lower limit of the confidence interval. In other words, the queue length is between the two limits with probability 0.9. This figure shows how little informative is the average value of this variable. Note that this analysis is dynamic and the results are shown as functions of time.

On the following figure we can see the 3D image of the probability for the lenght of the queue no. 20. The vertical variable is the probability plotted as function of the model time and queue length.

 

Go back

==============================================================
PROGRAM QMGW - BLOCK PARAMETERS                       09/06/2000
==============================================================
Actual file : C:\PSM\assem2.txt.blw

Block 1    type: Generator      Initial time = 0.0
Distribution  NEGEXP(3.5)
Generates groups of 1
-----------------------------------------------------------------------
Block 2    type: Generator      Initial time = 0.0
Distribution  NEGEXP(1.2)
Generates groups of 1
-----------------------------------------------------------------------
Block 3    type: Generator      Initial time = 0.0
Distribution  NEGEXP(0.5)
Generates groups of 1
-----------------------------------------------------------------------
Block 5   Type: Server
Distribution : erlang(2,1.7)
Additional delay on output = 0
Cost per unit of time =   1.00  Cost per operation =   1.00
-----------------------------------------------------------------------
Block 6    type: Queue of type FIFO
Unlimited length. Zero initial length
Cost per entity*time-unit =     0.00
-----------------------------------------------------------------------
Block 7    type: Queue of type FIFO
Unlimited length. Zero initial length
Cost per entity*time-unit =     0.00
-----------------------------------------------------------------------
Block 9    type: Assembly operation
Distribution : erlang(3,2.3)
Variable no. of parts on inputs.
Additional delay = 0
Cost per unit of time =   1.00  Cost per operation =   1.00
-----------------------------------------------------------------------
Block 10    type: Generator      Initial time = 0.0
Distribution  NEGEXP(0.75)
Generates groups of 1
-----------------------------------------------------------------------
Block 12    type: Queue of type FIFO
Unlimited length. Zero initial length
Cost per entity*time-unit =     0.00
-----------------------------------------------------------------------
Block 13    type: Assembly operation
Distribution : assemtime(x)
No of parts for inputs, top to bottom:   1   5 
Additional delay = 0
Cost per unit of time =   1.00  Cost per operation =   1.00
-----------------------------------------------------------------------
Block 14    type: Split Point
User-defined output seletion rule.
splitrul(x)
-----------------------------------------------------------------------
Block 15    type: Terminal point   
Without termination number
-----------------------------------------------------------------------
Block 16    type: Terminal point   
Without termination number
-----------------------------------------------------------------------
Block 17    type: Generator      Initial time = 0.0
Distribution  NEGEXP(6.5)
Generates groups of 1
-----------------------------------------------------------------------
Block 18    type: Queue of type FIFO
Unlimited length. Zero initial length
Cost per entity*time-unit =     0.00
-----------------------------------------------------------------------
Block 19    type: Queue of type FIFO
Unlimited length. Zero initial length
Cost per entity*time-unit =     0.00
-----------------------------------------------------------------------
Block 20    type: Queue of type FIFO
Unlimited length. Zero initial length
Cost per entity*time-unit =     0.00
-----------------------------------------------------------------------

Consult also the page of the Queuing Model Simulator. This is an independent program, needs no Delphi or other special software. The new feature of QMS is the compatibility with the PSM++ Animator. Below you can see an example of the animation screen. The background (model layout) is a user-edited bitmap imapge (.bmp). As the background you can use any image, including a photo of a real mass-service or manufacturing system.


For more information about PSM++ and its applications consult: http://www.raczynski.com/pn/pn.htm

Click here for another example of a queuing model:  

Contact:  Dr. Stanislaw Raczynski