Cabin Placement Layout Optimisation Based on Systematic Layout Planning and Genetic Algorithm

Abstract Cabin placement layout is an important part of ship cabin layout design. A good cabin placement layout can improve the efficiency of the ship’s cabin arrangement. However, optimisation of the layout of cabin placement is not widely studied and more often relies on the experience of the staff. Thus, a novel methodology combining systematic layout planning and a genetic algorithm to optimise the cabin placement is presented in this paper. First key elements are converted by a systematic planning method that is often applied in factory layout, and a preliminary cabin placement layout model is established according to these key elements. Then the circulation strength and adjacency strength are taken as sub-objectives to establish a mathematical model, and an improved genetic algorithm is used to optimise the model. The result of the optimisation is compared with the initial schemes to verify the validity of the algorithm. Finally, the human factors are introduced according to the actual situation. The AHP method is used to select the layout scheme of the cabin that is most likely to be applied in the actual cabin layout.


INTRODUCTION
The cabin placement layout optimisation problem is one that involves combinatorial optimisation. To analyse the design and optimisation of cabin layout from the perspective of layout problems, we must first have a systematic and comprehensive understanding of the problem. Dowsland [4] and Cagan [2] give a representative definition: a layout problem refers to the reasonable placement of a given set of objects in a specific layout space, so that the design objectives are optimised as much as possible, and meet the space or performance constraints. In the 1960s, Muther [19] used the method of system analysis to propose a very representative system layout design method, systematic layout planning (SLP), which combined the analysis of logistics with close relationship analysis of the operating unit, and used a hierarchical representation of the relationship between the operating units. The method analysed the logistics, people flow and information flow in the system reasonably, and achieved the optimal allocation of internal resources of the system. The proposed method enabled the facility layout problem to develop from the qualitative stage to the quantitative stage. Dowsland [3] and Leung [15] established a graph theory model of the layout, with a rectangular cube to be seen as a node of the graph. The relationship between the objects is the node relationship, which transforms the layout problem into one of finding the largest independent or largest weight plane subgraph in a known link graph.
Gomes [6] performed a comprehensive research on a facility layout by using modern design technology. Wiyaratn et al. [23] studied the layout of an iron manufacturing plant based on the SLP theory for increased productivity. The study included an operation process chart, flow of material and activity relationship chart. Lee et al. [10] proposed an improved genetic algorithm (GA) in the study of a multi-level facility layout. The relationship between stairs, walkways and other facilities is described as a form of adjacency graph, and the Dijkstra algorithm is used to calculate the shortest distance between facilities. El-Baz [5] proposed an improved genetic algorithm for the two-dimensional facility layout problems (FLP) of a production system, and carried out detailed analysis and a case demonstration. On the basis of the layout modelling of the production system to meet the facility distribution requirements, the author considered the placement of the centre of each device and the size of the simplified rectangle, equipment interference constraints, layout boundary constraints and equipment minimum interval requirements as the objective function and constraints to obtain a Pareto solution set of the optimisation problem, and then set the line layout scheme.
Traditional cabin placement layout design mainly depends on the experience of designers through repeated CAD drawing, which results in a low level of parameter automation. The inner space of a ship is relatively small and the cabin placement layout has a direct effect on the running efficiency of ship systems, so it is necessary to devise an efficient and reasonable way to optimise that layout. At present, the heuristic algorithm and computational intelligence algorithm are widely applied to solve the layout problem [7]. Liu et al. [14] used the multi-objective fuzzy design method to optimise a passenger ship's overall layout and developed a general layout drawing system for the ship. Li et al. [12] used a genetic algorithm to optimise the design of a ship's cabin layout, and combined this with CADDS5 software to complete the data processing and graphic output. Li et al. [11] used an improved genetic algorithm based on Pareto distribution to optimise a yacht cabin layout.
Most of the mentioned documents aimed to determine the placement and optimisation of the facilities inside a specific cabin, but there is not much research on the layout of the cabin placement. In this paper, referring to the above literature, the cabin is simplified to a rectangle. SLP and GA are combined to find a feasible solution method for the optimisation of the cabin position layout.

PRELIMINARY CABIN PLACEMENT LAYOUT MODEL BASED ON SLP
Since the position of the cabin in the living area is mainly studied in this paper, there is no need to consider many parameters of the ship, including its weight distribution and centre of gravity. The following assumptions also need to be made: 1) All cabin structural frames to be laid out meet the design requirements of the hull line, structural strength and safety. 2) Only the layout factors are considered and they do not involve the whole ship factor. 3) It does not involve the installation of all system facilities and supporting facilities in the cabin. According to the distribution characteristics of the living area of the teaching practice ship, the cabins that can serve the living and learning needs of the students on board include 13 functional areas such as student accommodation, washroom, bathroom, classroom, kitchen, etc., shown in Table 1

TRANSFORMATION IDEA OF SLP
Since the SLP method is mainly used in factory layout, it is generally divided into five basic elements, namely raw materials, product quantity, production route, auxiliary department and time schedule [21].
The quantity of raw materials and products is the basis of the arrangement. Only by thoroughly studying the basic elements can we get a satisfactory result. The products arranged in this paper are all types of cabins in the living area.
The quantity of products mainly refers to the attributes and types of objects to be placed, which determines the size of the factory production scale. This refers to the number of compartments to be placed.
The production route refers to the order in which the factory processes the products. This production process also affects the layout of the factory. This refers to the circulation route among cabins.
In addition to the equipment for producing products, the factory layout also requires some production service facilities, such as residual material recovery devices. In this paper, this refers to the public service cabin.
The production schedule refers to the time and time step of producing the required product. This determines the operational efficiency of the entire layout system. This refers to the order in which students' study, live and work on board.

ANALYSIS OF LOGISTICS RELATIONSHIP
In the workshop equipment layout, the logistics relationship is mainly reflected in the logistics movement and material handling in the process flow, and the material flow between each unit is mainly considered in the layout. Similarly, the main consideration in the layout of the cabin is the degree of close contact between the pairs of compartments (personnel flow, material movement), regardless of the third compartment. The SLP method is used to establish the preliminary layout model of the cabin position.
In order to cope with various layout problems, especially layout problems with a large amount of logistics data, the system layout is solved by using a logistics strength level classification table. In this table, the logistics intensity is divided into A, E, I, O, U, five intensity levels, with the intensity reducing from A to U [13]. The intensity of the logistics between the various arrangement objects is determined by the arrangement factor. The specific meaning of each grade of logistics intensity is shown in Table 2. According to Tables 1 and 2, the logistics relationship between cabins is analysed (not concerning other cabins) with two logistics factors, personnel flow and material movement, and the intensity grade is confirmed in Table 3 and represented by matrix M.

ANALYSIS OF NON-LOGISTICS RELATIONSHIP
According to the SLP non-logistics intensity grade (see Table 4), the non-logistics relationship between cabins is analysed with the use of a third type of cabin by students from any cabins as a non-logistics factor standard [16], and the intensity grade is confirmed in Table 5 and represented by matrix N. 13 13 [ ] × = ij N n (2) where ij n indicates the non-logistics intensity grade between cabin i and cabin j .

ANALYSIS OF COMPREHENSIVE CORRELATION
The comprehensive relationship analysis considers the logistics relationship and non-logistics relationship. This relationship is expressed in the SLP by m:n and the range is generally greater than 1/3 and less than 3. However, the values in actual work are generally taken as: 3:1, 2:1, 1:1, 1:2 and taken as 1:1 in this paper [18]. The analysed logistics and non-logistics intensity levels of each cabin are quantified, and A=4 , E=3 , I=2 , O=1 , U=0 . The logistics correlation between the various cabins represented by numbers is shown in Table 6.

PLACEMENT CORRELATION DIAGRAM
In order to clearly understand the relationship between the various compartments and to adjust the position of each compartment, it is necessary to draw the relevant diagram according to (1) Take the pair of compartments with a class A. relationship from Table 6, including 1 and 2, 9 and 11, and sort the four cabins by value: 2, 1, 9 and 11.
(2) Arrange cabin 2 with the highest comprehensive approach score in the centre of the position correlation figure.
(3) Deal with cabin pair 1and 2 and arrange cabin 1 in the figure. It is stipulated that one-unit distance is kept between cabins with an A-level relationship (see Fig. 1 (a)).

Fig. 1. Steps of cabin arrangement with closeness relationship A
(4) Then, cabin 9 is arranged. No A-level relationship exists between cabin 9 and cabins 1 and 2 on the figures, so thus the relationship of 9 and 1 and 9 and 2 should be taken from Tables 6 and 7, and the results are both O levels. That is, the distances between cabin 9 and 1 and between cabin 9 and 2 are both 4 units. The placement of cabin 9 is shown in Fig. 1 (b).
(5) Cabin 11 has an A-level relationship with cabin 9 and has O-level with cabin 2. Its placement is shown in Fig. 1 (c).
According to the above steps, the remaining steps can be used to deal with cabin pairs which have relations of E, I, O and U to and draw placement figures which can indicate the relationship between all cabins (see Fig. 2). In the drawing process, each cabin is simplified as a rectangle, so different arrangement schemes can be formed by following the centre of the rectangle. Finally, based on the experience of the multi-row layout of a two-dimensional production facilities layout, the cabin area correlation figure is corrected and external passages are set up. The preliminary cabin placement layout model is drawn (see Fig. 3).
So far, the preliminary cabin placement layout model of the teaching-training vessel accommodation area has been finished on the basis of SLP, which provides basic data for mathematical models for cabin placement layout optimisation.

OPTIMISATION MATHEMATICAL MODEL CABIN PLACEMENT LAYOUT SIMPLIFIED MODEL
The preliminary cabin placement layout model figure is simplified as follows: a rectangle is drawn by taking the longest side and the shortest side of the drawing area in Fig. 3 as the standard, then the drawing area is divided into four parts by the external passages, whose placement is not altered, and the relative arrangement area of each cabin is confirmed according to the relative placement of each cabin. Finally, the simplified model of the cabin placement layout is drawn (see Fig. 4).

CABIN PLACEMENT LAYOUT OBJECTIVES
Layout objectives are a basic component of the layout optimisation mathematical model and are the criteria to judge the quality of the cabin sequence combination. The selection of layout objectives is of great importance to the optimisation results. Therefore, methods for establishing the model of the cabin placement layout should be considered comprehensively. In this paper, the cabin circulation strength and cabin proximity strength are selected as the layout objectives [1]. The relationship between cabins will be analysed in conjunction with the above objectives.

Cabin circulation strength
In view of the different utilisation frequencies of each cabin on board, the relationship is defined by the cabin circulation strength. The more frequently the students use a cabin, the larger the circulation strength between two cabins is, and vice versa. The cabin circulation strength is quantised in Table 8. According to Table 8, the flow intensity between each compartment is analysed, and the coefficient of flow intensity between the compartments is defined as shown in Table 9 and represented by matrix A. 13 13

Cabin adjacency strength
The closeness degree among cabins is reflected in the differences in functions and use requirements, so this relationship will be defined by the cabin adjacency strength. The cabin adjacency strength is quantised in Table 10. According to Table 10, the adjacent strength between the cabins is analysed as shown in Table 11 and represented by matrix B. 13 13 [ ] × = ij B b (4) where ij b indicates the adjacency coefficient between cabin i and cabin j.

MATHEMATICAL MODELS
The circulation strength and the adjacency strength are taken as sub-objectives to establish the mathematical model shown in Eq. (5).
where X is a cabin sequence design variable; 1 ( ) F X is the circulation strength function; 2 ( ) F X is the cabin adjacency strength function; , , , i j k m and n are layout area numbers; L is the width from area 9 to area 11; 3 a is the length required from area 9 to area 11; 3 b is the width required from area 9 to area 11; 7 L is the length from area 12 to area 13; 8 L is the width from area 12 to area 13; 4 a is the length required from area 12 to area 13; 4 b is the width required from area 12 to area 13, as shown in Fig. 5. In view of the characteristics of the mathematical model, the basic genetic algorithm has been improved in this paper [17,9,20].
(1) Each compartment sequence is used as a chromosome, and each compartment number is used as a gene to form an integer coding method, as shown in Fig. 6. ( ) min (3) Cross-operation is the basic function of the genetic algorithm. Crossover of permutation was modelled on solutions developed for the travelling salesman problems. The order crossover algorithm is a relatively simple and effective solution [8,22]. Meanwhile, a cross-repair program [23] is used to make the infeasible individuals feasible, so as to ensure the smooth progress of the algorithm.
Firstly, two cabin sequences are randomly selected from the entire cabin sequence as parent one and parent two.
Secondly, two numbers are randomly selected from 1 to 13 as the intersection.
Thirdly, the parts between two intersections of the parents are exchanged.
Fourthly, it can be seen from the third step that compartments 2 and 8 appear repeatedly in parent 1 and compartments 1 and 5 appear repeatedly in parent 2, which does not meet the requirements of the population.
In this paper, we propose to use matrix mutation to transform many illegal individuals into legal individuals, so as to ensure that there are more modes of legal individual generation and to expand the search space.
The condition that a legal individual need to satisfy is the coding matrix of n vertices. For each 1 whose number is n, it must be in a different row and column on the non-diagonal, and 1 has no symmetric element.
The population of individuals in this paper is represented by 0 and 1 matrices. If the first number in the population is 7, it is expressed by (7,1) 1 = a . If the fifth number is 9, then it is expressed by (9,5) 1 = a . Other numbers in the matrix are 0. Take the following parent 1 cabin sequence as an example.
The [0 1] matrix is as follows.
For matrix A, the repair process is as follows: Select line i: ① If there is only one 1 on the non-diagonal line of the row, its position is (i, j) and other elements of the corresponding j column are all 0; the 1 is retained; ② If there are two or more 1 in the row, take any 1 on the non-diagonal line, and its position is (i, j), then the other 1 of the corresponding row i and column j will be changed to 0; ③ If the row has no 1 and the corresponding j column has no 1, if i j ≠ then in position (i, j), change 0 to 1; if i j = then change 0 to 1 elsewhere in the row.
④ If there is a symmetric element of 1, exchange its row with one of the rows in the matrix until there is no symmetric element in the coding matrix.
Repeat (1) -(4) until all 1s of the matrix are in different columns of different rows, and all 1s have no symmetrical elements and no 1s on the diagonal line.
According to the above steps, the illegal matrix is converted to a legal matrix, and the process is as follows: The individual population becomes of the following form. It can be seen that this population meets the requirements.
(4) In the mutation operation, the exchange mutation method is adopted to exchange two cabin numbers in a cabin sequence. The main principles are as follows: Firstly, one cabin sequence is randomly selected from all cabin sequences as parent 1.
Secondly, two positions are randomly identified as variation points in the selected cabin sequence.
Thirdly, the cabin numbers of variation points are interchanged.

Analysis of computed results
Setting the number of population to 50 and iteration times to 500, the crossover probability is 0.9 and the mutation probability is 0.1. After comparison, the following five program output schemes with smaller objective function values are selected to be analysed (see Table 12).  The algorithm starts to converge at around 160 generations according to Fig. 7. This shows that the improved basic genetic algorithm has successfully solved the mathematical models for optimisation of the cabin placement layout.

Validation
In order to verify the validity of the algorithm, the cabin placement layout result solved by the improved GA is compared with SLP. The objective function value solved by GA is 176.5. The algorithm starts to converge around 412 generations according to Fig. 8. Also, the percentage increase of the cabin placement layout schemes is 5%, but the computing time is much longer than with the improved genetic algorithm. The objective function value solved by SLP is about 221.4, and percentage increases of five cabin placement layout schemes output by the programs are positive, respectively 24.0%, 19.4%, 20.6%, 19.1% and 15.7%, which shows that in terms of cabin circulation and cabin adjacency, the schemes output by the improved genetic algorithm are better than the preliminary layout scheme. Figs. 9-13 illustrate the cabin placement layout models of the five schemes output by the programs. Since the program seeks the best combination of cabin positions in strict accordance with the defined parameters, and the selection of parameters is influenced by subjective factors, the above-mentioned cabin position layout schemes only represent the relative position between the cabins in terms of cabin adjacency and cabin circulation. In order to determine which compartment position layout scheme is most likely to be applied to the actual cabin layout, the five schemes are selected using the analytic hierarchy process.

OPTIMAL CABIN PLACEMENT LAYOUT BASED ON AHP
The analytic hierarchy process (AHP) was proposed by the famous mathematician T. L. Satty in the middle of the 20th century. This is a simple, practical, multi-level and systematic comprehensive analysis method, especially for complex multiobjective decision-making [24].

1) Establishing hierarchical structure
The cabin placement layout hierarchical structure is shown in Fig. 14.

2) Establishing judgment matrix for each layer
The judgment matrix of the importance of each factor of the criterion layer to the objective layer is shown in Eq. (7).
where ij B indicates the importance of criterion i and criterion j to the objective layer.
Establishing the judgment matrix of the scheme layer relative to the criterion layer, in Ep. (8), the judgment matrix is used to express the importance of the five schemes to the functional uniformity of the criterion layer.
In Eq. (8), 1 ij C indicates the importance of scheme i and scheme j to the functional uniformity of the criterion layer.
In Eq. (9), 2 ij C indicates the importance of scheme i and scheme j to the circulation route reasonableness of the criterion layer.
In formula (10), 3 ij C indicates the importance of scheme i and scheme j to the adjacency reasonableness of the criterion layer.

3) Single layer sorting
The maximum characteristic root max λ and corresponding eigenvector of each judgment matrix are solved, then the maximum characteristic root is normalised, and the normalised vector w is set as the weight of each factor. The solution results are shown in Table 13. From Table 13, it can be seen that the CR value of each judgment matrix is less than the specified value 0.1 in the AHP, and the single layer sorting passes the consistency check.

5) Overall layer sorting
The overall sorting results of the factors of the scheme layer to those of the objective layer are shown in Table 15:  Table 15, it can be seen that the weights of the five schemes are, from one to five: 0.3693, 0.2851, 0.1329, 0.1333, and 0.0794. The five layout schemes are sorted as: scheme 1 > scheme 2 > scheme 4 > scheme 3 > scheme 5, so after AHP analysis, scheme 1 is the optimal scheme among the five cabin position layout schemes.

CONCLUSION
The placement layout design of ship cabins plays an important role in the general layout design of a ship.
In this paper, the key elements in the implementation of the SLP method are analysed. According to the logistics relationship, non-logistics relationship and comprehensive relationship between the cabins, and based on the comprehensive approach degree between the cabins, the preliminary cabin position correlation diagram is drawn after repeated modification to realise the preliminary diagram of the cabin position layout model.
Taking the degree of circulation and the degree of adjacency as the objective function, the mathematical model of the cabin position layout is established, and the improved genetic algorithm is used to optimise the solution. A feasible solution system is found to solve the cabin position layout problem, and the best cabin position layout scheme is given. Compared with the traditional genetic algorithm and SLP method, the improved algorithm is proved to be correct and effective.
Finally, considering the human factor in the layout of the cabin, combined with AHP, five better schemes are evaluated, and the most likely scheme for use in the actual layout of the cabins is selected. This is of great significance to the study of designing the automatic layout of cabin positions and lays a foundation for the specific layout of cabins. However, this is a combinatorial optimisation problem, which means it is an NP hard problem. At the same time, many factors should be considered in the layout of cabin placement. The following work will be carried out in future. 1) When building the mathematical model of cabin layout optimisation, only two important indexes are selected. How to build more indexes and a more comprehensive mathematical model are subjects worthy of further study. 2) In this paper, only the location layout stage of the cabin layout design is studied. For the specific cabin layout problem, many other constraints and layout criteria need to be considered in detail. 3) For the improved basic genetic algorithm, the improved strategy only refers to the methods related to this kind of problem. A new algorithm or a more detailed improvement strategy should be proposed to solve similar layout problems more effectively.