Ship special cargo scheduling optimization method based on GSGA-DIC algorithm
By adopting the GSGA-DIC algorithm in the optimization of special cargo scheduling of ships, combining double-layer integer coding and greedy search heuristic rules, the limitations of genetic algorithms in scheduling optimization are solved, efficient cargo scheduling and resource management are achieved, and ship combat capabilities and operational efficiency are improved.
Patent Information
- Application Number
- CN202510206682.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-13
AI Technical Summary
The existing genetic algorithms have problems such as initial population quality dependence, easy to fall into local optimality and insufficient global search capabilities in the optimization of ship special cargo scheduling, resulting in low computational efficiency and low optimal solution quality.
The ship's special cargo scheduling optimization method based on the GSGA-DIC algorithm is adopted to initialize the population through double-layer integer coding and greedy search heuristic rules, and combine the fusion elite-retained roulette strategy and improved cross-variation methods to enhance the algorithm's global search ability and local search ability.
It effectively improves the efficiency of special cargo dispatch in ships, reduces time waste and idle resources during cargo transfer, improves the efficiency of carrier-based aircraft dispatch and recovery and maritime combat capabilities, reduces operating costs, and enhances the reliability and safety of carrier-based weapon systems.
Smart Images

Figure CN120146466A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ship and ocean engineering, and particularly relates to a ship special cargo scheduling optimization method based on the GSGA-DIC algorithm. Background Technique
[0002] The special cargo transfer capacity of a ship is one of the important factors affecting the launch and recovery capacity of carrier-based aircraft, and the launch and recovery capacity of carrier-based aircraft is an important consideration for its combat ability. Efficient cargo support operations can improve the launch efficiency of carrier-based aircraft and enhance the ship's sea combat ability. Different from other support operations, cargo support operations take a long time, have a complex operation process and high requirements for operation safety. Its operation process includes cargo out of the warehouse, lower lift transfer, cargo assembly, upper lift transfer, deck transfer and cargo hanging, and the operation environment involves most parts of the aircraft carrier. If the personnel and equipment are not reasonably allocated during the operation, it may cause waste of human resources, low transfer efficiency and then affect the subsequent launch of carrier-based aircraft. Therefore, formulating a reasonable and efficient cargo scheduling plan is of great significance for improving the efficiency of carrier-based aircraft support operations and increasing the efficiency of carrier-based aircraft launch and recovery.
[0003] The problem of ship cargo scheduling optimization is essentially a combinatorial optimization problem. At present, there are various solution methods obtained by scholars through research. With the development of intelligent optimization algorithms, the genetic algorithm, as a branch of intelligent optimization algorithms, has good application prospects in solving the problem of ship cargo scheduling optimization due to its simple calculation process and fast solution speed. However, this algorithm has problems such as high dependence on the initial population and being easily trapped in local optima. Therefore, when using the genetic algorithm to optimize the ship special cargo scheduling problem, in order to obtain an efficient cargo transfer plan, it is necessary to improve the algorithm according to the specific constraints in the ship cargo scheduling problem, mainly aiming at the initialization strategy of the algorithm population, the selection operation of the population, and the processes of chromosome crossover and mutation, etc., so as to design an optimization algorithm that conforms to the ship cargo scheduling problem.
[0004] When using the genetic algorithm to optimize the scheduling problem of special ship cargo at present, the following problems exist: First, since the genetic algorithm depends more on the quality of the initial population, that is, the quality of the scheduling schemes obtained by decoding the individuals in the population. For a high-quality initial population, the scheduling schemes represented by the individuals inside it take less time, while for a relatively poor-quality initial population, the scheduling schemes represented by the individuals inside it take longer, and the algorithm needs to perform more iterative optimization times. When the quality of the initial population is poor, it will lead to an increase in the computational time of the algorithm, and thus the computational efficiency of the algorithm is low. The traditional method of randomly generating the initial population produces a population with poor quality. Second, the algorithm is prone to the "premature" phenomenon during the optimization process, that is, the algorithm will converge to a local optimal solution prematurely during the search process, and fail to fully explore the entire solution space, resulting in a low quality of the final solution. Third, the genetic algorithm mainly relies on global search to obtain the optimal solution, and its local search ability is not strong. In complex scheduling problems, simply relying on global search may miss some high-quality solutions. Therefore, when using the genetic algorithm to solve the scheduling problem of special ship cargo, how to obtain the optimal scheduling scheme while minimizing the computational time as much as possible becomes a technical difficulty in algorithm improvement. Summary of the Invention
[0005] To overcome the problems existing in the related technologies, the disclosed embodiments of the present invention provide an optimization method for the scheduling of special ship cargo based on the GSGA-DIC algorithm.
[0006] The technical solution is as follows: An optimization method for the scheduling of special ship cargo based on the GSGA-DIC algorithm includes:
[0007] S1. Obtain the cargo information of the special ship cargo to be transferred. The cargo information includes: cargo type, cargo transfer process, cargo transfer time data set, cargo transfer time, and automatically assigned cargo number;
[0008] S2. Set the chromosome coding rule, and use the obtained cargo information to initialize the population of the genetic algorithm with a rule-based heuristic greedy search based on double-layer integer coding to generate the initial population;
[0009] S3. Decode each chromosome in the population, calculate the fitness value of each individual, and use the roulette wheel strategy integrating elitist retention to select the population according to the fitness value, and screen out excellent individuals to be retained in the next generation;
[0010] S4. Perform crossover and mutation operations on the chromosomes in the selected next-generation population;
[0011] S5. Iterate the population multiple times until the iterative termination strategy of the algorithm is satisfied, output the ship cargo scheduling scheme, and draw a Gantt chart based on the optimal scheduling scheme.
[0012] In step S1, the cargo type TP = {A, B, C... G}, where A, B, C... G all represent types of goods;
[0013] Goods transfer process St i,k , St i,k represents the k-th transfer stage of goods i;
[0014] Goods transfer time data set where i is the goods number, i = 1, 2... n; n is the total number of goods to be transferred, is the operation time of each operation stage of the n-th T P type of goods on different transfer devices;
[0015] Goods transfer time is the operation time of each operation stage of the r-th T P type of goods on different transfer devices, is the transfer time required for goods on different transfer devices in the k-th scheduling stage, k is the current number of transfer stages, p k is the number of transfer devices in the k-th operation stage, s is the total number of transfer stages of the goods transfer operation; t s is the transfer time required for goods on different transfer devices in the s-th scheduling stage.
[0016] In step S2, the chromosome encoding rule adopts double-layer integer encoding DIC, including:
[0017] Equipment selection encoding ES, each gene represents the number of the operation equipment selected by the workpiece in the set of optional equipment; for a goods transfer task with a total of n transferred goods and s operation stages; the 1st to s-th genes represent the operation equipment selected by the 1st goods in the 1st to s-th operation stages, the (s + 1)-th to 2s-th genes of the equipment selection encoding ES represent the operation equipment selected by the 2nd goods in the 1st to s-th operation stages, the ((n - 1)s + 1)-th to ns-th genes of the equipment selection encoding ES represent the operation equipment selected by the n-th goods in the 1st to s-th operation stages, and the total length of the ES segment encoding is ns;
[0018] Operation sequence encoding OS, each gene directly uses the goods number for representation, and the order of the numbers in the encoding represents the order of transfer of each goods during scheduling. For the goods number i that appears for the k-th time in the encoding, use the symbol O ik to represent the k-th operation stage of goods i. Each transferred goods needs to go through s transfer stages, and there are n transferred goods in total. Then the number of genes required to represent the operation sequence of n goods is ns, that is, the length of the OS segment encoding is ns;
[0019] For a certain transfer task, there are a total of n pieces of goods to be transferred. The entire goods transfer operation has s operation stages, and there are p parallel devices to choose from for each process. The representation in the selected device set is as follows:
[0020] SES = {SES 1 :[E 1 …E p …SES k :[E kp+1 …E (k+1)p …SES s :[E sp+1 …E (s+1)p}
[0021] In the formula, SES is the set of devices used in the entire operation process of the goods transfer operation. SES k :[E kp+1 …E (k+1)p represents that the guarantee devices available in the kth transfer operation stage are E kp+1 …E (k+1)p , k is the kth transfer stage of the goods, s is the total number of transfer stages of the goods transfer operation, and p is the number of parallel devices in each operation stage; SES 1 :[E 1 …E p represents that the guarantee devices available in the first transfer operation stage are [E 1 …E p , SES s :[E sp+1 …E ( s +1)p represents that the guarantee devices available in the s-th transfer operation stage are [E sp+1 …E (s+1)p ;
[0022] For the device selection code ES of one piece of goods, E λk is the device number selected from the guarantee devices available in the kth transfer operation stage, k ∈ [1, s], kp + 1 ≤ λk ≤ (k + 1)p, s is the total number of transfer operation stages, and λ is the device number;
[0023] For the process sorting code OS, the gene is randomly sorted by the goods numbers, and each goods number appears s times. For n pieces of goods, the OS segment code consists of a total of n × s genes, n is the number of goods to be transferred, and s is the total number of transfer operation stages; for the goods number i that appears for the kth time in the OS code, O i,k represents the kth transfer stage of goods i.
[0024] In step S2, the population initialization of the rule-based heuristic greedy search genetic algorithm based on double-layer integer coding is adopted to generate the initial population, including:
[0025] (1) Generate the equipment selection code ES in a random manner. The random generation rule is as follows: Traverse each cargo number, traverse each transfer operation stage of the cargo. For each traversed operation stage, access the set of selectable equipment at this stage according to the number of this operation stage, randomly generate an index of an equipment within this set of selectable equipment, and repeat the above operations to obtain the ES code;
[0026] (2) Calculate the completion time of all transfer processes for each piece of cargo according to the generated equipment index, and sort the cargo numbers in descending order according to the completion time, that is, the cargo number with the longest time spent in the entire transfer process is ranked first in the list, and the cargo number with the shortest transfer process time is ranked last in the list;
[0027] (3) According to the principle that the longer the total transfer time, the higher the priority, select two pieces of cargo from the sorted list according to the index, add the cargo numbers to the sequence to be transferred, and remove their numbers in the original list;
[0028] (4) Randomly select one piece of cargo from the list of untransferred cargo numbers, and use the greedy method to insert it into all insertable positions in the sequence to be transferred in turn and calculate the total transfer time after insertion at each position, and select the position with the minimum total transfer time for insertion;
[0029] (5) Each time the insertion position of one piece of cargo is determined, remove the number of this piece of cargo from the sequence to be transferred, and repeat step (4) until all cargo numbers are inserted;
[0030] (6) Repeat the obtained transfer sequence s times, where s is the number of operation stages of the cargo transfer operation, to obtain the complete process sorting code OS, and combine the equipment selection code ES with the obtained process sorting code OS to obtain a feasible scheduling chromosome;
[0031] (7) Repeat the above operations Pop size times to obtain an initial population with the number of individuals being Pop size .
[0032] In step (2), for the completion time calculation: Let the transfer time of each stage k be T ik , where i represents the cargo number and k represents the operation stage. Then the total completion time C i of cargo i is expressed as: The sorting process includes: Suppose there are n pieces of cargo, and the completion time of each piece of cargo is C i , and i is the corresponding cargo number; The sorting goal is to generate a sequence of cargo numbers {i 1 , i 2 …i x …i n}, such that: i x is the x-th sorted cargo number;
[0033] In step (4), randomly select a cargo from the list of untransported cargo numbers, and use a greedy method to insert it into all insertable positions in the sequence to be transported in turn and calculate the total transportation time after insertion at each position. Select the position with the minimum total transportation time for insertion, including:
[0034] Randomly select a cargo from the list of untransported cargo numbers, denoted as A, and record the completion time of the transportation process. In the currently generated sequence to be transported, find all possible insertion positions; assume the current length of the sequence to be transported is m, then insert cargo A into m + 1 positions; for each insertion position in the sequence to be transported, perform the following operations:
[0035] Temporarily insert cargo A into this position to form a new sequence, and calculate the total transportation time of this new sequence; the total transportation time of the new sequence is equal to the sum of the completion times of all cargos in the sequence; among all possible insertion positions, select a position that minimizes the total transportation time, and insert cargo A into this position; after completion of the insertion, remove cargo A from the untransported list and update the sequence to be transported; repeat the above steps until the untransported list is empty;
[0036] The selection of the position with the minimum total transportation time for insertion includes: the current sequence to be transported is S = [B 1 , B 2 … B m , B m is the m-th transported cargo when implementing the transportation plan; the randomly selected cargo number from the untransported list is A, and the transportation time is T A ; the cargo A to be inserted is inserted into any position y of S, and any position y is from y = 0 to y = m. Define the total transportation time after insertion as: where S[:y] is the subsequence of the original sequence S from its start point to position y - 1, and S[y:] is the subsequence after position y; for each y, calculate the new total transportation time Find a position y * such that the total transportation time after insertion is minimized, that is Finally, insert A into position y * to obtain the updated sequence S, and remove it from the untransported list;
[0037] In the initial population with the number of individuals Pop size obtained in step (7), each individual in the population is an iterative operator, and the population size in the search space is set to Pop size, Pop represents a population set with the number of individuals being Pop size where the population set is Pop = {l 1 , l 2 … l x … l popsize}, and l x is the x-th individual in the population, where x = 1, 2, …, Pop size , and each individual l x in the population represents a solution to the problem to be solved.
[0038] In step S3, the fitness value expression for each individual is as follows:
[0039]
[0040] where fitness(Chr) is the fitness value of chromosome Chr, T Chr is the completion time of the scheduling plan represented by chromosome Chr, and Chr is the chromosome carrying the scheduling plan;
[0041] Decode each chromosome in the population and calculate the fitness value of each individual, including:
[0042] (i) Split the equipment selection encoding ES and the operation sequence encoding OS in the chromosome, and use the variable ESnew to receive the first ns genes in the chromosome and the variable OSnew to receive the last n×s genes in the chromosome, where n is the number of goods to be transported and s is the total number of transfer operation stages;
[0043] (ii) Combine the genes in ESnew according to the total number of transfer operation stages s of the goods transfer operation. The genes from 1 to s in the encoding are the first group, the genes from s + 1 to 2s are the second group... The genes from (n - 1)s + 1 to ns are the n-th group, where n is the total number of goods transported in the batch goods support operation;
[0044] (iii) Traverse each goods number, and create a work sequence list and an operation end time list for each good to record the transfer stage and end time of each good;
[0045] (iv) Traverse each transfer equipment, create a list to record the load condition of each equipment, and record the available time of the equipment;
[0046] (v) Calculate the total number of stages \(n\times s\) for all cargo transfer operations, where \(n\) is the total number of cargos to be transferred and \(s\) is the total number of transfer stages for the cargo transfer operation. Generate a list containing numbers from 1 to \(ns\), and select each element in order as an index. Extract the gene in the \(OS_{new}\) list according to the selected position index to obtain the cargo number \(i\) to be transferred, and store it in a new list \(fqc\). Count the number of times the cargo number appears in \(fqc\) to obtain the number of transfer operation stages \(k\) for this cargo, denoted as \(O\). i,k , representing the \(k\)th operation stage of cargo \(i\);
[0047] (vi) Obtain the transfer equipment selected by cargo \(i\) in the \(k\)th transfer stage from the combined \(ES_{new}\) list according to the obtained cargo \(i\) and transfer stage \(k\), and record the available time of the equipment in the equipment load list created in step (iv) according to the input cargo transfer time information. Record the available time of the equipment in the equipment load list created in step (iv). For the \(r\)th P operation time of each operation stage of type \(T\) P cargo on different transfer equipment, where \(T\) is the transfer time required by cargo on different transfer equipment in the \(k\)th scheduling stage, and is the time required by different operation stages of different types of cargo on different parallel equipment;
[0048] (vii) Record the operation stage \(k\) of cargo \(i\), the equipment selected in this stage, the start time and end time of operation stage \(k\) in the created work sequence list and operation end time list;
[0049] (viii) Repeat steps (v) to (vii) \(ns\) times. The maximum value in the list recording the operation end time is the completion time of this cargo scheduling plan. Take the reciprocal of this time to obtain the fitness value of the chromosome carrying this scheduling plan.
[0050] In step S3, use the roulette wheel strategy integrating elite retention to select the population according to the fitness value, including:
[0051] (a) Set the number \(z\) of elite individuals to be retained, and calculate the fitness values of all chromosomes in the population;
[0052] (b) Sort the chromosomes in descending order according to the fitness value, and directly retain the first \(z\) chromosomes into the offspring population;
[0053] (c) Remove the \(z\) chromosomes selected in step (b) from the parent population. Among the remaining \(Pop\) size \(-z\) chromosomes, use the roulette wheel method to draw \(Pop\)size -z chromosomes are retained in the offspring population, and the selection operation is completed; Pop size is the number of chromosomes in the initial parent population; the probability of each chromosome being extracted is calculated as:
[0054]
[0055] In the formula, prob(Chr x ) is the probability of the xth chromosome being selected in the remaining population, fitness(Chr x ) is the fitness value of the xth individual in the remaining population, is the sum of the fitness values of all chromosomes in the remaining population;
[0056] Through the above-mentioned roulette population selection method with elite retention, high-quality individuals in the parent population are directly placed in the child population, and the remaining individuals are randomly selected according to the roulette method.
[0057] In step S4, in the crossover operation, the equipment selection code ES and the process order code OS in the chromosome are cross-processed at the same time. When designing the crossover function, the improved partial matching crossover IPMC is combined with the position-based uniform combination crossover PBUC and the two-point exchange crossover TPC to form a crossover function 1 and a crossover function 2; the crossover function 1 is formed by combining the two-point exchange crossover TPC and the improved partial matching crossover IPMC, and the crossover function 2 is formed by combining the position-based uniform combination crossover PBUC and the improved partial matching crossover IPMC;
[0058] The crossover operation specifically includes: traversing each chromosome in the cyclic population, and randomly generating a random number r between 0 and 1 for each chromosome traversed c , if the generated random number is less than the set crossover probability p c ,0 <p c <1, the algorithm enters the crossover operation and randomly generates a number r between 0 and 1 s , used to select the crossover function, if r s ≤0.5, use crossover function 1 for crossover operation. If r s >0.5, crossover function 2 is used for crossover operation;
[0059] Repeat the above steps Pop size times, complete the crossover operation for all chromosomes in the population, Pop size is the number of chromosomes in the population;
[0060] Mutation operations include:
[0061] (A) Traverse each chromosome in the cyclic population. For each traversed chromosome, randomly generate a random number r between 0 and 1 m , if the generated random number is less than the set mutation probability p m , 0 < p m < 1, then the algorithm enters the mutation operation;
[0062] (B) Perform a splitting operation on the currently traversed chromosome P 1 to obtain the equipment selection code ES and the process sequencing code OS. The length of P 1 is 2ns, and the lengths of the equipment selection code ES and the process sequencing code OS are both ns. Perform a combination operation on the genes within the equipment selection code ES, and group them according to the number of transfer stages of each cargo, that is, the 1st to s genes in the code are the first group, the s + 1st to 2ss genes are the second group... the (n - 1)s + 1st to ns genes are the nth group. After combination, the length of the equipment selection code ES is n, where n is the number of cargos transported in the batch cargo transfer task, and s is the number of operation stages of the cargo transfer task;
[0063] (C) To enhance the local search ability of the algorithm, set the number of loops to X. First, use the two-point exchange mutation method to perform mutation operations on the equipment selection code ES and the process sequencing code OS respectively. Concatenate the mutated equipment selection code ES and the process sequencing code OS to obtain a new chromosome, and calculate the fitness value of the new chromosome. If it is greater than the parent chromosome P 1 , then replace P 1 with the new chromosome. Repeat the above operation X times, and then continue to split the obtained chromosome P 1 according to step (B). Mutate the obtained equipment selection code and process sequencing code in the next way, concatenate the mutated equipment selection code and process sequencing code to obtain a new chromosome, and calculate the fitness value of the new chromosome. If it is greater than the parent chromosome P 1 , then replace P 1 with the new chromosome. Loop X times, and perform the above operations until all four mutation methods have cycled through, and then obtain the chromosome P 1 , and the mutation operation ends;
[0064] The four mutation methods include two-point exchange, conventional insertion, reverse inversion, and greedy search rule insertion.
[0065] In step S5, the iteration termination strategy of the algorithm adopts the iteration termination strategy of the adaptive algorithm, including: setting the iteration increment of the algorithm as S, the basic iteration number as N, N = 2S, and the current iteration number of the algorithm as α. When α÷S = 0, if the optimal solution found in the recent S generations has been improved, the iteration number of the algorithm is increased by S times, that is, N = N + S; if the optimal solution found in the recent S generations of the algorithm has not been improved, that is, the operation time of the optimal scheduling plan optimized in the recent S generations has not been shortened, the algorithm terminates.
[0066] Another object of the present invention is to provide a ship special cargo scheduling optimization system based on the GSGA-DIC algorithm. This system implements the ship special cargo scheduling optimization method based on the GSGA-DIC algorithm, and this system includes:
[0067] A cargo information acquisition module, which is used to acquire the cargo information of the ship's special cargo to be transferred. The cargo information includes cargo type, cargo transfer process, cargo transfer time data set, cargo transfer time, and automatically assigned cargo numbers;
[0068] An initial population module, which is used to set the chromosome encoding rule, and use the acquired cargo information to initialize the population by using a rule heuristic greedy search genetic algorithm based on double-layer integer encoding to generate an initial population;
[0069] A population selection module, which is used to decode each chromosome in the population, calculate the fitness value of each individual, and select the population by adopting a roulette wheel strategy integrating elite retention according to the fitness value, and screen out excellent individuals to be retained in the next generation;
[0070] A crossover and mutation operation module, which is used to perform crossover and mutation operations on the chromosomes in the selected next-generation population;
[0071] A Gantt chart drawing module, which is used to iterate the population multiple times until the iteration termination strategy of the algorithm is satisfied, output the optimal scheduling plan of the ship cargo scheduling plan, and draw a Gantt chart based on the optimal scheduling plan.
[0072] Combining all the above technical solutions, the beneficial effects of the present invention are:
[0073] First, the present invention proposes a method for optimizing the scheduling of special ship cargo based on the GSGA-DIC (Genetic Algorithm with Double-layer Integer Coding and Rule Heuristic Greedy Search) algorithm, which uses an intelligent search method to solve the problem of special ship cargo scheduling. The present invention adopts a double-layer integer coding (DIC) strategy to encode the two sub-problems of operation sequencing and equipment selection in the optimization problem of special ship cargo scheduling respectively. This coding method can effectively expand the solution space and prevent the loss of high-quality solutions. Secondly, a heuristic rule-based population initialization method is designed for the initialization operation of the population. The longest transfer time first method is used to construct the initial population, improving the quality of the initial population. Then, according to the characteristics of double-layer integer coding, crossover and mutation operations are respectively performed on the two parts of equipment selection (ES) and operation sequencing (OS) coding, ensuring that the generated offspring chromosomes can be transformed into feasible scheduling schemes through decoding operations. Considering the particularity of operation sequencing coding, an improved partially matched crossover method is designed, which increases the global search ability of the algorithm while ensuring that the number of operations for each cargo does not change after crossover, that is, no infeasible solutions will be generated. In addition, a greedy search mutation method is designed to enhance the local search ability of the algorithm, avoiding missing high-quality solutions during the iteration process. Through the above improvement operations, the limitations of the genetic algorithm itself can be effectively improved, and a high-quality special ship cargo scheduling scheme can be obtained.
[0074] Second, the present invention improves operation efficiency and combat capabilities: This optimization method can effectively improve the efficiency of special ship cargo scheduling, reduce time waste and resource idleness during the cargo transfer process, thereby improving the combat readiness efficiency of the ship and ensuring a quick response to combat requirements. It reduces operating costs: By optimizing equipment selection and operation sequencing, resource waste and unnecessary operations in the ship cargo scheduling process are reduced, and the resource utilization rate is improved. In the long run, the optimized scheduling method can significantly reduce the operating costs of ship cargo management and improve the accuracy and stability of ship cargo transfer. It enhances the reliability and safety of shipborne weapon systems: Through an accurate scheduling scheme, the present invention makes the distribution of special cargo more reasonable, avoids conflicts and over-reliance on manual scheduling during the cargo distribution process, enhances the safety and reliability of the weapon system, and reduces the risk of human errors.
[0075] Thirdly, the present invention helps to promote the autonomous and intelligent development in the process of ship operation, can provide precise scheduling solutions for shipborne command systems, reduce manual intervention, improve decision-making efficiency, and provide strong support for the future development of ship automation. The present invention directly solves the optimization problems of the multi-stage nature and cargo type complexity in the scheduling of special ship cargoes: Traditional ship cargo scheduling methods mostly rely on manual operations or traditional optimization algorithms and fail to effectively solve the scheduling problems brought about by the multi-stage nature and cargo type complexity. By decomposing the scheduling problem into two sub-problems of equipment selection and process sequencing and adopting double-layer integer coding for optimization, the present invention fills the technical gap in the optimization of complex special ship cargo scheduling problems. The present invention realizes the innovative application of genetic algorithms in ship cargo scheduling: Although genetic algorithms have been widely applied in other fields, their application in the field of special ship cargo scheduling is relatively rare, especially considering multi-stage scheduling and complex cargo types. By combining double-layer integer coding, a brand-new chromosome crossover and mutation method, the present invention enables genetic algorithms to effectively cope with the complexity of ship cargo scheduling and fills the application gap of genetic algorithms in this specific field. The population initialization and selection mechanism combining greedy search heuristic rules with the elite retention strategy: Genetic algorithms usually face problems such as low quality of the initial population and rapid convergence of the solution space. The combination of the greedy search heuristic rules, elite retention, and roulette wheel strategy designed in this patent effectively improves the efficiency of the population initialization and selection mechanism and fills the technical gap in the population generation and selection mechanism in genetic algorithm optimization. The adaptive algorithm iteration termination strategy: Traditional genetic algorithms often face problems such as waste of computing resources and insufficient optimization ability during the iteration process. Through the adaptive algorithm iteration termination strategy, the present invention fills the technical gap in improving computing efficiency and optimization ability in existing scheduling optimization methods and can more efficiently achieve scheduling optimization.
[0076] Fourthly, the present invention solves the complex optimization problem of special ship cargo scheduling. Traditional methods for optimizing special ship cargo scheduling problems often have difficulty taking into account both multi-stage nature and complex cargo types, and there are problems such as low scheduling efficiency and unreasonable resource allocation. Through the improvement of double-layer integer coding and genetic algorithms, the present invention effectively expands the solution space and significantly improves the feasibility and optimization ability of the scheduling scheme. The present invention solves the problem of the limitations of genetic algorithms. Traditional genetic algorithms rely on the quality of the initial population, are prone to falling into local optima, and have weak local search capabilities for complex problems. The present invention innovatively introduces a greedy search initialization strategy and a population selection operation that combines elite retention and roulette wheel strategy, and combines a brand-new chromosome crossover and mutation method to solve this long-standing problem.
[0077] Fifth, the present invention breaks through the application limitations of genetic algorithms in complex scheduling problems. Traditionally, although genetic algorithms are widely used in combinatorial optimization problems, they are often subject to some technical biases in practical applications, such as a strong dependence on the quality of the initial population, being prone to falling into local optimal solutions, and having weak global search capabilities. Many existing studies have failed to effectively solve these problems in complex ship special cargo scheduling problems. The present invention overcomes these limitations and breaks through the technical biases of traditional genetic algorithms in complex scheduling problems by introducing techniques such as double-layer integer coding, greedy search initialization strategy, improved chromosome crossover and mutation methods, etc. The present invention breaks through the local search ability limitation of the algorithm. Traditional genetic algorithms are prone to the "premature" phenomenon in complex problems, that is, the algorithm falls into a local optimal solution very early in the search process and cannot continue with effective global search. For the ship special cargo scheduling problem, the diversity and complexity of the solutions make the emergence of local optimal solutions particularly serious. By introducing an improved greedy search mutation method, elite retention strategy, and adaptive iterative termination strategy, the present invention effectively enhances the local search ability, ensures that the algorithm can fully explore the entire search space, avoids the trouble of local optimal solutions, and overcomes the technical biases of traditional algorithms in this regard. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments in line with the present disclosure, and are used together with the specification to explain the principles of the present disclosure;
[0079] Figure 1 It is a schematic diagram of the ship special cargo scheduling optimization method based on the GSGA-DIC algorithm provided by an embodiment of the present invention;
[0080] Figure 2 It is a schematic diagram of the encoding method of the ES segment in the chromosome provided by an embodiment of the present invention;
[0081] Figure 3 It is a schematic diagram of the ES encoding composition of a piece of cargo provided by an embodiment of the present invention;
[0082] Figure 4 It is a diagram of the encoding method of the OS segment in the chromosome of the present invention;
[0083] Figure 5 It is a schematic diagram of the principle for dividing the entire aircraft carrier special cargo support operation process of the present invention;
[0084] Figure 6 It is a calculation flowchart of the GSGA-DIC algorithm provided by Embodiment 2 of the present invention;
[0085] Figure 7 It is a Gantt chart of the scheduling obtained after optimizing the cargo scheduling plan of the present invention;
[0086] Figure 8 This is the graph of the fitness (minimum scheduling time) change of the present invention;
[0087] Figure 9 This is the graph of the load conditions of the operating equipment in each operation stage of the present invention;
[0088] Figure 10 This is the graph of the change of the optimal scheduling scheme duration of the present invention with the number of algorithm runs;
[0089] Figure 11 This is the comparison graph of the fitness curves before and after the improvement of the algorithm of the present invention;
[0090] Figure 12 This is a schematic diagram of a ship special cargo scheduling optimization system based on the GSGA-DIC algorithm provided by an embodiment of the present invention;
[0091] In the figure: 1. Cargo information acquisition module; 2. Initial population module; 3. Population selection module; 4. Crossover and mutation operation module; 5. Gantt chart drawing module. Specific implementation manner
[0092] To make the above objects, features and advantages of the present invention more obvious and understandable, the specific implementation manner of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific implementations disclosed below.
[0093] The innovation of the present invention lies in: aiming at the multi-stage nature and cargo type complexity of ship special cargo scheduling operations, the present invention proposes an optimization method based on an improved genetic algorithm. Its innovations mainly include: dividing the scheduling optimization problem into two sub-problems of equipment selection and process sequencing, and adopting double-layer integer coding to enhance the solution space and optimization ability of the algorithm; designing a new chromosome crossover and mutation method to ensure the feasibility and search breadth of the scheduling scheme; introducing a greedy search heuristic rule to initialize the population, improving the quality of the initial population, and combining the elite retention and roulette wheel strategies to optimize population selection and retain excellent individuals; finally, adopting an adaptive iterative termination strategy to improve the algorithm efficiency and optimization ability.
[0094] Furthermore, by comparing with the prior art, the advantages of the present invention further include: a flexible job shop scheduling method based on a tabu search genetic algorithm provided by the prior art mainly designs an improved genetic algorithm for the flexible flow shop scheduling problem. The main improvement points are to adopt the tabu search method to optimize the solution and prevent the algorithm from falling into local optimum by setting a tabu list in the local space and searching on the critical path.
[0095] The prior art provides a laser-based CQB damage output simulation training device, mainly proposing a laser-based indoor close-quarter combat damage output simulation training device to solve the problem of lack of realistic shooting feedback in traditional devices during indoor close-quarter combat training;
[0096] The problem faced by the present invention is the optimization of ship cargo scheduling. The problems are different, and the present invention incorporates the greedy search method into the genetic algorithm and designs specific chromosome crossover and mutation methods.
[0097] The prior art provides a method and device for real-time allocation of precision-guided goods during wartime. This patent mainly proposes an allocation method based on multi-objective optimization for the rapid allocation of precision-guided goods on land during wartime. An objective function for minimizing the total transportation cost is constructed according to parameters such as the geographical locations of warehouses and demands, and transportation unit prices, and then the genetic algorithm is used to optimize the scheme. The problem solved by the present invention is the ship cargo transportation problem, and there are significant differences in the improvement of the algorithm compared with the present invention.
[0098] Embodiment 1, the related terms involved in the present invention are as follows:
[0099] Equipment Selection Coding (OS): A coding method used to represent the equipment allocation relationship in each cargo transfer operation stage.
[0100] Operation Sequence Coding (MS): A coding method used to represent the execution sequence of each cargo transfer operation stage of the cargo.
[0101] Population: A set composed of multiple chromosomes, and each chromosome represents a possibility of the solution.
[0102] Chromosome: Represents the scheduling plan of the cargo, composed of a series of genes, and each gene corresponds to a certain part of the scheduling plan.
[0103] Gene: Represents an element in the chromosome, and it corresponds to a specific part of the solution.
[0104] Fitness Function: Used to measure the quality of the chromosome. It maps the chromosome to a fitness value, which indicates the degree to which the chromosome solves the problem.
[0105] Selection Operation: Used to select excellent individuals as the parents of the next generation.
[0106] Roulette: A selection method for the population in the genetic algorithm. Its basic idea is that the probability of each individual in the population being selected is proportional to its fitness value.
[0107] Crossover: It means generating new chromosomes by exchanging parts of genes (i.e., part of the solution) of two chromosomes.
[0108] Mutation: It means introducing random changes into the chromosomes to increase the diversity of the population.
[0109] The ship special cargo scheduling optimization method based on the GSGA-DIC algorithm provided by the embodiment of the present invention, after inputting operation information such as the types and quantities of goods to be transported, initializes the population by using the heuristic rules of greedy search; calculates the fitness of each individual in the population through the decoding operation based on double-layer integer coding, selects excellent individuals by using the roulette wheel method integrating elite retention, performs crossover and mutation operations on the selected individuals to obtain the offspring population, and repeats the above operations until the termination condition of the algorithm is met to obtain the optimal ship cargo scheduling plan and draw the scheduling Gantt chart of the plan.
[0110] Exemplarily, as Figure 1 shown, the ship special cargo scheduling optimization method based on the GSGA-DIC algorithm provided by the embodiment of the present invention includes the following steps:
[0111] S1. Obtain the cargo information of the ship special cargo to be transported, where the cargo information includes: cargo type, cargo transfer process, cargo transfer time data set, cargo transfer time, and automatically assigned cargo number;
[0112] S2. Set the chromosome coding rule, and use the obtained cargo information to initialize the population of the genetic algorithm with heuristic greedy search based on the double-layer integer coding rule to generate the initial population;
[0113] S3. Decode each chromosome in the population, calculate the fitness value of each individual, and select the population according to the fitness value by using the roulette wheel strategy integrating elite retention, and screen out excellent individuals to retain them in the next generation;
[0114] S4. Perform crossover and mutation operations on the chromosomes in the selected next-generation population;
[0115] S5. Iterate the population multiple times until the iteration termination strategy of the algorithm is met, output the ship cargo scheduling plan and draw the Gantt chart based on the optimal scheduling plan.
[0116] Exemplarily, in step S1, there are 5 parameters for the cargo information. Set the cargo information to be transported according to the requirements. The present invention innovatively proposes that they are represented in sequence as:
[0117] Cargo type T P= {A, B, C... G}, where A, B, C... G all represent cargo types;
[0118] Cargo transfer process St i,k , St i,k represents the k-th transfer stage of cargo i;
[0119] Cargo transfer time data set where i is the cargo number, i = 1, 2... n; n is the total number of cargos to be transferred, is the operation time of each operation stage of the n-th T P type of cargo on different transfer equipment;
[0120] Cargo transfer time is the operation time of each operation stage of the r-th T P type of cargo on different transfer equipment, is the transfer time required for the cargo on different transfer equipment in the k-th scheduling stage, k is the current number of transfer stages, p k is the number of transfer equipment in the k-th operation stage, s is the total number of transfer stages of the cargo transfer operation; t s is the transfer time required for the cargo on different transfer equipment in the s-th scheduling stage.
[0121] The cargo number is automatically assigned a serial number in the algorithm and does not need to be input. The cargo type T P and the cargo transfer time are manually input quantities. Among the above parameters, the unit of the cargo transfer time is minutes, and the rest are dimensionless parameters.
[0122] Taking the cargo information as the input parameter, traversing the information list based on the input parameter, and assigning numbers to each cargo respectively to prepare for the subsequent optimization of the scheduling plan.
[0123] In step S2, based on the determined cargo information, the ship special cargo scheduling problem is optimized and solved by using the rule heuristic greedy search genetic algorithm based on double-layer integer coding (hereinafter referred to as the GSGA-DIC algorithm).
[0124] The rule heuristic greedy search genetic algorithm based on double-layer integer coding is a search algorithm that simulates natural selection and genetic mechanisms, including operations such as selection, crossover, and mutation, and gradually evolves high-quality solutions in the search space. Each individual in the population is the iterative operator in the algorithm. The population size in the search space is set as Pop size , Pop represents the population set with the number of individuals being Pop size The present invention innovatively proposes: Pop = {l 1 , l 2…l x …l popsize}, l x represents the x-th individual in the population, where x = 1, 2... Pop size , and each individual l in the population s represents a solution to the problem to be solved.
[0125] Double Integer Coding (DIC) is a coding method for combinatorial optimization problems. Its basic idea is to represent the solution as two-level integer arrays, encoding different levels of information respectively, so as to more easily manage and optimize problems at each level, and can effectively reduce the complexity of the problem.
[0126] To expand the solution space that the algorithm can traverse, the special cargo scheduling problem of ships is divided into two sub-problems: Equipment Selection (ES) and Operation Sequence (OS). Double Integer Coding is used to encode these two sub-problems respectively, and the two parts of the encoding together constitute a feasible scheduling plan.
[0127] For the Equipment Selection encoding ES, each gene represents the number of the job equipment selected for the workpiece in the set of optional equipment. For a cargo transfer task with a total of n transferred goods and s operation stages, n is the total number of goods to be transferred, and s is the total number of transfer stages of the cargo transfer operation. The 1st to s-th genes in the ES encoding represent the job equipment selected for the 1st cargo in the 1st to s-th operation stages. The (s + 1)-th to 2s-th genes of the ES encoding represent the job equipment selected for the 2nd cargo in the 1st to s-th operation stages... The ((n - 1)s + 1)-th to ns-th genes of the ES encoding represent the job equipment selected for the n-th cargo in the 1st to s-th operation stages. That is, the total length of the ES segment encoding is ns.
[0128] For the Operation Sequence encoding OS, each gene is directly represented by the cargo number. The order of the numbers in the encoding represents the order of transfer of each cargo during scheduling. For the cargo number i that appears for the k-th time in the encoding, it is represented by the symbol O ik represents the k-th operation stage of cargo i. Each cargo to be transferred needs to go through s transfer stages, and there are a total of n cargos to be transferred. Then the number of genes required to represent the operation sequence of n cargos is ns. That is, the length of the OS segment encoding is ns. The chromosome encoding is composed of the ES segment encoding and the OS segment encoding together, with a length of 2ns.
[0129] To better describe the encoding method of the double-layer integer encoding, assume that there are n pieces of goods to be transported in a certain transportation task, and there are s operation stages in the entire goods transportation operation. There are p parallel devices available for each process. The present invention innovatively proposes that the representation in the set of selectable devices is:
[0130] SES = {SES 1 :[E 1 …E p …SES k :[E kp+1 …E (k+1)p …SES s :[E sp+1 …E (s+1)p}
[0131] In the formula, SES is the set of devices used in the entire operation process of the goods transportation operation. SES k :[E kp+1 …E (k+1)p represents that the guarantee devices available in the kth transportation operation stage are E kp+1 …E (k+1)p , k is the kth transportation stage of the goods, s is the total number of transportation stages of the goods transportation operation, and p is the number of parallel devices in each operation stage; SES 1 :[E 1 …E p represents that the guarantee devices available in the first transportation operation stage are [E 1 …E p , SES s :[E sp+1 …E (s+1)p represents that the guarantee devices available in the s-th transportation operation stage are [E sp+1 …E (s+1)p ; The encoding method of the ES segment in the chromosome is as Figure 2 shown.
[0132] Taking the ES encoding of one piece of goods as an example, its ES encoding is as Figure 3 shown. Among them, E λk represents the device number selected from the guarantee devices available in the kth transportation operation stage, k ∈ [1, s], kp + 1 ≤ λk ≤ (k + 1)p, s is the total number of transportation operation stages, and λ is the device number; this formula stipulates the value range of the device number for the precise representation of the device.
[0133] For the operation sequence encoding OS, the gene is randomly sorted by the goods numbers, and each goods number appears s times. For n pieces of goods, the OS segment encoding consists of a total of n × s genes. n is the total number of goods to be transported, and s is the total number of transportation stages of the goods transportation operation; for the goods number i that appears for the kth time in the OS encoding, Oi,k Denote the k-th transfer stage of cargo i. The encoding method of the OS segment in the chromosome is as Figure 4 shown.
[0134] After clarifying the encoding method adopted by the present invention, the detailed operation principle of the rule heuristic greedy search genetic algorithm based on double-layer integer encoding, namely the GSGA-DIC algorithm, designed for the optimization problem of special cargo scheduling of ships is as follows.
[0135] Population initialization: The commonly used population initialization method for genetic algorithms is to randomly initialize the population. Using the random initialization method will result in a low-quality population, so more iteration times are required to find a high-quality solution, resulting in a slow convergence speed of the algorithm. Therefore, the present invention proposes a heuristic rule of greedy search to initialize the population. The selection of transfer equipment and the sorting of cargo transfer stages during the transfer process of special ship cargo are encoded respectively in the way of double-layer integer encoding to improve the quality of the initial population. The heuristic population initialization rule of greedy search is as follows:
[0136] (1) Generate the equipment selection encoding ES in a random generation manner. The random generation rule is: traverse each cargo number, and then traverse each transfer operation stage of the cargo. For each traversed operation stage, access the set of selectable equipment at this stage, and randomly generate an index of an equipment within the set of selectable equipment. Repeating the above operations can obtain the ES encoding;
[0137] (2) Calculate the completion time of all transfer processes of each piece of cargo according to the equipment index generated in step (1), and sort the cargo numbers in descending order according to the completion time, that is, the cargo with the longest transfer process time has its number ranked first in the list, and the cargo with the shortest transfer process time has its number ranked last in the list;
[0138] Exemplarily, the completion time calculation: Assume that the transfer time for each stage k is T ik , where. i represents the cargo number, k represents the operation stage, then the total completion time C i of cargo i can be expressed as
[0139] Sorting process: Pair the number of each piece of cargo with its corresponding total completion time to form a list containing all cargo numbers and their total completion times. Each element in the list represents a cargo and its corresponding total completion time. Sort each cargo item in the cargo-completion time list according to the completion time.
[0140] The specific steps are to traverse the elements in the list and use the completion time as the basis for sorting: if the completion time of one piece of goods is longer than that of another, then it is ranked in front of the other. Repeatedly compare and arrange the elements in the list until all the goods are arranged in descending order of completion time. After sorting, extract the goods numbers in the sorted list to form a list of goods numbers arranged in descending order of completion time. In this result list, the goods number with the longest completion time is at the beginning, and the goods number with the shortest completion time is at the end.
[0141] Exemplarily, assume there are n pieces of goods, and the completion time of each piece of goods is C i , where i is the corresponding goods number; the sorting goal is to generate a sequence of goods numbers {i 1 , i 2 … i x … i n}, such that: i x is the x-th goods number after sorting;
[0142] (3) According to the principle that the longer the total transfer time, the higher the priority, select two pieces of goods from the sorted list according to the index, add the goods numbers to the sequence to be transferred, and remove their numbers in the original list;
[0143] (4) Continue to randomly select one piece of goods from the list of untransferred goods numbers, and use the greedy method to insert it into all insertable positions in the sequence to be transferred in turn and calculate the total transfer time after insertion at each position, and select the position with the minimum total transfer time for insertion;
[0144] Exemplarily, using the greedy method to insert it into all insertable positions in the sequence to be transferred in turn and calculate the total transfer time after insertion at each position includes: randomly select one piece of goods from the list of untransferred goods numbers, denoted as A, and record the completion time of its transfer process. In the currently generated sequence to be transferred, find all possible insertion positions. Assume the current length of the sequence to be transferred is m, then the goods A can be inserted into m + 1 positions (i.e., inserted between any two adjacent goods, or at the beginning or end of the sequence); for each insertion position in the sequence to be transferred, perform the following operations:
[0145] Temporarily insert the goods A into this position to form a new sequence, and calculate the total transfer time of this new sequence. The total transfer time of the new sequence is equal to the sum of the completion times of all goods in the sequence. Among all possible insertion positions, select a position that can minimize the total transfer time, and insert the goods A into this position. After completion of the insertion, remove the goods A from the untransferred list and update the sequence to be transferred. Repeat the above steps until the untransferred list is empty.
[0146] Another exemplary approach of selecting the position with the minimum total transfer time for insertion includes: Assume the current sequence to be transferred is S = [B 1 , B 2 … B m , B m is the m-th cargo to be transferred when implementing the transfer plan; The randomly selected cargo number in the untransferred list is A, and its transfer time is T A . The cargo A to be inserted can be inserted at any position y in S (from y = 0 to y = m), indicating that A is inserted before position y. Define the total transfer time after insertion as: where S[:y] is the subsequence of the original sequence S from its start point to position y - 1, and S[y:] is the subsequence after position y; For each y, calculate the new total transfer time Find a position y * such that the total transfer time after insertion is minimized, that is Finally, insert A at position y * to obtain the updated sequence S, and remove it from the untransferred list;
[0147] (5) Each time the insertion position of one cargo is determined, remove the number of that cargo from the sequence to be transferred, and then repeat step (4) until all cargo numbers are inserted;
[0148] (6) Repeat the transfer sequence obtained in step (5) s times, where s is the number of operation stages of the cargo transfer operation, to obtain the complete operation sequence coding OS coding. Combine the equipment selection coding ES with the obtained operation sequence coding OS to obtain a feasible scheduling chromosome;
[0149] (7) Repeat the above operation Pop size times to obtain an initial population with an individual quantity of Pop size .
[0150] Exemplary, in step S3, decoding each chromosome in the population and calculating the fitness value of each individual includes:
[0151] Fitness is the ability of an individual in a population to adapt to the environment during the process of biological evolution. The greater the fitness, the stronger the individual's ability to adapt to the environment, and the easier it is to retain its genes in the next generation; the smaller the fitness, the worse the individual's ability to adapt to the environment, and its genes are more likely to be eliminated. In the special cargo scheduling problem of ships, the scheduling time of the scheduling plan represented by each chromosome is used as the criterion for evaluating the quality of an individual, and its reciprocal is taken as the fitness value of the chromosome, that is, the shorter the scheduling time of the scheduling plan represented by the chromosome, the greater its fitness value, and the better the scheduling plan represented by the chromosome. The expression of the fitness function of the algorithm is:
[0152]
[0153] In the formula, fitness(Chr) is the fitness value of chromosome Chr, and T Chr is the completion time of the scheduling plan represented by chromosome Chr, and Chr is the chromosome carrying the scheduling plan;
[0154] To calculate the fitness values of individuals in the population, it is necessary to first design a decoding function for the double-layer integer coding, convert the chromosome into a feasible scheduling plan, and then solve the scheduling time of the plan. According to the coding method of double-layer integer coding, the decoding operation of the chromosome and the calculation of the fitness value mainly include the following steps:
[0155] (i) Split the equipment selection coding ES and the process sequencing coding OS in the chromosome. Use the variable ESnew to receive the first ns genes in the chromosome and use the variable OSnew to receive the last n×s genes in the chromosome, where n is the total number of goods to be transported and s is the total number of transfer stages of the goods transfer operation;
[0156] (ii) Combine the genes in ESnew according to the total number of transfer stages s of the goods transfer operation. The genes from 1 to s in the coding are the first group, the genes from s + 1 to 2s are the second group... The genes from (n - 1)s + 1 to ns are the nth group, where n is the total number of goods transported in the batch goods guarantee operation;
[0157] (iii) Traverse each cargo number, and create a process list and an operation end time list for each cargo to record the transfer stage and end time of each piece of cargo;
[0158] (iv) Traverse each transfer equipment, create a list to record the load situation of each equipment, and record the available time of the equipment;
[0159] (v) Calculate the total number of stages \(n\times s\) for all cargo transfer operations, where \(n\) is the total number of cargos to be transferred and \(s\) is the total number of transfer stages for the cargo transfer operation. Generate a list containing numbers from 1 to \(ns\), and select each element in order as an index. Extract the gene in the \(OS_{new}\) list according to the selected position index to obtain the cargo number \(i\) to be transferred, and store it in a new list \(fqc\). Count the number of times the cargo number appears in \(fqc\) to obtain the number of transfer operation stages \(k\) for this cargo, denoted as \(O\). i,k , representing the \(k\)th operation stage of cargo \(i\);
[0160] (vi) Obtain the transfer equipment selected by cargo \(i\) at the \(k\)th transfer stage from the combined \(ES_{new}\) list according to the obtained cargo \(i\) and transfer stage \(k\). According to the input cargo transfer time information Record the available time of the equipment in the equipment load list created in step (iv); For the \(r\)th T P The operation time of each operation stage of the type of cargo on different transfer equipment, T P is the cargo type, is the transfer time required by the cargo on different transfer equipment at the \(k\)th scheduling stage. \(s\) is the total number of transfer stages for the cargo transfer operation, is the time required for different operation stages of different types of cargos on different parallel equipment;
[0161] (vii) Record the operation stage \(k\) of cargo \(i\), the equipment selected at this stage, the start time and end time of operation stage \(k\) in the created process list and operation end time list;
[0162] (viii) Repeat steps (v) to (vii) \(ns\) times. The maximum value in the list recording the operation end time is the completion time of the cargo scheduling plan. Take the reciprocal of this time to obtain the fitness value of the chromosome carrying this scheduling plan.
[0163] Exemplarily, in step S3, the selection of the population using the roulette wheel strategy integrating elite retention includes: Select individuals from the parental population according to the fitness value sizes of the individuals in the parental population for generating the offspring population. The population selection method adopted in the present invention is the roulette wheel operation integrating elite retention. This method can ensure that the optimal individuals can directly enter the next generation while maintaining the population diversity, avoiding the loss of high-quality solutions of the previous generation due to the randomness of the selection process. Its specific steps are as follows:
[0164] (a) Set the number \(z\) of elite individuals to be retained, and calculate the fitness values of all chromosomes in the population;
[0165] (b) Sort the chromosomes in descending order according to their fitness values, and directly retain the first z chromosomes in the offspring population;
[0166] (c) Remove the z chromosomes selected in step (b) from the parental population. Among the remaining Pop size -z chromosomes, use the roulette wheel method to draw Pop size -z chromosomes and retain them in the offspring population. The selection operation is completed here; Pop size is the number of chromosomes in the initial parental population; the calculation method for the probability of each chromosome being drawn is:
[0167]
[0168] In the formula, prob(Chr x ) is the probability that the x-th chromosome in the remaining population is selected, and fitness(Chr x ) is the fitness value of the x-th individual in the remaining population. is the sum of the fitness values of all chromosomes in the remaining population; the technical effect of this formula is: divide the fitness value of each individual by the sum of the fitness values of the population to obtain the probability of each individual being selected;
[0169] Through the above population selection method of roulette wheel combined with elitist retention, directly put the high-quality individuals in the parental population into the offspring population, and the remaining individuals are probabilistically drawn according to the roulette wheel method. Through the above population selection method of roulette wheel combined with elitist retention, directly put the high-quality individuals in the parental population into the offspring population, and the remaining individuals are probabilistically drawn according to the roulette wheel method. This selection method can not only retain excellent individuals but also ensure the diversity of the offspring population, avoiding the decline in execution efficiency caused by the randomness of the algorithm.
[0170] Exemplarily, in step S4, the crossover operation includes: The crossover operation simulates the chromosome crossover in sexual reproduction during biological evolution, and exchanges part of the genes through crossover to generate two new individuals. In view of the particularity of the operation sequence OS coding in the double-layer integer coding, the present invention proposes an improved partially matched crossover (Improved Partially Matched Crossover, hereinafter referred to as IPMC) method, which increases the global search ability of the algorithm while ensuring that the number of operations for each piece of goods after crossover will not change, that is, no infeasible solutions will be generated. For the equipment selection ES coding, a position-based uniform combination crossover (Position-Based Uniform Combination Crossover, hereinafter referred to as PBUC) and a two-point exchange combination crossover (Two-Point Combination Crossover, hereinafter referred to as TPC) are designed. Assume that the length of the chromosome coding is ns, n is the number of goods transported in the batch goods transportation task, and s is the number of operation stages of the goods transportation task. Different crossover methods are adopted for different coding segments. Specifically, it includes:
[0171] The first type is the crossover method for the operation sequence coding OS. When performing the crossover operation on the operation sequence coding OS, using the traditional crossover method will cause the number of operations of some goods in the coding to increase or decrease after crossover, resulting in errors in the decoding process of the generated offspring chromosomes. Therefore, when using the partially matched crossover operation, it needs to be improved to ensure that the number of operations of each piece of goods in the offspring is the same as that of the parent. Its principle is mainly as follows: Randomly generate two different position indexes within the range of 0 to ns, initialize two position variables Point1 and Point2, assign the smaller index value to Point1, and assign the larger index value to Point2. Then generate two blank offspring chromosomes O 1 ,O 2 , and write the genes with indexes from 0 to Point1 - 1 and Point2 + 1 to ns in the parent chromosome OS 1 to the same positions in the offspring chromosome O 1 , write the genes with indexes from 0 to Point1 - 1 and Point2 + 1 to ns in the parent chromosome OS 2 to the same positions in the offspring chromosome O 2 , write the genes with indexes from Point1 to Point2 in the parent chromosome OS 1 to the same positions in the offspring chromosome O 2 , write the genes with indexes from Point1 to Point2 in the parent chromosome OS 2 to the same positions in the offspring chromosome O 1At the same position in []. Then traverse each gene in the offspring individuals, and check whether the number of occurrences of the current gene in the offspring individuals exceeds its number of occurrences in the parent individuals. If so, it means that the current gene is repeated in the offspring individuals. At this time, check the missing genes in the offspring, replace the repeated genes with the missing genes, and continue to check the next gene after finding and replacing a missing gene until the chromosome repair work is completed, and finally obtain the offspring chromosome O 1 ,O 2 .
[0172] The second method is the crossover method of equipment selection coding ES. When performing crossover operation on equipment selection coding ES, since the number of available parallel devices in different operation stages is different, if unrestricted crossover is performed during the crossover process, it will cause the equipment index selected in a certain transportation stage to exceed the number of available devices in that stage. Therefore, the genes in the equipment selection coding ES need to be grouped according to the number of transportation stages of each cargo, that is, the genes from 1 to s in the coding are the first group, the genes from s + 1 to 2s are the second group... the genes from (n - 1)s + 1 to ns are the nth group, where n is the total number of goods to be transported. Performing crossover operation on the coding after the above processing can not only enhance the local search ability of the algorithm but also ensure that no infeasible solution will be generated after crossover.
[0173] Since crossover operation needs to be performed on both the equipment selection coding ES and the operation sequence coding OS in the chromosome simultaneously, when designing the crossover function, the improved partially matched crossover (IPMC) is combined with the position-based uniform combination crossover (PBUC) and the two-point exchange crossover (TPC) respectively to form crossover function 1 (formed by combining the two-point exchange crossover (TPC) and the improved partially matched crossover (IPMC)) and crossover function 2 (formed by combining the position-based uniform combination crossover (PBUC) and the improved partially matched crossover (IPMC)). The process of the algorithm performing crossover operation is as follows:
[0174] (I) Traverse each chromosome in the cyclic population, and randomly generate a random number r between 0 and 1 for each traversed chromosome c , if the generated random number is less than the set crossover probability p c , 0 < p c < 1, the algorithm enters the crossover operation, and then randomly generates a number r between 0 and 1 s , which is used to select the crossover function. If r s ≤0.5, crossover operation is performed using crossover function 1. If r s >0.5, then crossover operation is performed using crossover function 2;
[0175] (II) When the randomly generated number r sWhen ≤ 0.5, crossover operation is performed using crossover function 1. At this time, a chromosome P is randomly selected from the population 2 and the currently traversed chromosome P 1 together form the parental chromosomes. The length of chromosome P 1 , P 2 is 2ns, where n is the total number of goods to be transferred for the batch goods scheduling task, and s is the total number of operation stages of the goods scheduling task. Split operation is performed on the parental chromosomes P 1 , P 2 to obtain the equipment selection code ES 1 , ES 2 (ES 1 , ES 2 respectively represent the equipment selection codes in chromosome P 1 , P 2 ) and the operation sequence code OS 1 , OS 2 (OS 1 , OS 2 respectively represent the operation sequence codes in chromosome P 1 , P 2 ). The lengths of ES 1 , ES 2 , OS 1 , OS 2 are all ns. Group the genes within the ES 1 , ES 2 codes according to the number of transfer stages of each good, that is, the first to s genes in the code are the first group, s + 1 to 2s genes are the second group... (n - 1)s + 1 to ns genes are the nth group. Then, the grouped ES 1 , ES 2 are used as parental chromosomes, and two-point exchange crossover (TPC) is used on them. The specific operation is as follows: Randomly generate two unequal integers idx1, idx2 within the range of 1 to ns, where ns is the length of the parental chromosome. Compare the magnitudes of idx1 and idx2. If idx1 > idx2, then exchange the values of idx1 and idx2 to ensure that idx2 is always less than idx2. The two points idx1 and idx2 divide the chromosome into three segments: the front segment, the middle segment, and the back segment. Exchange the gene segments in the middle segment of ES 1 , ES 2 to obtain the offspring chromosomes E 1 , E 2 . Then, OS 1 , OS 2As the parental chromosome, the improved partially matched crossover (IPMC) is used for it; the specific operation is as follows: Randomly generate two different position indexes within the range of 0 to ns, initialize two position variables Point1 and Point2, assign the smaller index value to Point1, assign the larger index value to Point2, and then generate two blank offspring chromosomes O 1 ,O 2 , and write the genes with indexes from 0 to Point1 - 1 and Point2 + 1 - ns in the parental chromosome OS 1 to the same positions in the offspring chromosome O 1 . Write the genes with indexes from 0 to Point1 - 1 and Point2 + 1 - ns in the parental chromosome OS 2 to the same positions in the offspring chromosome O 2 . Write the genes with indexes from 0 to Point1 - 1 and Point2 + 1 - ns in the parental chromosome OS 1 to the same positions in the offspring chromosome O 2 . Write the genes with indexes from Point1 to Point2 in the parental chromosome OS 2 to the same positions in the offspring chromosome O 1 . Then traverse each gene in the offspring individual, check whether the number of times the current gene appears in the offspring individual exceeds the number of times it appears in the parental individual. If so, it means that the current gene is repeated in the offspring individual. At this time, check the genes missing in the offspring, replace the repeated gene with the missing gene, and continue to check the next gene until the chromosome repair work is completed, and finally obtain the offspring chromosome O 1 ,O 2 . Merge E 1 with O 1 to obtain the complete offspring chromosome C 1 . The chromosome C 1 represents a feasible cargo scheduling plan. Similarly, obtain the chromosome C 2 . Calculate the fitness values of the currently traversed chromosome P 1 and the offspring chromosome C 1 , C 2 obtained by crossover respectively, and retain the chromosome with the largest fitness value into the population.
[0176] (III) When the randomly generated number r s > 0.5, perform the crossover operation using the crossover function 2. At this time, randomly select a chromosome P 2 from the population and the currently traversed chromosome P 1 to jointly form the parental chromosome, chromosome P 1 ,P 2The length is 2ns, where n is the total number of goods to be transferred in the batch goods scheduling task, and s is the total number of operation stages of the goods scheduling task. For the parental chromosome P 1 ,P 2 perform a splitting operation to obtain the equipment selection code ES 1 ,ES 2 (ES 1 ,ES 2 respectively represent the equipment selection code in the chromosome P 1 ,P 2 ) and the operation sequence code OS 1 ,OS 2 (OS 1 ,OS 2 respectively represent the operation sequence code in the chromosome P 1 ,P 2 ) ES 1 ,ES 2 ,OS 1 ,OS 2 The lengths of all are ns. For ES 1 ,ES 2 group the genes in the code according to the number of transfer stages of each good, that is, the 1st to s genes in the code are the first group, the s + 1st to 2s genes are the second group... the (n + 1)s + 1st to ns genes are the nth group. After that, use the grouped ES 1 ,ES 2 as the parental chromosome and use position-based uniform combination crossover (PBUC) on it. The specific operation is as follows: First, set the gene crossover probability prob gene , 0 < prob gene < 1. Then generate two blank offspring chromosomes E 1 ,E 2 . Loop through each gene in the parental chromosome. For each gene traversed, randomly generate a random number between 0 and 1. If the random number is less than the given gene crossover probability prob gene , then add the gene of the parental ES 2 to the same position in the offspring E 1 , and add the gene of the parental ES 1 to the same position in the offspring E 2 . If the random number is greater than the given gene crossover probability prob gene , then add the gene of the parental ES 1 to the same position in the offspring E 1 , and add the gene of the parental ES 2 to the same position in the offspring E 2 . After the traversal, obtain the offspring chromosomes E 1 ,E 2, and then use OS 1 , OS 2 as the parental chromosome and apply the improved partially matched crossover (IPMC) to it. The specific operation is as follows: randomly generate two unequal integers idx1 and idx2 within the range of 1 to ns, where ns is the length of the parental chromosome. Compare the magnitudes of idx1 and idx2. If idx1 > idx2, then swap the values of idx1 and idx2 to ensure that idx1 is always less than idx2. The two points idx1 and idx2 divide the chromosome into three segments: the front segment, the middle segment, and the rear segment. Swap the gene segments of ES 1 , ES 2 in the middle segment to obtain the offspring chromosome E 1 , E 2 , and then use OS 1 , OS 2 as the parental chromosome and apply the improved partially matched crossover (IPMC) to it. The specific operation is as follows: randomly generate two different position indices within the range of 0 to ns, initialize two position variables Point1 and Point2, assign the smaller index value to Point1, and assign the larger index value to Point2. Then generate two blank offspring chromosomes O 1 , O 2 . Write the genes with indices from 0 to Point1 - 1 and Point2 + 1 to ns in the parental chromosome OS 1 to the same positions in the offspring chromosome O 1 O 2 . Write the genes with indices from 0 to Point1 - 1 and Point2 + 1 to ns in the parental chromosome OS 2 to the same positions in the offspring chromosome O 2 . Write the genes with indices from Point1 to Point2 in the parental chromosome OS 1 to the same positions in the offspring chromosome O 2 . Write the genes with indices from Point1 to Point2 in the parental chromosome OS 2 to the same positions in the offspring chromosome O 1 . Then traverse each gene in the offspring individual and check whether the number of times the current gene appears in the offspring individual exceeds the number of times it appears in the parental individual. If so, it means that the current gene is repeated in the offspring individual. At this time, check for the missing genes in the offspring and replace the repeated gene with a missing gene. After finding a missing gene and performing the replacement, continue to check the next gene until the chromosome repair work is completed, and finally obtain the offspring chromosome O 1 O 2 . Merge E 1 with O 1 to obtain the complete offspring chromosome C1 , chromosome C 1 represents a feasible cargo scheduling plan. Similarly, chromosome C is obtained 2 . Calculate the fitness values of the currently traversed chromosome P 1 and the offspring chromosome C obtained by crossover 1 , C 2 respectively. Retain the chromosome with the maximum fitness value into the population.
[0177] (IV) Repeat the above steps Pop size times to complete the crossover operation for all chromosomes in the population. Pop size is the number of chromosomes in the population.
[0178] Another example is that in step S4, the mutation operation includes:
[0179] In the individuals of the offspring population, the mutation operation refers to the genes on the chromosome mutating with a certain probability to generate new individuals. The introduction of the mutation operation can effectively prevent the population from falling into a local optimum. The conventional chromosome mutation method is two-point exchange. This mutation method is simple and easy to implement, but its disadvantage is that the ability to expand the solution space is limited. Therefore, the algorithm designed in the present invention adds three new mutation methods while adopting two-point exchange, namely conventional insertion, reverse inversion, and rule insertion of greedy search. The following is an introduction to the principles of the four mutation methods:
[0180] First, two-point exchange: Randomly generate two position indexes in the chromosome, and exchange the genes at these two position indexes to obtain a new chromosome.
[0181] Second, conventional insertion: Randomly generate two position indexes in the chromosome, insert the gene at the previous position index behind the gene at the latter position, and shift the genes before the latter position index forward by one position in turn to obtain a new individual.
[0182] Third, reverse inversion: Randomly generate two position indexes in the chromosome, and write the genes between these two position indexes in reverse order to obtain a new individual.
[0183] Fourth, rule insertion of greedy search: Randomly generate a position index in the chromosome, extract the gene at this position, traverse each insertable position in the chromosome, insert the extracted gene into these positions in turn, calculate the fitness value of the chromosome obtained by each insertion method until all insertable positions are traversed, and then compare the fitness values of the chromosomes at each insertion position, and select the position with the maximum fitness value for retention.
[0184] Since the encoding method adopted by the algorithm is double-layer integer encoding, mutation operations need to be performed on the equipment selection encoding and the process sequencing encoding respectively to ensure that the scheduling scheme carried by the chromosome obtained after mutation is feasible. Considering the particularity of the equipment selection encoding, if this part of the encoding is not processed and directly mutated, since the number of parallel equipment available in each cargo transfer operation stage is different, it will cause the equipment number selected for a certain operation stage of a certain cargo after mutation to exceed the number of operation equipment in that operation stage, resulting in an infeasible solution. Therefore, before performing the mutation operation on the equipment selection encoding, this part of the encoding needs to be combined so that the equipment selection schemes generated after mutation are all feasible. The steps of the algorithm during the mutation operation are as follows:
[0185] (A) Traverse each chromosome in the cyclic population. For each traversed chromosome, randomly generate a random number r between 0 and 1 m , if the generated random number is less than the set mutation probability p m , 0 < p m < 1, then the algorithm enters the mutation operation;
[0186] (B) Perform a splitting operation on the currently traversed chromosome P 1 to obtain the equipment selection encoding ES and the process sequencing encoding OS. The length of P 1 is 2ns, and the lengths of the equipment selection encoding ES and the process sequencing encoding OS are both ns. Perform a combination operation on the genes within the equipment selection encoding ES, and group them according to the number of transfer stages of each cargo, that is, the first s genes in the encoding are the first group, the s + 1 to 2s genes are the second group... the (n - 1)s + 1 to ns genes are the nth group, where n is the total number of goods to be transferred and s is the total number of transfer stages of the cargo transfer operation;
[0187] (C) To enhance the local search ability of the algorithm, set the number of loops to X. First, use the two-point exchange mutation method to perform mutation operations on the equipment selection encoding ES and the process sequencing encoding OS respectively. Concatenate the mutated equipment selection encoding ES and the process sequencing encoding OS to obtain a new chromosome, and calculate the fitness value of the new chromosome. If it is greater than the parent chromosome P 1 , then replace P 1 with the new chromosome. After repeating the above operation X times, continue to split the obtained chromosome P 1 according to step (B), and perform mutation on the equipment selection encoding and the process sequencing encoding obtained after splitting using the next method. Concatenate the mutated equipment selection encoding and the process sequencing encoding to obtain a new chromosome, and calculate the fitness value of the new chromosome. If it is greater than the parent chromosome P 1 , then replace P 1Replace it with a new chromosome and loop X times. Perform the above operations until all four mutation methods have been looped through, and chromosome P is obtained. 1 , and the mutation operation ends;
[0188] The four mutation methods include two-point exchange, conventional insertion, reverse inversion, and rule-based insertion with greedy search.
[0189] Exemplarily, in step S5, the population is iterated multiple times until the iteration termination strategy of the algorithm is satisfied. The iteration termination strategy of the algorithm includes:
[0190] The design of the termination condition of the algorithm will affect the accuracy of problem-solving and the computational time consumption of the algorithm. If the total number of iterations is set too small, it may cause the algorithm to fail to converge to the optimal solution. If the total number of iterations is set too large, it will cause the algorithm to continue computing for too long even after it has converged to the optimal solution, reducing the computational efficiency of the algorithm. Therefore, design an adaptive iteration termination strategy for the algorithm: set the iteration increment of the algorithm to S, the basic number of iterations to N, N = 2S, and the current number of iterations of the algorithm to α. When α÷S = 0, if the optimal solution found in the most recent S generations has improved, the number of iterations of the algorithm is increased by S times, i.e., N = N + S; if the optimal solution found in the most recent S generations of the algorithm has not improved, that is, the operation time of the optimal scheduling plan optimized in the most recent S generations has not been shortened, the algorithm terminates.
[0191] The number of iterations designed through the above strategy has a certain degree of self-adaptability, and can automatically adjust the number of iterations according to the quality of the initial population and the actual solution situation, taking into account both computational efficiency and computational accuracy.
[0192] As can be seen from the above embodiments, the present invention uses an improved genetic algorithm to optimize the special cargo scheduling problem of ships. It improves and optimizes the problem of weak search depth and poor local search ability when using the genetic algorithm to solve the scheduling optimization problem. It uses double-layer integer coding to encode the two sub-problems of equipment selection and process sequencing in the special cargo scheduling problem of ships respectively, effectively expanding the search space of the algorithm and increasing the optimization ability of the algorithm. In view of the particularity of the coding rules for equipment selection and process sequencing, an improved partially matched crossover method (IPMC), an improved position-based uniform combination crossover (PBUC), and an improved two-point crossover are designed in the step of chromosome crossover, effectively enhancing the global search ability of the algorithm. In the chromosome mutation part, a mutation method that conforms to the constraints of the actual problem is designed for the special cargo transfer problem of ships, greatly enhancing the local search ability of the algorithm while ensuring that the scheduling plan obtained by mutation is still feasible, and ensuring that the algorithm will not miss high-quality solutions. Using this method, an excellent special cargo scheduling plan for ships can be obtained in a short time, providing more accurate reference for scheduling decision-makers, improving the efficiency of cargo support operations, and enhancing the combat capabilities of aircraft carriers.
[0193] The key point of the present invention is to design an optimized method for the transfer of special ship cargo based on an improved genetic algorithm in view of the multi-stage nature of special ship cargo scheduling operations and the complexity of cargo types. The genetic algorithm is applied to the optimization problem of ship cargo scheduling, and the defects of the genetic algorithm are improved to obtain a cargo scheduling plan. The main innovation points include:
[0194] The present invention divides the optimization problem of special ship cargo scheduling into two sub-problems: equipment selection and process sequencing. Double-layer integer coding is used to encode equipment selection and process sequencing respectively, effectively expanding the solution space of the algorithm, enhancing the optimization ability of the algorithm. At the same time, a new chromosome crossover and mutation method is designed according to the rules of double-layer integer coding, ensuring the feasibility of the generated scheduling plan while guaranteeing the search breadth of the algorithm, and effectively improving the quality of the scheduling plan obtained by the algorithm.
[0195] The present invention designs a heuristic rule of greedy search to initialize the population, improve the quality of the initial population, which has a good guiding effect on the subsequent operations of the algorithm, and adopts a population selection operation that combines the elite retention and roulette wheel strategies, effectively retaining the excellent individuals and genes in the population, avoiding the loss of excellent solutions during the iteration process. Finally, an adaptive algorithm iteration termination strategy is designed to improve the computational efficiency and optimization ability of the algorithm.
[0196] Example 2, referring to the special cargo support operation data of a certain country's "XX" class aircraft carrier, the aircraft carrier cargo support operation is divided into five operation stages, and the entire special cargo support operation process of the aircraft carrier is divided as Figure 5 shown;
[0197] Among them, the cargo number is automatically assigned in the algorithm and does not need to be manually input. In this example, referring to the special cargo support operation data of a certain country's "XX" class aircraft carrier, a job time data table for each transfer stage of various types of cargo is constructed as shown in Table 1.
[0198] Table 1 Job time for various types of cargo support
[0199]
[0200] Suppose the number of goods to be supported and transferred in a batch is 50 pieces, including 12 pieces of type A goods, 12 pieces of type B goods, 8 pieces of type C goods, 8 pieces of type D goods, 8 pieces of type E goods, and 2 pieces of type F goods. The specific cargo types and quantities are shown in Table 2.
[0201] Table 2 Cargo types and quantities
[0202] Goods type Quantity Type A 12 Type B 12 Type C 8 Type D 8 Type E 8 Type F 2
[0203] In this example, there are six types of goods to be transported, namely T P ={A, B, C, D, E, F}, the number of goods to be transported n = 50, the total number of transfer operation stages s = 5, and the total number of transfer equipment E for the entire goods transfer q = 12. The number of transfer equipment in each operation stage is {E q1 = 3, E q2 = 2, E q3 = 3, E q4 = 1, E q5 = 2}, and E qk is the number of available equipment in the k-th operation stage. Taking the above information as input parameters, traverse the information list based on the input parameters, assign numbers to each good respectively, and prepare for the subsequent optimization of the scheduling plan.
[0204] Step 2: On the basis of determining the goods information, use the rule-based heuristic greedy search genetic algorithm based on double-layer integer coding (hereinafter referred to as the GSGA-DIC algorithm) to optimize and solve the special goods scheduling problem of ships. The calculation process of the GSGA-DIC algorithm is as Figure 6 shown.
[0205] Using the GSGA-DIC algorithm to solve the goods scheduling plan includes the following steps:
[0206] (1) Set the genetic algorithm parameters: population size Pop size = 50, the basic iteration times S of the algorithm = 40, the maximum iteration times N of the algorithm = 80, the number of elite individuals reserved z = 5, the chromosome crossover probability p c = 0.85, the gene crossover probability prob gene = 0.5, the mutation probability p m = 0.15, the mutation cycle times X = 10;
[0207] (2) Population initialization: Initialize the population according to the heuristic rules of greedy search designed in the present invention. The steps are as follows:
[0208] (2.1) Generate the equipment selection code ES by random generation. The random generation rule is: traverse each good number, and then traverse each transfer operation stage of the good. According to the number of operation stages, access the selectable equipment set of this stage, and randomly generate an index of an equipment in this equipment set. Repeat the above operations to obtain the ES segment code;
[0209] (2.2) Calculate the completion time of the transfer process for each piece of cargo based on the equipment selection code generated in step (2.1), and sort the cargo numbers in descending order according to the completion time, that is, the cargo with the longest transfer process time is ranked first in the list, and the cargo with the shortest transfer process time is ranked last in the list;
[0210] (2.3) According to the principle that the longer the total transfer time, the higher the priority, select two pieces of cargo from the sorted list according to the index, add the cargo numbers to the sequence to be transferred, and remove their numbers in the original list;
[0211] (2.4) Continue to randomly select one piece of cargo from the list of untransferred cargo numbers, and use the greedy method to insert it into all insertable positions in the sequence to be transferred in turn and calculate the total transfer time after each insertion. Select the position with the minimum total transfer time for insertion;
[0212] (2.5) For each determined insertion position of a piece of cargo, remove the number of that piece of cargo from the sequence to be transferred, and then repeat step (2.4) until all cargo numbers are inserted;
[0213] (2.6) Repeat the transfer sequence obtained in step (2.5) s times, where s is the total number of transfer stages of the cargo transfer operation, to obtain the completed process sorting code OS. Combine the equipment selection code ES with the obtained process sorting code OS to obtain a feasible scheduling chromosome;
[0214] (2.7) Repeat the above operation Pop size times to obtain an initial population with an individual number of Pop size .
[0215] After the population initialization operation is completed, the number of chromosomes in the obtained population is 50, the length of each chromosome is 500, and the lengths of the equipment selection and process sorting codes are both 250.
[0216] (3) Calculate the fitness: Before calculating the fitness, it is necessary to decode the chromosome, convert the genes in the chromosome into a feasible scheduling plan, and then calculate the time required for this operation plan. Calculate the fitness value according to the operation time of the scheduling plan. The fitness calculation formula is as follows:
[0217]
[0218] The steps to calculate the fitness are as follows:
[0219] (3.1) Separate the equipment selection code ES and the process sorting code OS in the chromosome, and use new variables ESnew and OSnew to receive the separated equipment selection code ES and process sorting code OS respectively;
[0220] (3.2) Combine the genes in ESnew according to the total number of operation stages of the cargo transfer operation. In this example, the number of operation stages is 5, and the number of goods to be transferred is 50, that is, genes 1 to 5 in the encoding are the first group, genes 6 to 10 are the second group... genes 246 to 250 are the 50th group;
[0221] (3.3) Traverse each cargo number, create a work sequence list and an operation end time list for each cargo to record the transfer stage and end time of each piece of cargo;
[0222] (3.4) Traverse each transfer device, create a list to record the load condition of each device, and record the available time of the device;
[0223] (3.5) Calculate that the total number of stages of the cargo transfer operation is n×s = 250, where n is the total number of goods transported in the batch cargo guarantee operation, which is 50, and s is 5. Create a list with internal elements from 1 to 250 and sort its internal elements from small to large. Each time, select an element in the list as an index, extract the gene in the OSnew list according to the index to obtain the cargo number i to be transferred, and store it in a new list fqc. Count the number of times the cargo number appears in fqc to obtain the transfer operation stage number k of this piece of cargo.
[0224] (3.6) Obtain the transfer device selected by cargo i in the kth transfer stage from the combined ESnew list according to the cargo number i and transfer stage k obtained in the previous step. According to the input cargo transfer time information T Tpi , record the available time of the device in the device load list created in step (3.4). Represents the operation time of each operation stage of the i-th piece of T p type of cargo on different transfer devices;
[0225] (3.7) Record the operation stage k of cargo i, the device selected in this stage, as well as the start time (Starttime) and end time (Endtime) of operation stage k in the work sequence list and operation end time list created in step (3.3);
[0226] (3.8) Repeat steps (3.5) to (3.7) 250 times. The maximum value in the operation end time list is the completion time of this cargo scheduling plan. Take the reciprocal of this time to obtain the fitness value of the chromosome carrying this scheduling plan.
[0227] (4) Selection operation. The population selection method used in this method is the roulette operation of fusion elite retention, which maintains population diversity while ensuring that the best individuals can directly enter the next generation, avoiding the loss of high-quality solutions of the previous generation due to the randomness of the selection process. The specific steps are as follows:
[0228] (4.1) Set the number of elite individuals to be retained z. In this example, the number of elite individuals retained is set to 5. Calculate the fitness values of all chromosomes in the population;
[0229] (4.2) Sort the chromosomes in descending order according to the fitness value, and take the first z chromosomes and keep them directly in the offspring population;
[0230] (4.3) Remove the z chromosomes selected in step (4.2) from the parent population, and size -z chromosomes, use the roulette wheel method to extract Pop size -z chromosomes are retained in the offspring population, and the selection operation is completed. size is the number of chromosomes in the initial parent population. The probability of each chromosome being extracted is calculated as:
[0231]
[0232] (5) Crossover operation. The crossover operation simulates the crossing of chromosomes in sexual reproduction during biological evolution, exchanging some genes through crossing to generate two new individuals. Since the equipment selection (ES) code and the process order (OS) code in the chromosome need to be cross-processed simultaneously during the crossover operation, the improved partial matching crossover (IPMC) is combined with the position-based uniform combination crossover (PBUC) and the two-point exchange crossover (TPC) when designing the crossover function, forming crossover function 1 (combined with the two-point exchange crossover (TPC) and the improved partial matching crossover (IPMC)) and crossover function 2 (combined with the position-based uniform combination crossover (PBUC) and the improved partial matching crossover (IPMC)). The algorithm performs the crossover operation as follows:
[0233] (5.1) Traverse each chromosome in the cyclic population, and randomly generate a random number r between 0 and 1 for each chromosome traversed c , if the generated random number is less than the set crossover probability p c ,0 <p c <1, the algorithm enters the crossover operation and randomly generates a number r between 0 and 1 s , used to select the crossover function, if r s ≤0.5, then use crossover function 1 for crossover operation. sIf it is > 0.5, crossover operation is performed using crossover function 2.
[0234] (5.2) When the randomly generated number r s ≤ 0.5, crossover operation is performed using crossover function 1;
[0235] (5.3) When the randomly generated number r s > 0.5, crossover operation is performed using crossover function 2;
[0236] (5.4) Repeat the above steps Pop size times to complete the crossover operation for all chromosomes in the population. Pop size is the number of chromosomes in the population.
[0237] (6) Mutation operation.
[0238] In the individuals of the offspring population, the mutation operation refers to the genes on the chromosome mutating with a certain probability to generate new individuals. The introduction of the mutation operation can effectively prevent the population from falling into local optimum.
[0239] Step 3: After optimizing by the GSGA-DIC algorithm for M rounds (M is the maximum number of iterations), screen the individuals in the population to obtain the scheduling scheme with the maximum fitness;
[0240] Exemplarily, the scheduling Gantt chart obtained after optimizing the cargo scheduling scheme is as Figure 7 , the change curve of the fitness (minimum scheduling time) is as Figure 8 and the load conditions of the operating equipment in each operation stage are as Figure 9 . It can be seen from the occupancy of the operating equipment in each operation stage that the loads of the parallel equipment in each operation stage are roughly the same, indicating that the allocation scheme is relatively reasonable. As Figure 10 shown by the variation of the optimal scheduling scheme duration with the number of algorithm runs, the algorithm converges when running to about 260 generations, with a relatively fast running speed. And after multiple calculations, the floating range of its optimal scheduling time is within 1 minute, indicating that the algorithm has good stability.
[0241] From Figure 11It can be seen from the comparison of the fitness curves before and after the algorithm improvement that in the early stage of the GSGA-DIC algorithm iteration, due to the design of the heuristic population initialization rule of greedy search, the quality of the initial solution of the algorithm of the present invention is significantly better than that of the comparative algorithm, providing a good foundation and optimization guidance for subsequent operations such as crossover and mutation. In the later stage of the algorithm iteration, both the GSGA-DIC algorithm and the comparative algorithm gradually converge, but the optimization effect of the algorithm of the present invention is significantly better than that of the comparative algorithm. Thus, it can be seen that the GSGA-DIC algorithm has strong global search ability and fast convergence speed, which is consistent with the theoretical analysis. In the trend of the completion time change in 500 iterations, the algorithm designed by the present invention has better convergence compared with the comparative algorithm. This is because when the GSGA-DIC algorithm initializes the population of the algorithm, aiming at the constraint conditions existing in the ship cargo transfer operation, the initialization strategy is improved, so that when the population is initialized, the balance of equipment load and the goal of minimizing the total scheduling duration are taken into account at the same time. The obtained initial population has high quality, providing a good foundation for the crossover and mutation of the subsequent population; and the designed position-based uniform combination crossover operation, mutation operation based on the greedy search method, and roulette operation integrating elite retention can keep good offspring into the next generation population, guiding the crossover and mutation operations to proceed in the direction conducive to the convergence of the algorithm.
[0242] Example 3, as Figure 12 shown, the ship special cargo scheduling optimization system based on the GSGA-DIC algorithm provided by the embodiment of the present invention includes:
[0243] The cargo information acquisition module 1 is used to acquire the cargo information of the ship special cargo to be transferred. The cargo information includes cargo type, cargo transfer process, cargo transfer time data set, cargo transfer time, and automatically assigned cargo number;
[0244] The initial population module 2 is used to set the chromosome encoding rule, and use the cargo information obtained in step S1 to initialize the population of the rule heuristic greedy search genetic algorithm based on double-layer integer encoding to generate the initial population;
[0245] The population selection module 3 is used to decode each chromosome in the population, calculate the fitness value of each individual, and perform population selection according to the fitness value using the roulette strategy integrating elite retention, and screen out excellent individuals to be retained in the next generation;
[0246] The crossover and mutation operation module 4 is used to perform crossover and mutation operations on the chromosomes in the selected next-generation population;
[0247] The Gantt chart drawing module 5 is used to perform multiple iterations on the population until the iteration termination strategy of the algorithm is satisfied, output the optimal scheduling plan of the ship cargo scheduling plan and draw a Gantt chart based on the optimal scheduling plan.
[0248] As described above, it is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be covered within the protection scope of the present invention.
Claims
1. A method for optimizing the scheduling of special cargoes for ships based on the GSGA-DIC algorithm, characterized in that: The method comprises the steps of: S1, obtaining cargo information of special cargo to be transshipped on a ship, wherein the cargo information includes: cargo type, cargo transshipment process, cargo transshipment time data set, cargo transshipment time, and automatically assigned cargo number; S2, setting chromosome encoding rules, using the obtained cargo information, and using the rule-heuristic greedy search genetic algorithm based on double-layer integer encoding to initialize the population and generate the initial population; S3, decode each chromosome in the population, calculate the fitness value of each individual, and select the population based on the fitness value using the roulette wheel strategy of fusion elite retention to select excellent individuals and retain them for the next generation; S4, performing crossover and mutation operations on the chromosomes in the selected next generation population; S5, iterate the population multiple times until the algorithm's iteration termination strategy is met, output the ship cargo scheduling plan, and draw a Gantt chart based on the optimal scheduling plan.
2. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 1 is characterized in that: In step S1, the cargo type T P ={A,B,C…G}, where A,B,C…G represent the types of goods; Cargo transfer process St i,k , St i,k represents the kth transit stage of cargo i; Freight transit time data collection Where i is the cargo number, i=1,2…n; n is the total number of cargo to be transferred, For the nth T P The operation time of each operation stage of the same type of cargo on different transshipment equipment; Cargo transit time The rth T P The operation time of each operation stage of different types of goods on different transshipment equipment, is the transit time required for the goods on different transshipment equipment in the kth scheduling stage, k is the current number of transshipment stages, and p k is the number of transshipment equipment in the kth operation stage, s is the total number of transshipment stages of the cargo transshipment operation; t s It is the operation time required for the goods on different transfer equipment in the sth scheduling stage.
3. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 2 is characterized in that: In step S2, the chromosome encoding rule adopts double-layer integer encoding DIC, which specifically includes: Equipment selection code ES, each gene represents the number of the operating equipment selected by the workpiece in the optional equipment set; for a cargo transfer task with a total of n cargoes to be transferred and s operating stages; the 1st to sth genes represent the operating equipment selected by cargo No. 1 in the 1st to s operating stages, the s+1th to 2sth genes of the equipment selection code ES represent the operating equipment selected by cargo No. 2 in the 1st to s operating stages, the (n-1)s+1th to nsth genes of the equipment selection code ES represent the operating equipment selected by cargo No. n in the 1st to s operating stages, and the total length of the ES segment code is ns; The process sequence code OS, each gene is directly represented by the cargo number, the order of the number in the code represents the order of each cargo transfer during scheduling, for the cargo number i that appears for the kth time in the code, the symbol O is used. ik Indicates the kth operation stage of cargo i. The number of transfer stages that each cargo to be transferred needs to go through is s. There are n cargoes to be transferred. Then the number of genes required to sort the process of n cargoes is ns, that is, the length of the OS segment code is ns. There are n pieces of cargo to be transferred in a certain transfer task. The entire cargo transfer operation has s operation stages. Each process has p parallel equipment to choose from. The representation in the selected equipment set is: SES={SES1:[E1…E p ]…SES k :[AND kp+1 …AND (k+1)p ]…SES s :[AND sp+1 …AND (s+1)p ]} Where SES is the equipment set used in the entire cargo transfer operation. k :[E kp+1 …E (k+1)p ] is the available support equipment for the kth transfer operation stage, E kp+1 …E (k+1)p , k is the kth transfer stage of the cargo, s is the total number of transfer stages of the cargo transfer operation, and p is the number of parallel devices in each operation stage; SES1:[E1…E p ] indicates that the support equipment available in the first stage of the transfer operation is [E1…E p ], SES s :[E sp+1 …E (s+1)p ] indicates that the available support equipment in the sth transfer operation stage is [E sp+1 …E (s+1)p ]; For a piece of equipment, select the code ES, E λk is the equipment number selected from the available support equipment in the k-th transfer operation stage, k∈[1,s],kp+1≤λk≤(k+1)p, s is the total number of transfer operation stages, λ is the equipment number; For the process sequence code OS, the gene is composed of the random order of the goods numbers, each of which appears s times. There are n goods, and the OS segment code composed of n×s genes is composed of n×s genes. The kth occurrence of the goods number i in the OS code is O i,k represents the kth transit stage of cargo i.
4. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 1 is characterized in that: In step S2, a rule-heuristic greedy search genetic algorithm based on double-layer integer coding is used to initialize the population and generate an initial population, including: (1) Generate the equipment selection code ES by random generation. The random generation rule is as follows: traverse each cargo number, traverse each cargo transfer operation stage, and access the selectable equipment set of each operation stage according to the operation stage number. Randomly generate an equipment index in the selectable equipment set, and repeat the above operation to obtain the ES code; (2) Calculate the completion time of all transfer processes for each cargo based on the generated equipment index, and sort the cargo numbers in descending order according to the completion time, that is, the cargo whose entire transfer process takes the longest time is ranked first in the list, and the cargo whose transfer process takes the shortest time is ranked last in the list; (3) According to the principle that the longer the total transit time, the higher the priority, two goods are selected from the sorted list according to the index, and the goods numbers are added to the sequence to be transited, and their numbers in the original list are removed; (4) Randomly select a cargo from the list of cargo numbers that have not been transferred, and insert it into all the available positions in the sequence to be transferred in turn using a greedy method. Calculate the total transfer time after each position is inserted, and select the position with the smallest total transfer time for insertion; (5) Each time the insertion position of a piece of cargo is determined, the number of the cargo is removed from the sequence to be transferred, and step (4) is repeated until all cargo numbers have been inserted; (6) Repeat the obtained transfer sequence s times, where s is the number of operation stages of the cargo transfer operation, to obtain a complete process sorting code OS, and combine the equipment selection code ES with the obtained process sorting code OS to obtain a feasible scheduling chromosome; (7) Repeat the above steps Pop size The number of individuals is Pop size The initial population of .
5. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 4 is characterized in that: In step (2), the completion time calculation is: let the transit time of each stage k be T ik , where i represents the cargo number and k represents the operation stage, then the total completion time C for cargo i is i It is expressed as: The sorting process includes: suppose there are n goods, and the completion time of each goods is C i ; The sorting goal is to generate a sequence of goods numbers {i1,i2…i x …i n }, so that: i x The xth item number after sorting; In step (4), a cargo is randomly selected from the list of cargo numbers that have not been transferred, and a greedy method is used to insert it into all the available positions in the sequence to be transferred, and the total transfer time after each position is inserted is calculated. The position with the smallest total transfer time is selected for insertion, including: Randomly select a piece of cargo from the list of cargo numbers that have not been transferred, record it as A, and record the completion time of the transfer process. In the currently generated sequence to be transferred, find all possible insertion positions; assuming that the current length of the sequence to be transferred is m, insert cargo A into the m+1 position; for each insertion position in the sequence to be transferred, perform the following operations: Temporarily insert cargo A into this position to form a new sequence, and calculate the total transit time of the new sequence; the total transit time of the new sequence is equal to the sum of the completion times of all cargoes in the sequence; among all possible insertion positions, select a position that minimizes the total transit time and insert cargo A into this position; after the insertion is completed, remove cargo A from the untransferred list and update the sequence to be transferred; repeat the above steps until the untransferred list is empty; The method of selecting the position with the smallest total transport time for insertion includes: the current sequence to be transported is S=[B1, B2...B m ], B m When executing the transshipment plan, the mth transshipped cargo; the cargo number randomly selected from the non-transshipped list is A, and the transshipment time is T A ; The cargo A to be inserted is inserted into any position y of S, where any position y is from y=0 to y=m. The total transit time after insertion is defined as: Among them, S[:y] is the subsequence of the original sequence S from its point to position y-1, and S[y:] is the subsequence after position y; for each y, calculate the new total transit time Find a location y * Minimize the total transit time after insertion, that is, Finally insert A into position y * To obtain the updated sequence S, and remove it from the untransferred list; Step (7) gets the number of individuals as Pop size In the initial population, each individual in the population is an iteration operator, and the population size in the search space is set to Pop size , Pop means the number of individuals is Pop size Pop = {l1,l2…l x …l popsize }, l x is the xth individual in the population, x=1,2…Pop size , each individual l in the population x Represents a solution to the problem being asked.
6. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 1 is characterized in that: In step S3, the fitness value expression of each individual is: In the formula, fitness(Chr) is the fitness value of chromosome Chr, T Chr The time taken to complete the scheduling scheme represented by the chromosome Chr, where Chr is the chromosome carrying the scheduling scheme; Decode each chromosome in the population and calculate the fitness value of each individual, including: (i) Split the equipment selection code ES and the process order code OS in the chromosome, use the variable ESnew to receive the first ns genes in the chromosome, and use the variable OSnew to receive the last n×s genes in the chromosome, where n is the number of goods to be transferred and s is the total number of transfer operation stages; (ii) The genes in ESnew are grouped according to the total number of stages s of the cargo transfer operation. The genes from 1 to s in the code are the first group, the genes from s+1 to 2s are the second group, and the genes from (n-1)s+1 to n×s are the nth group, where n is the total number of cargo transferred in the batch cargo guarantee operation; (iii) Traverse each cargo number and create a process list and operation end time list for each cargo to record the transfer stage and end time of each cargo; (iv) Traverse each transfer equipment, create a list to record the load status of each equipment, and record the available time of the equipment; (v) Calculate the total number of stages of all cargo transfer operations n×s, where n is the total number of cargo to be transferred and s is the total number of transfer stages of the cargo transfer operation. Generate a list containing 1 to ns and select each element in sequence as an index. Extract the gene in the OSnew list according to the selected position index to obtain the transferred cargo number i and store it in a new list fqc. Count the number of times the cargo number appears in fqc to obtain the number of transfer operation stages k for the cargo, recorded as O i,k , represents the kth operation stage of cargo i; (vi) Based on the obtained cargo i and transfer stage k, obtain the transfer equipment selected by cargo i in the kth transfer stage from the combined ESnew list, and based on the input cargo transfer time information Record the available time of the device in the device load list created in step (iv); The rth T P The operation time of each operation stage of the type of cargo on different transshipment equipment, T P is the cargo type, is the transit time required for the goods on different transshipment equipment in the kth scheduling stage, The time required for different stages of operations on different types of cargo on different parallel equipment; (vii) Record the operation stage k of the item i, the equipment selected for the stage, the start time and the end time of the operation stage k in the created process list and operation end time list; (viii) Repeat steps (v) to (vii) ns times. The maximum value in the list of job end times is the completion time of the cargo scheduling plan. The reciprocal of this time is taken to obtain the fitness value of the chromosome carrying the scheduling plan.
7. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 1 is characterized in that: In step S3, the population is selected using a roulette wheel strategy of fusion elite retention according to the fitness value, including: (a) Set the number of elite individuals to be retained, z, and calculate the fitness values of all chromosomes in the population; (b) Sort the chromosomes in descending order of fitness value, and take the first z chromosomes and keep them directly in the offspring population; (c) Remove the z chromosomes selected in step (b) from the parent population, and size -z chromosomes, use the roulette wheel method to extract Pop size -z chromosomes are retained in the offspring population, and the selection operation is completed; Pop size is the number of chromosomes in the initial parent population; the probability of each chromosome being extracted is calculated as: In the formula, prob(Chr x ) is the probability of the xth chromosome being selected in the remaining population, fitness(Chr x ) is the fitness value of the xth individual in the remaining population, is the sum of the fitness values of all chromosomes in the remaining population; Through the above-mentioned roulette population selection method with elite retention, high-quality individuals in the parent population are directly placed in the child population, and the remaining individuals are randomly selected according to the roulette method.
8. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 1 is characterized in that: In step S4, in the crossover operation, the equipment selection code ES and the process order code OS in the chromosome are cross-processed at the same time. When designing the crossover function, the improved partial matching crossover IPMC is combined with the position-based uniform combination crossover PBUC and the two-point exchange crossover TPC to form a crossover function 1 and a crossover function 2; the crossover function 1 is formed by combining the two-point exchange crossover TPC and the improved partial matching crossover IPMC, and the crossover function 2 is formed by combining the position-based uniform combination crossover PBUC and the improved partial matching crossover IPMC; The crossover operation specifically includes: traversing each chromosome in the cyclic population, and randomly generating a random number r between 0 and 1 for each chromosome traversed c , if the generated random number is less than the set crossover probability p c ,0 <p c <1, the algorithm enters the crossover operation and randomly generates a number r between 0 and 1 s , used to select the crossover function, if r s ≤0.5, use crossover function 1 for crossover operation. If r s >0.5, crossover function 2 is used for crossover operation; Repeat the above steps Pop size times, complete the crossover operation for all chromosomes in the population, Pop size is the number of chromosomes in the population.
9. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 7 is characterized in that: Mutation operations include: (A) Traverse each chromosome in the cyclic population and randomly generate a random number r between 0 and 1 each time a chromosome is traversed m , if the generated random number is less than the set mutation probability p m ,0 <p m <1, the algorithm enters the mutation operation; (B) Perform a split operation on the currently traversed chromosome P1 to obtain the equipment selection code ES and the process sorting code OS. The length of P1 is 2ns. The lengths of the equipment selection code ES and the process sorting code OS are both ns. Perform a combination operation on the genes in the equipment selection code ES and group them according to the number of transfer stages of each cargo. That is, the 1st to sth genes in the code are the first group, the s+1 to 2sth genes are the second group... (n-1)s+1 to nsth genes are the nth group. After combination, the length of the equipment selection code ES is n, where n is the number of cargo transferred in the batch cargo transfer task, and s is the number of operation stages of the cargo transfer task. (C) To enhance the local search capability of the algorithm, set the number of cycles to X. First, use the two-point exchange mutation method to mutate the equipment selection code ES and the process sorting code OS respectively. Concatenate the mutated equipment selection code ES and the process sorting code OS to obtain a new chromosome. Calculate the fitness value of the new chromosome. If it is greater than the parent chromosome P1, replace P1 with the new chromosome. Repeat the above operation X times. Then, split the obtained chromosome P1 according to step (B). Mutate the equipment selection code and the process sorting code obtained after the split using the next method. Concatenate the mutated equipment selection code and the process sorting code to obtain a new chromosome. Calculate the fitness value of the new chromosome. If it is greater than the parent chromosome P1, replace P1 with the new chromosome. Repeat the above operation X times until all four mutation methods are cycled through. Then, chromosome P1 is obtained and the mutation operation ends. The four mutation methods include two-point exchange, regular insertion, reverse order reversal, and regular insertion with greedy search.
10. The ship special cargo scheduling optimization method based on GSGA-DIC algorithm according to claim 1 is characterized in that: In step S5, the iteration termination strategy of the algorithm adopts the iteration termination strategy of the adaptive algorithm, including: setting the iteration increment of the algorithm to S, the basic iteration number to N, N = 2S, the current iteration number of the algorithm to α, when α ÷ S = 0, if the optimal solution found in the most recent S generations is improved, then the number of iterations of the algorithm is increased by S times, that is, N = N + S; if the optimal solution found in the most recent S generations of the algorithm is not improved, that is, the operation time of the optimal scheduling solution obtained by the optimization of the most recent S generations is not shortened, the algorithm is terminated.