PRODUCTION LAYOUT PLANNING USING GENETIC ALGORITHMSPRODUCTION LAYOUT PLANNING USING GENETIC ALGORITHMS

processes and services), flexibility (types of products, capacity, space, time) and a company´s innovative capability. Therefore the enterprise’s facility layout needs to be more flexible to adapt to the rapidly changing environment. The need for flexibility of layout planning puts higher requirements for utilisation of layout and location problem solving methods. Classical methods, like linear programming, dynamic programming or conventional heuristics are being replaced by advanced evolutionary algorithms, which give better solutions to large-scale problems. One of these methods are also genetic algorithms. This article describes the genetic algorithm utilisation in the production layout planning.


Requirements for the production layout planning
Current pressure on rapid innovations in the factory places increasing requirements also on the manufacturing and logistics systems design from the point of view of reduced laboriousness, consumption of time and costs for the whole system of technological design and, at the same time, on growth of quality, complexity and ability to testify the outputs generated from this process [1].
Based on the mentioned reasons it is possible to sum up the following fundamental requirements on the process of technological design [2]: • rapid design of new solutions, • maintenance of systematic approach in design, • manufacturing systems design as part of digital factory concept, • interactive design of a new manufacturing/logistics system, • possibility of ongoing monitoring and assessment of proposed solution variants, • implementation of optimisation approaches to design the time and spatial structure of the manufacturing system, • proper visualisation and presentation of design outputs, • possibility of dynamic verification of a proposed solution.
From the viewpoint of spatial arrangement of manufacturing and logistics structures, the following decision criteria are important [3]: • minimisation of transport-related outputs and costs, • minimisation of the areas needed, • provision of occupational hygiene and safety, • flexibility and the possibility of changes in the future, • favourable conditions for team work, • minimisation of reserves and continuous time, • simple material flow, • connection to an external logistics chain, • possibility to flexibly optimise the arrangement in compliance with the changing production program.

Methods for layout planning
A key assumption of the "right" production layout proposal is correct preparation and analysis of input data. Fundamental layout planning data source is the technical preparation of production. Layout planning data contain information about products (assortment, bill-of-material, design parameters, production volume, etc.), production processes (operations, used conditions in the system and low interactivity of a designer with a proposed solution. This group consists of methods of linear and non-linear programming, a transport problem, methods of dynamic programming, etc. • Heuristic methods: they are based on simple algorithms of solving and investigation into the fulfilment of criteria (conditions) given by a particular algorithm. They feature relative simplicity, low demand for computing and high interactivity with a designer (the designer can interfere with the solution in any phase). However, they do not guarantee finding the global optimum and usually are unable to determine how close the found solution is to the optimum. Heuristic methods for proposal of spatial arrangement are divided into: o Construction procedures -based on the gradual insertion of system elements to the layout (starting with the elements with the highest transport intensity or with the strongest bonds); following methods belong to this group: CORELAP, ALDEP, PLANET, MAT, MIP, INLAYT, FLAT, etc. o Exchange procedures -based on the original placement, which they try to improve through the object interchange; following are some examples of the methods: CRAFT, MCRAFT, MULTIPLE, H63, FRAD, COFAD, etc. o Combined procedures -using a combination of the two above mentioned approaches (usually a construction procedure proposes the initial placement and an exchange procedure makes further improvement); examples of methods: BLOCPLAN, LOGIC, etc. • Metaheuristic methods: These methods produce the results of much higher quality than classical heuristics. Their advantage is the ability to leave -under certain conditions -found local extremes, which classical heuristics cannot do. Following methods belong to this group: genetic algorithms, simulated annealing, tabu search, Ant Colony optimisation, etc.
These mathematical methods use one of the following two basic types of layout quality assessment [6] where f ij is numerical adjacency-based scoring of relations among objects i and j, x ij is the adjacent coefficient (x ij =1 if the workplaces i and j are adjacent (neighbouring), x ij =0 if they are not adjacent) and m is the number of workplaces. 2. Assessment based on total transportation outputs or costs (Distance-based scoring): the objective is to minimise the technologies, time standards, etc.) and production resources (machines, tools, personnel, etc.) [4].
The basic results of the input data analysis have to serve following data: • information about material flow processed in "from-to" table ( Fig. 1a) or information about relationships among workplaces in relationship chart, • overall requirements of production resources (machine types and number of machines) as a result of capacity calculations (Fig. 1b).
These data sets form the basis for optimal layout planning of the manufacturing system. Proposing an ideal arrangement, it is advantageous to use optimisation methods and algorithms which can be classified as follows [5]: • Graphical methods: they are suitable for solving simple problems, because a graphical presentation of spatial arrangement is used when looking for an optimal solution. Following methods belong to this group: Sankey chart, spaghetti diagram, relationship diagram, etc. • Analytical methods: they are represented by optimisation methods of operational analysis. They are characterised by a mathematical model that describes an objective function and boundary conditions of the problem solution. Their disadvantage is high demand for calculation, complicated and often even impossible mathematical description of real The next steps after determining the fitness of all individuals in current population are two decision blocks, where the first evaluates, if the termination criterion is met (e.g. cost is below the specified value) and the second checks, if the maximum number of generations is not exceeded. If none of the above applies, the evolution section takes place. Within the evolution, the algorithm must first select the parents. As we mentioned, higher fitness means higher probability of individual being chosen. Several methods for choosing parents are known, we particularly can mention these [9]: • Roulette mechanism with fitness-proportionate selection • Roulette mechanism with rank selection • Stochastic universal sampling • Tournament mechanism • Elitism After determining the parents, genetic operators ( Fig.  3) are applied, to create offspring. Crossover is an analogy to chromosomal recombination and reproduction in biology on which they are based. It is a genetic operator, which is responsible for mutual exchange of parts of chromosomes. Mutation is a genetic operator used to maintain genetic diversity of the population. Within mutation, one or more alleles in the chromosome are altered from their initial state. The main goal of mutation is to prevent algorithm from being stuck in the local extreme by preventing excessive similarity of individuals.

Fig. 3 Genetic operators -crossover and mutation
After application of genetic operators, new population is created, where both offspring and parents can be present, depending on the rules used within evolution. Subsequently, evaluation section calculates new fitness values and decides if another iteration is needed.
The main advantages of genetic algorithms include: • They work with a population of possible solutions, thus it is less probable for the algorithm to end at a local optimum. • They do not require any special knowledge about target function, they are universal. • Genetic algorithms have very good results with problems with a large set of possible solutions. • Versatility for a variety of optimisation problems.
Disadvantages include: • They do not find optimal, but feasible solution.
total transportation output and transportation costs for a proposed spatial placement. Data from the matrix table of transportation relations are used as inputs.
where f ij is the intensity of material flows between objects i and j, c ij are transportation costs for one material unit on the distance unit between objects i and j and d ij is the distance between objects i and j.

Genetic algorithms
Genetic algorithms are based on the principle of natural evolution, which was described in Darwin's book "On the Origin of Species by Means of Natural Selection, or the Preservation of Favoured Races in the Struggle for Life"(1859). In the seventies of the twentieth century, J. H. Holland proposed the idea of genetic algorithm as an abstraction of appropriate genetic processes [7]. A decade later, genetic algorithms became one of major rapidly developing fields of informatics and artificial intelligence. Figure  2 shows the basic procedure of genetic algorithm, which was divided into two main sections -evaluation and evolution [8].

Fig. 2 Genetic algorithm
After generating the initial population, which can be created randomly, or based on historical/empirical data, the evaluation section takes place. The first step is to evaluate each individual in relation to the solved problem. Within genetic algorithms, we call the function that evaluates individuals as "fitness function". The basic principle of genetic algorithm is that individuals with better fitness must be unconditionally preferred in selection to next generation. However, with certain probability, it is possible for every solution to be selected. This ensures the diversity of the population.
X and Y coordinates of each machine inserted into the layout. Mechanisms for machine overlap correction and desired layout dimension maintenance were also incorporated. After the run, following data are transferred back to Excel [10]: • X-Y coordinates of each machine, • fitness value of proposed solution, • graphic interpretation. Figure 5 shows the best initial solution from the first generation (a), average and best fitness values during the run (b), and final solution visualisation in Excel (c).
If we consider machines in layout as dimensionless (dimensions are not given in input section), the obtained result can be interpreted as "slots" for the machines (the layout dimensions are equal to the number of available slots in each direction), and the graphic interpretation in Excel is sufficient. However, for more accurate layout design it is necessary to take real dimensions into account, therefore there was a need for advanced drawing software. After consideration we decided to implement the interconnection with AutoCAD software (Fig. 6), where not only the obtained plant layout can be constructed, but • The implementation of the algorithm, the representation of solutions and the formulation of evaluation function can be difficult.

Layout planning using genetic algorithms
Currently, system for plant layout design is being developed at the Department of Industrial Engineering at the University of Zilina, utilising genetic algorithms. At this stage, input and results are transferred between Matlab and Excel spreadsheet, where simple user interface was created. In the spreadsheet, we input parameters such as number of machines, dimensions, types and probabilities of genetic operators or intensities between workstations/machines (Fig. 4).
After setting the input parameters we run the layout generator, coded in Matlab/ GNU Octave language. The algorithm creates initial solutions in a specified quantity and performs evolution. The chromosome structure was determined as 2*n, where n is the number of machines. Therefore, we store information about  [12]. Described approach connects the algorithmic solution of the spatial arrangement problem (utilising genetic algorithms) with both static (FactoryFLOW) and dynamic (Plant Simulation) verification and also a graphical representation of the proposed production system (AutoCAD, FactoryCAD). The benefits of application of genetic algorithms are manifested mainly when solving large-scale problems of spatial arrangement, where genetic algorithms can effectively and more quickly converge to solution than traditional algorithms for spatial arrangement optimisation, described in Chapter 2.
Described layout design procedure provides: • Reduction of the time needed to design the spatial arrangement of the large-scale production system. • Increase of the design quality through the implementation of appropriate configuration of boundary conditions to the algorithm, • Complex verification of an obtained spatial arrangement solution through static and dynamic verification of the proposed system. • Cost reduction in a designed production system. • Visualisation of the spatial arrangement through a 3D model of the production system, which can be further presented and utilised with the use of progressive computer technologies, such as virtual and augmented reality.
also thanks to installed FactoryCAD/ FactoryFLOW extensions, we can insert 3D models of machines in *.JT format, thus creating 3D model of machine layout and evaluate various aspects of the solution, such as material flow, aisle congestion, area structure or the possibility of milk run implementation with included tools. Also, thanks to SDX (Simulation Data eXchange) format, it is possible to evaluate obtained layout dynamically in another software solution by Siemens -Plant Simulation [11]. Thanks to these functionalities, we can not only get a possible layout solution, but also evaluate it both statically, and dynamically, which provides us with an advantage over solutions where only simple non-interactive block layout is created.

Conclusion
This paper describes the utilisation of genetic algorithms in the layout design of production systems. Authors' workplace addresses mentioned issues within the development of the digital factory concept and advanced industrial engineering methods