Dangerous Goods Container Location Allocation Strategy based on Improved NSGA-II Algorithm

The characteristics of port dangerous goods are complicated and diverse in danger, which is very likely to cause chain effects once a fire and explosion accident occurs. Based on the distribution characteristics of dangerous goods container yards and the special national storage requirements for dangerous goods containers, the paper establishes a multiobjective optimization model with a double priority of safety and economy, starting from reducing the number of reversals. The improved non-dominated sorting genetic algorithm based on the elite strategy was used to solve the model and the algorithm was tested and improved. Based on the Pareto optimal solution set, the entropy weight-TOPSIS method was used to optimize the sorting of multiple solution sets, which improved the performance of the algorithm. The analysis further clarifies the important relationship between attributes, and the running time is shortened by 85.7% compared with the traditional NSGA algorithm. The optimization model and algorithm can provide decision support for the actual operation and management of container storage, and provide a good reference for accident risk prevention and control. Keywords—Dangerous goods containers; container allocation; improved NSGA-II algorithm; entropy weight-TOPSIS


I. INTRODUCTION
The wide range of chemicals in port, hazardous chemical yards, their high hazardousness, and mobility poses a double challenge for business process optimization and risk control in the yards. In 2015, the "8.12" fire and explosion accident in Tianjin Port caused serious casualties and property damage, which was mainly caused by the irregular management of dangerous goods container yard storage, and the serious phenomenon of overloading, over-height, and irregular mixed storage. To further strengthen the safety management of dangerous goods in ports and to prevent and reduce dangerous goods accidents, the Ministry of Transport of the People's Republic of China revised the Provisions on the Safety Management of Dangerous Goods in Ports in 2017, putting forward higher requirements on the risk management of dangerous goods in ports.
The allocation of container yard space is a key factor that restricts the efficiency of terminals and increases the operational costs of the terminal. Reducing the number of unloads to increase terminal efficiency and reduce operating costs has become the focus of research in this field. Zhang and Ambrosino et al. [1], [2] consider the weight of the container and develop a dynamic model to reduce the number of reversals. Galle et al. [3] established the optimization model of container pre-marshaling by considering the loading order. A new unified integer programming model was designed to solve the problem of reducing the number of containers unloaded. In addition to the weight and shipping order, the uncertainty of delivery time [4], exit box entry time [5], [6], and pick-up time [7], [8] are also critical factors that affect unloading operations. Besides the number of box dumps, the task allocation of the bridge [9] and moving path [10] also affect the box allocation strategy. All the strategies mentioned are used for ordinary containers, with no consideration of dangerous goods container stowage rules, Zhou et al. [11] established a distribution optimization model for dangerous goods containers by considering the storage height limit, and this model was solved using the Monte Carlo tree algorithm, it improves the efficiency of putting boxes away, but it does not take into account the impact of the number of reversals on safety.
Many algorithms to solve bin allocation exist, such as the heuristic algorithm [6], [12] particle swarm algorithm [13], tabu search algorithm [14], mixed harmony simulated annealing algorithm [10], [15], and genetic algorithm [9], [16], [17]. Among these, the genetic algorithm is used more widely used. Tang et al. [18] designed a genetic algorithm-based heuristic to solve the storage problem of a large iron ore terminal; Jun and Chen [19] established a mixed-integer programming model based on yard crane resource optimization and used a genetic algorithm to solve it. Based on the above studies, it can be found that genetic algorithms are used more than the other types and can better solve the problem of bin allocation. However, most of the previous studies used traditional genetic algorithms and traditional NSGA-II algorithms, which lack a diversity of solutions. Therefore, this research focuses on the control of the elite range in the algorithm design and proposes an improved NSGA-II algorithm to improve the diversity of solutions and realize the convergence of the search algorithm to the global optimal solution.
In summary, it can be seen that the current research on the allocation of container yard space is mostly directed at ordinary containers, with the core objective of improving operational efficiency and lacking attention to the safety of dangerous goods yards. Taking into account the special characteristics of dangerous goods containers and the efficiency requirements of 253 | P a g e www.ijacsa.thesai.org storage operations, the storage process should be regarded as a multi-objective optimization problem with the double priority of safety and economy.
This research mainly takes dangerous goods containers as the research object and establishes a storage yard optimization model based on safety and economic benefits. At the same time, in order to further improve the diversity of solutions and realize the convergence of the search algorithm to the global optimal solution, it focuses on the control of the elite range and proposes an Improved NSGA-II algorithm. Then entropy weight-TOPSIS sorting method was used to conduct the multiattribute decision-making analysis and the Pareto optimal solution is obtained, to obtain the optimal solution to further reduce the storage risk of dangerous cargo containers and improve the operation efficiency.

A. Problem Description
A dangerous goods storage yard is where Dangerous goods containers are stored. Therefore, once an emergency occurs, the hazard is extremely high. The safety of hazardous chemical container yards is embodied in the following three aspects: classified storage, number of container dumps, and storage height. The required storage height depends on the type of dangerous goods. According to the "Safety Regulations for Port Operation of Hazardous Chemicals Containers" flammable and explosive Dangerous goods containers should only be stacked up to two tiers, and other Dangerous goods containers shall not exceed three tiers. Moreover, effective isolation should be prepared according to the nature of the dangerous goods. Generally, since the storage height is low, the movement of Dangerous goods containers employs manual truck operations, which do not involve the problem of the yard and bridge schedules. Most hazardous chemical container yards in ports have been zoned according to the isolation requirements of hazardous chemicals. Therefore, this study focused only on Dangerous goods containers with fixed zones.
From a safety perspective, reducing unnecessary container handling operations and minimizing the storage height can reduce the crane workload, prevent stacks from being overly high, and dumping over to reduce the safety hazards caused by Dangerous goods containers during operation. From an economic perspective, reducing the operation of unloading can increase the efficiency of yard operation and reduce costs. The exit time is known for containers entering the hazardous chemical container yard. When a container enters the yard, it is necessary to optimize the bin allocation sequence to reduce the unloading operation. The exit time was early on the top floor. Generally, heavy containers are placed on the lower layer to ensure safety when shipping containers, and lighter boxes are placed on the upper layer. Therefore, when allocating bin positions in the yard, it is common to place heavy boxes on the upper layer and lighter boxes on the lower layer.
The problem of optimizing the allocation of Dangerous goods containers can be summarized as minimizing the operation of unloading containers in a range of storage yards when the number of bays, rated height, and initial storage status is known. Moreover, the order of appearance, the weight of the box, and the height of the stack also affect the unloading operation. Therefore, it should be considered when establishing the optimization model.

B. Model Assumption
Based on the nature of the hazardous chemical container and storage yard scenario, the following assumptions were made to achieve the goal of optimizing storage: The loading and unloading equipment are fault-free, and all the operation links are normal.
All the boxes on-site meet the isolation requirements for Dangerous goods containers.
Only for Dangerous goods containers.
The type of dangerous goods and the quality, size, and time of entry and exit of the dangerous chemical container are known.

D. Objective Functions
The number of containers that exited first at the lower level was the smallest.
254 | P a g e www.ijacsa.thesai.org The number of containers with a high weight in the upper level was the smallest.
Minimum stacking height.
Constraints (4) and (5) indicate that is 1 when is placed below and enters the field before , and 0 otherwise; constraints (6) and (7) indicate that the value of the decision variable y is 1 only when containers and are assigned to container spaces ( , , 1 ) and ( , , 2 ) , respectively, and 0 otherwise; constraint (8) indicates that boxes cannot be placed in suspension; constraint (9) indicates that all hazardous materials are stored in the field area where they should be stacked; constraint (10) indicates that a buffer container space should exist within each field area.

A. NSGA-II Algorithm
The multi-objective functions of hazardous chemical container storage optimization are not completely codirectional functions. In most cases, optimizing one function leads to a decrease in the performance of other objective functions. Therefore, it is difficult to simultaneously optimize all objectives. Therefore, when solving the multi-objective optimization problem, the solution set obtained is optimal for one optimization objective, and may not be optimal for other optimization objectives, which causes the multi-objective function to have multiple optimal solutions. This study adopted the NSGA-II algorithm to avoid the lack of diversity of the NSGA algorithm in later stages and improved the crowding distance and crowding degree comparison operators in the algorithm. The main purpose is to maintain the diversity of the population to the best extent possible while avoiding local precocity. Table I Comparison of traditional NSGA algorithm and improved NSGA-II shows that the improved NSGA-Ⅱ has more advantages than traditional genetic algorithms in solving multi-objective optimization problems. The steps to improve the NSGA-II algorithm are as follows.

3) Fitness function:
The non-dominated sorting multiobjective genetic algorithm can directly use in ℎ as fitness functions.

4) Fast non-dominated sorting process:
The solution of a multi-objective genetic algorithm is to obtain a Pareto solution set by the evolutionary approximation of the constructed genetic algorithm class. Once the fitness function is evaluated, the objective functions , in , and ℎ are sorted by fast non-dominated solutions. The specific sorting process is illustrated in Fig. 2. 255 | P a g e www.ijacsa.thesai.org

5) Improve the calculation method for congestion"
The selection of NSGA-Ⅱ will allow excellent individuals to continue to breed in iterations until the maximum population size is reached, which will easily lead to a loss of individual diversity. Ultimately, it will lead to premature convergence of the algorithm. This study has improved the algorithm to avoid obtaining the local optimal solution: first traverse the individual in the non-dominated level, calculate the function value of a certain objective function, arrange it in descending order according to the function value, and set the individual congestion degree on both sides of the sequence to the maximum value that can be guaranteed to be always selected. Before calculating the crowdedness of individual , first, judge whether is the same as the previous individual. If they are the same, the crowning degree of individual is no longer calculated, and the non-dominated level value of individual is directly added to the population size. If it is not, the calculation is performed according to Equation (11). The non-dominated sorting after mixing the parent population with the offspring population produced can effectively avoid redundant individuals.
6) Improved elite retention strategy: The elite retention strategy causes the parent and offspring to merge, and redundant individuals are prone to exist. Based on the NSGA-Ⅱ algorithm, this study made some improvements to its elite retention strategy. The improved strategy is marked to judge redundant individuals and merge them into a temporary level. Finally, when the newly generated population is insufficient, the corresponding redundant individuals are removed and merged into the new population, thereby increasing the diversity of the population, as shown in Fig. 3.

7) Genetic operation:
The selection operation has adopted the roulette selection operator.
The crossover operation adopted a crossover operation to simulate a binary single-point crossover operator. The criteria were as follows: , ， � , ( = 1,2) represent the genes of the father and offspring, respectively; The work done in this study improved the mutation operation to determine whether the mutation is performed according to the size of the random number generated by rand (0, 1). If a mutation is needed, the gene value at one position on the individual chromosome is replaced with the gene value at another position on the chromosome.
The process set of the improved NSGA-II algorithm is shown in Fig. 4. 256 | P a g e www.ijacsa.thesai.org

B. Multiple Scheme Optimization
Entropy weighting is an objective method of assigning weights, which determines the weight of each indicator by the uncertainty of the information provided by the different attribute indicators. The TOPSIS method is a multi-objective decision-making analysis method that is suitable for the comparative study of multiple schemes. As a better way to avoid the subjectivity of the method, the study first used the entropy method of objective weighting to solve the weights before using the TOPSIS method to obtain Pareto optimal solution sorting. The preferred steps of the scheme are as follows: According to the model, it can be seen that the attribute indicators affecting the decision on the stacking scheme in this paper are the order of exit, weight, and height. The entropy weight method is used to calculate the weight coefficients of these three indicators and obtain the weight matrix ω.
Use the vector normalization method to obtain the normalized weighted decision matrix.
Apply the weighted distance to construct the Euclidean distance between the target solution and the ideal solution and the negative ideal solution.
Calculate the comprehensive evaluation index of each plan and rank the superiority and inferiority of the plan according to the value in descending order. Get the optimal stacking solution.
Based on the above analysis, the process settings of the improved NSGA-Ⅱ algorithm are shown in Fig. 5.

A. Known Conditions
Consider a container area of a hazardous chemical container yard in a port as an example. The considered container area has 14 shell positions, each of which has three rows, and the maximum stacking height is three layers. The study randomly selected 50 containers of hazardous chemicals to be processed from 0:00 to 1:00 on June 2, 2020. The types of substances in the containers include category 6.1 (toxic substances), category 8 (corrosive substances), and category 9 (miscellaneous hazards). After the selected containers are classified according to the existing isolation rules of the storage yard, the 43 selected containers are all stacked in the same content area, and stacking is allowed for up to three layers. The initial number of layers of each shell in the container area is shown in Fig. 6. The information of 43 containers to be processed is shown in Table II.

B. Optimization Results and Analysis
1) Improve the calculation method for congestion: The algorithm of the stack optimization model established in Section III is used, and the algorithm settings are as follows: 257 | P a g e www.ijacsa.thesai.org Population size _ = 100 , maximum iteration _ = 500, crossover probability = 0.8; the mutation probability = 0.02.
MATLAB was used to compile the code and run the program, and the iteration was terminated 500 times. The fitness of the iterative process changes, as shown in Fig. 7. Fig. 7. Improved NSGA-II Algorithm Convergence Process.
As the number of iterations increases, the fitness value of the chromosome eventually converges, and a good convergence effect is achieved. After the program runs, 92 sets of Pareto solutions that simultaneously satisfy the requirements were obtained (Table III).
Based on the 92 Pareto solutions obtained, a 92 × 3 decision matrix A was constructed, and the attribute weights of the order of appearance, weight, and height were obtained using the entropy method in the following way: 1 =0.4685, 2 =0.2954, 3 =0.2360. It is evident that the order of appearance has the greatest impact on the container storage plan.
2) Algorithm performance analysis: In this study, we used the same container data and crossover and mutation probabilities to verify the effectiveness of the improved algorithm and solve it with the traditional NSGA algorithm. In total, 153 Pareto solution sets were obtained. (Table IV).
The results show: a) Under identical conditions, for 500 iterations, the comprehensive scores of the traditional NSGA algorithm and the improved NSGA-II algorithm are shown in Fig. 9. It is evident that the highest weighted comprehensive score of the objective function obtained by the traditional NSGA algorithm is lower than that of the improved NSGA-II algorithm, which indicates that the solution obtained by the improved NSGA-Ⅱ algorithm is closer to the optimal solution. b) After 500 iterations, the operational time of the traditional NSGA algorithm was 68.8 s, and the time of the improved NSGA -Ⅱ algorithm was 9.86 s, which is a reduction by 85.7%, indicating that the time consumed by the improved NSGA -Ⅱ algorithm is considerably shorter.

V. CONCLUSION
The improvement of operational efficiency and the optimization of stacking safety have always been critical issues in the management of yards containing dangerous goods containers at ports. Combined with the needs of the application level, a multi-objective optimization model was constructed and the algorithm was optimized. The following conclusions can be drawn: 1) Combined with the operation process of the dangerous goods container yard and the technical requirements of the storage, a multi-objective optimization model is established, which realizes the dual consideration of safety and efficiency, and provides the theoretical basis and technical support for the safe and efficient operation of the dangerous goods container yard.
2) The NSGA-II algorithm was introduced to solve the optimization model and the algorithm was tested and improved. Compared with the traditional NSGA algorithm, the running time of the improved algorithm was shortened by 85.7%, which not only improved the efficiency of the algorithm but also enriched the diversity of understanding. The sorting algorithm improves the pertinence of the solution.
3) The container location allocation in this study focuses on storage optimization within the same container area. The coordinated storage problem of multiple container areas for 260 | P a g e www.ijacsa.thesai.org multi-category containers will be further explored in the future study.