Você está na página 1de 12

ALS Assembly Line Simulator V. 1.

ALS
Assembly Line Simulator v. 1.0 March 2012 By Lorenzo Tiacci*

*Dr. Lorenzo Tiacci, Phd Universit degli Studi di Perugia Dipartimento di Ingegneria Industriale Via Duranti, 67/A 06125 Perugia - Italy Tel: +39-0755853741 e-mail: lorenzo.tiacci@unipg.it web: http://impianti.dii.unipg.it/tiacci

ALS Assembly Line Simulator V. 1.0

Index 1 2 Introduction The conceptual model 2.1 2.2 2.3 2.4 2.5 3 4 Notation Task times of completion Representation of a line configuration Model sequencing Stochastic task times 3 3 4 4 4 5 5 6 7 8 8 8 9 10 10 11 11 12

Downloading and installing Using ALS as a library 4.1 The Simulation class Constructor Attributes Example 4.1.1 4.1.2 4.1.3

Using ALS as an application 5.1 5.2 Inputs Outputs

6 7

Source code Licence

ALS Assembly Line Simulator V. 1.0

Introduction

ALS (Assembly Line Simulator), is a Java based simulator for mixed model assembly lines. ALS is the result of the ALS Research Project (http://impianti.dii.unipg.it/tiacci/English/research/ALS.html), and has been developed with the scope to be usable by researchers and practitioners.

The conceptual model

In the line, each operator has a workstation (WS) where he performs one or more tasks. Each work centre (WC) consists of either one workstation, for the case of non-paralleling, or multiple parallel workstations (see Figure 1). Paralleling means that when a WC consists of two or more workstations, all the tasks assigned to the WC are not shared among the WS, but each WS performs all of them. Thus an increment of production capacity of the WC is obtained through the addition of one (or more) WS which performs the same set of tasks. The aim of using parallel stations is often to perform tasks with processing time larger than the desired cycle time. However, also if any given task time does not exceed cycle time, the possibility to replicate workstations may be desirable, because it enlarges the space of feasible solutions of the balancing problem, including many feasible and potentially better balanced configurations.

buffers

operator workstation work centre

Figure 1. An assembly line with parallel workstations and buffers.

The line is asynchronous, that is as well as blockage and starvation are possible. One WC with multiple WSs is considered busy if every WS inside is busy. If a WS finishes its work on a workpiece while the subsequent WC is still busy (or the subsequent buffer is full), the workpiece cannot move on, and remains in the current WS keeping it busy (blocking after processing policy); the WS will be released (i.e. will be able to process another workpiece) only when the workpiece leaves the WS. Pieces are retrieved from buffers following a First In First Out rule. If a buffer is placed before a WC with parallel WSs, pieces are retrieved from the same buffer by all the WSs. The first WC is never starved (there is always raw material for the first WC) and the last station is never blocked (there is always storage space for the finished product)

ALS Assembly Line Simulator V. 1.0

2.1 Notation
i j k tij task index (i = 0, ..., n-1) model index (j = 0, ..., m-1) work centre index (k = 0, ..., p-1) time required by model j in work centre i.

2.2 Task times of completion


A set of n tasks (numbered with i = 0,, n-1) has to be performed in the line in order to complete each product. Because we are dealing with mixed model lines, the number of models (types of product) to be assembled can be higher than one, and it is indicated by m (numbered with j = 0, , m-1). Input data are thus represented by an n x m matrix tij whose elements represent the average completion time of task i on model type j. The 2 x 7 matrix depicted in Figure 2 represents the case in which 2 types of products (models) have to be assembled; each model requires 7 tasks to be completed. For example the average task time of task #4 of model #0 is equal to 5 minutes (or, in general, time units). It is noteworthy that if the completion of a model does not require the execution of a certain task, this would result in a 0 in the corresponding matrix element.
Model# tij={{ 10, 8 }, { 3, 9 }, { 8, 8 }, { 7, 8 }, { 5, 9 }, { 6, 10}, { 13, 2 }} Task# 0 1 2 3 4 5 6 b. Figure 2 a. The tij array representation. b. Tabular representation of input task times. 0 10 3 8 7 5 6 13 1 8 9 8 8 9 10 2

a.

2.3 Representation of a line configuration


A line configuration represents a specific solution of the MALBP, and is characterized by the following information: the total number of WC in the line; the number of WS in each WC; the presence and the size of buffers before each WC; how many and which tasks are assigned to each WC (and are all performed by each WS assigned to the WC).

The line configuration can be represented by a two-dimensional array lckz (k = 0, , p-1), where p (the number of rows) represents the total number of WC in the line. Each row represents a WC. The first element is the number of WSs assigned to the WC: a number higher than 1 means parallel WSs. The second

ALS Assembly Line Simulator V. 1.0

element represents the size of the buffer placed before the WC: 0 means no buffer. The subsequent elements represent the tasks assigned to the WC. Note that rows do not necessarily contain the same number of elements. For example, Figure 3 shows a solution that represents a line composed by 3 WC. Tasks #1, #3 and #6 are assigned to WC#0, in which 2 WSs operate. Tasks #2 and #0 are assigned to WC#1 (with 1 WS), and task #4 and #5 are assigned to WC #2 (with 1 WS). A buffer of unit size is placed between WC#1 and WC#2. Note that because there are always raw materials for the first WC, the buffer before WC#0 is useless, having no impact on the line throughput, and its size should be set to 0.

lckz = { { 2, 0, 1, 3, 6 }, { 1, 0, 2, 0 }, { 1, 1, 5, 4 } }

WC# 0 1 2
1, 3, 6 2, 0

WSs assigned 2 1 1
b.

Buffer size 0 0 1

Tasks assigned 1, 3, 6 2, 0 5, 4

a.

5, 4

c.

Fig. 3.

a. The lckz two dimensional array. b. Tabular representation. c. Graphical representation.

2.4 Model sequencing


The simulator allows also to specify the sequence of models assembled through the line: this sequence is represented by an array of integers s. For example, in case of two models (#0 and #1) the array s = {0,0,1,1} means that after two model#0, two model#1 will be assembled, and so on. s = {0,1,0,1} means that the two models are alternated. The sequence of numbers in the array (whose length can be arbitrarily chosen) is taken as reference for the generation of different model types entering the line.

2.5 Stochastic task times


In order to take into account another important feature of real assembly lines, stochastic task times have to be considered. The literature on stochastic ALBP is ample, and most authors assume the task times to be independent normal variates, which is considered to be realistic in most cases of human work (Whilhem, 1987). In this first version of ALS, task times duration can be modelled, through the definition of the string distType, in three ways: deterministic (distType=DET), normally distributed (distType=NORM), and exponentially distributed (distType=EXP). Deterministic task times are exactly defined by the matrix tij. If task times are normally distributed, the standard deviation ij of the completion time of task i for model j is taken equal to its mean value (tij) multiplied by a coefficient of variation cv (ij = cv . tij). If task times are

ALS Assembly Line Simulator V. 1.0

exponentially distributed, the density function of completion time is characterized by the single parameter tij (equal to the mean value and the standard deviation).

Downloading and installing

The zipped ALS_1.zip file contains all the necessary files that allow ALS to be run in a computer, in which the Java Virtual Machine has been installed. ALS works with version 1.7 of SDK, so it is recommended to download and install the last version of the JVM for your platform. Once the file has been unzipped, the following items are contained in the ALS folder: ALS_1.jar Readme.txt A lib folder containing the third parties libraries (jar files) utilized by ALS, that is: colt.jar, Helsgaun.jar, ssj.jar. The lib folder has to remain in this position during ALS_1 execution, i.e. in the same folder of ALS_1.jar file, both using ALS as a library and as an application. A problems folder, containing two folders (problem1 and problem2). Each of them contains task times and line configuration files that can be loaded when using ALS as an application (Section 5).

ALS Assembly Line Simulator V. 1.0

Using ALS as a library

ALS has been designed to be effectively coupled to those algorithms and procedures where numerous variants of line configurations have to be simulated, and the evaluation of a fitness function (which includes some line performances indicator, such as the throughput) has to be performed several times. Using ALS with as a library simply requires the setup of the build path in order to tell the compiler (eg. NetBeans) where the classes can be found. A one-time setup is needed to link NetBeans with the classes, and a project-specific part adds ALS to a project's build path A project can be created using the New Project command in the File menu. The user then selects Java application in the dialog box that appears, and follows the instructions. After a project is created, it can be set up to use ALS as follows. In the Project tab of NetBeans, the user right-clicks on the name of the project that should use ALS, and selects Properties in the context menu that comes up. The user then selects the Libraries item in the left part of the dialog box that comes up. This results in a window similar to the next figure.

The user then clicks on the Add JAR/Folder button, and selects the ALS_1.jar file through the dialog box.

ALS Assembly Line Simulator V. 1.0

In order to use ALS as a library, the library has then to be imported (as any Java library, see the Example in Section 4.1.3).

4.1 The Simulation class


ALS is contained in a package named lineSimulator, which provides the public class Simulation, whose constructor and attributes are described in the following. The Simulation class does not provide any method. When a Simulation object is created the model of the assembly line is created, the simulation is performed and outputs are stored in the attributes described in Section 4.3.
package lineSimulator public class Simulation Constructor public Simulation (String distType, double cv, int simulationLength, int[] s, double[][]taskTimes, int[][]lc) Attributes public double cycleTimeAverage; public double cycleTimeSD; public double flowTimeAverage; public double flowTimeSD; public int loadsCompleted; public double tp; public double workInProgress; public double executionTime;

4.1.1 Constructor The public class Simulation constructor requires all the inputs described in Section 2: the array tij of tasks times completion (double[][]t); the array lckz (int[][]lc) that describes the line configuration; the array s (int[]s) that defines the sequence of models entering the line; the string distType representing the task times distribution (String distType); the coefficient of variation cv (double cv) which is influent only if distType = NORM; the simulation length (double simLength), expressed in the same time units of the array tij

4.1.2 Attributes When an object Simulation is created, the model of the assembly line is created, the simulation is performed and outputs are obtainable by accessing the following public attributes of the object:
double cycleTimeAverage: the average value of cycle time during the simulation. Cycle time is

measured as the time that passes between two consecutive loads coming out from the line; double cycleTimeSD: the cycle time standard deviation; double flowTimeAverage: the average value of flow time during the simulation; flow Time is measured as the difference between the time of a load coming out from the line and its time of entering the line; double flowTimeSD: the flow time standard deviation; int loadsCompleted: the number of loads that have been completed during the simulation; double tp: the average throughput, calculated as cycleTimeAverage inverse.

ALS Assembly Line Simulator V. 1.0

double workInProgress: the average number of loads in the line; it is calculated (using the

Little law) as the product between tp and flowTimeAverage (average values of throughput and flow time). double executionTime: the simulation execution time expressed in seconds.

4.1.3 Example In the following an example of using ALS as a library is shown. In this example the required inputs are defined by code and correspond to a problem in which 3 models are assembled, and a line configuration with 7 workcentres is defined.
package example; import linesimulator.Simulation; public class Example { public static void main(String[] args) { String distributionType = "NORM"; double cv = 0.1; int s [] = {0,1,2}; int length = 100000; double [][] tTimes = {{0, 0, 0},{2, 2, 2},{2, 2, 2},{2, 2, 2},{2, 2, 2},{2, 2, 2}, {0, 11, 11},{0, 0, 16},{21, 39, 37},{2, 2, 2},{10, 10, 10}, {3, 0, 0},{11, 11, 11},{4, 4, 4},{0, 4, 4},{9, 9, 0},{13, 13, 12}, {6, 6, 6},{7, 7, 7},{3, 3, 3},{28, 37, 33},{3, 3, 3},{8, 8, 8}, {5, 5, 5},{7, 7, 9},{4, 4, 4},{6, 6, 6},{5, 5, 5},{0, 0, 2}, {1, 1, 1},{3, 3, 3},{3, 3, 3},{0, 0, 3},{4, 4, 4},{2, 2, 2}, {2, 2, 2},{1, 1, 1},{1, 1, 1},{1, 1, 1},{1, 1, 1}}; int lc [][] = { {1,0,1,2,3,4,6,7,11,15}, {2,0,5,8,9,10,13,14,19,23}, {1,0,12,16,17}, {1,0,18,21}, {2,0,20,22}, {1,0,24,25,26,27,28,29,30,31,34,37}, {1,0,32,33,35,36,38,39}};

Simulation sim = new Simulation(distributionType, cv, length, s, tTimes, lc); System.out.println("cycleTimeAverage:\t"+sim.cycleTimeAverage); System.out.println("cycleTimeSD:\t"+sim.cycleTimeSD); System.out.println("flowTimeAverage:\t"+sim.flowTimeAverage); System.out.println("flowTimeSD:\t"+sim.flowTimeSD); System.out.println("loadsCompleted:\t"+sim.loadsCompleted); System.out.println("workInProgress:\t"+sim.workInProgress); System.out.println("tp:\t"+sim.tp); System.out.println("executionTime:\t"+sim.executionTime); }

Compiling and running the code will provide the following output:
cycleTimeAverage: cycleTimeSD: flowTimeAverage: flowTimeSD: loadsCompleted: workInProgress: tp: executionTime: 34.44160732397404 5.275465798847362 234.43096348134168 6.7561235223981475 2899 6.8066208779449004 0.029034649590930158 0.031

ALS Assembly Line Simulator V. 1.0

Using ALS as an application

Although the primary utilization of ASL is expected to be as embedded in the code of algorithms and procedures, a very simple GUI has been implemented (Figure 3). The application is started, and the GUI is visualized, just by double clicking the ALS_1.jar file. It allows to manually insert all the inputs required, included task times and line configuration information (that can also be loaded from and saved to text files), and to display outputs and execution time of the simulation run.

5.1 Inputs
Task times distribution. Three possible values (NORM, EXP, DET) can be selected from the corresponding menu. Coefficient of variation. Use the dot as decimal separator. Simulation length. It is expressed in the same time units of task times. Model sequencing. The array of models sequencing (Section 2.4) has to be inserted without spaces between each model. Note that the higher number of models types is 10 (0,1,,9) Task times. o Manual insertion. Specifying the number of different models (tot models number) and tasks number (tot tasks number), a table is created with the appropriate rows and columns in which task times for each model can be inserted. o Save task times. Once task times have been inserted in the table, they can be saved in a *.txt file (text separated by tab) and successively loaded. o Load task times. Task times that have been previously saved can be loaded by selecting the appropriate file.

Figure 3. The graphical user interface of ALS.

Line configuration. o Manual insertion. Specifying the number of WorkCentres (tot WC number), a table is created with the appropriate number of rows. In each row (corresponding to a WC) the following data have to be indicated in the corresponding columns: the number of Work

10

ALS Assembly Line Simulator V. 1.0

o o

Stations in the WC (N of WS), the WCs buffer Size, and the tasks assigned to the WC (separated by spaces). Save line configuration. Once the line configuration has been inserted in the table, it can be saved in a *.txt file (text separated by tab) and successively loaded. Load line configuration. Line configurations that have been previously saved can be loaded by selecting the appropriate file.

5.2 Outputs
Once all the inputs have been inserted, the simulation can be started by clicking the run Simulation button. Then following outputs are shown in the GUI. Cycle Time, average value and standard deviation during the simulation Flow time, average value and standard deviation during the simulation Loads completed: the number of loads that have been completed during the simulation; Throughput: the average throughput, calculated as average cycle time inverse. WIP: workInProgress, the average number of loads in the line; it is calculated (using the Little law) as the product between the average values of throughput and flow time. execTime: the simulation execution time expressed in seconds.

Source code

The implementation of ALS is described in the paper: Tiacci, L., 2012. Event and object oriented simulation to fast evaluate operational objectives of mixed model assembly lines problems, Simulation Modelling Practice and Theory, 24, 3548.
http://dx.doi.org/10.1016/j.simpat.2012.01.004

The source code of ALS is available only for academic/research purposes. Please contact the author for information.

11

ALS Assembly Line Simulator V. 1.0

Licence
This file is part of ALS. Copyright (C) 2012 Lorenzo Tiacci and University of Perugia ALS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. ALS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ALS. If not, see the GPL licence site.

12

Você também pode gostar