Escolar Documentos
Profissional Documentos
Cultura Documentos
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
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
6 7
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.
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
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)
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.
a.
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
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.
exponentially distributed, the density function of completion time is characterized by the single parameter tij (equal to the mean value and the standard deviation).
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 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.
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.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.
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
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.
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
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
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