Shipbuilding workshop process optimization method and system based on SQP-CS
By improving the cuckoo search algorithm and combining it with the adaptive Levy flight and SQP local search strategies, the process scheduling of ship manufacturing workshops is optimized, which solves the problems of slow search speed and low precision in the existing technology, and achieves more efficient workshop processing and more accurate scheduling solutions.
Patent Information
- Application Number
- CN202211432725.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-11-16
AI Technical Summary
The existing cuckoo search algorithm has slow search speed and low calculation accuracy in the shipbuilding workshop operation scheduling problem. It is easy to fall into local optimality, and the population diversity is lost quickly in the late iteration, resulting in premature maturity, making it difficult to find the optimal workshop process scheduling solution.
The improved cuckoo search algorithm is used to obtain the workshop operation scheduling plan and the optimal solution by constructing a mathematical model for workshop operation scheduling optimization and setting constraints. The scheduling plan is optimized by combining the adaptive Levy flight and SQP local search strategy.
It improves workshop processing efficiency, reduces processing time, increases the success rate of finding the optimal workshop process scheduling plan, solves the problems of rational resource utilization and order cycle constraints, and obtains more accurate scheduling plans.
Smart Images

Figure CN115755801B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of job shop scheduling optimization, and relates to a shipbuilding shop process optimization method based on SQP-CS. Background Art
[0002] The job-shop scheduling problem (JSP) is a simplified mathematical model for many production scheduling problems, with widespread application in production planning, enterprise management, transportation, and other fields. JSP has been shown to be one of the most difficult combinatorial optimization problems and a typical NP-hard problem. Research methods for solving it include optimization and heuristic methods.
[0003] Optimization methods include Lagrange relaxation, branch and bound, and mathematical programming. Although these methods can theoretically obtain optimal solutions, their computational complexity and time overhead increase exponentially with the increase in the scale of JSP, making it difficult to meet the needs of current practical projects.
[0004] Heuristic methods include simulated annealing (SA), genetic algorithms (GA), particle swarm optimization (PSO), and ant colony optimization (ACO). The simulated annealing algorithm incorporates probabilistic jumps, enabling local optimal solutions to be probabilistically jumped out of the solution and ultimately converge to the global optimum. Genetic algorithms search for optimal solutions by simulating the biological evolutionary process of genetic selection and natural elimination. Particle swarm optimization utilizes information sharing within a swarm, allowing the movement of the entire swarm to evolve from disorder to order in the problem-solving space, thereby obtaining the optimal solution. The ant colony algorithm, in which a group of unintelligent or slightly intelligent individuals (agents) exhibit intelligent behavior through mutual collaboration, offers a new possibility for solving complex problems.
[0005] Cuckoo Search (CS) is a novel bio-inspired algorithm proposed by Yang and Deb in 2009. The algorithm simulates the unique nest-finding and egg-laying behavior of cuckoos and introduces the Lévy flight mechanism of natural birds and fruit flies.
[0006] The existing cuckoo algorithm, with its advantages of few parameters, strong robustness, high efficiency, ease of implementation, and excellent random search paths, has successfully solved many practical problems. However, for optimizing job shop scheduling problems, the cuckoo search algorithm suffers from slow search speed, low computational accuracy, and insufficient search dynamism. Its single Lévy flight search in local search cannot guarantee convergence to the local optimum when approaching an extreme point. In the later stages of iteration, the population loses diversity rapidly, making it prone to falling into local optima and prone to premature maturation. Summary of the Invention
[0007] The present invention aims to address the existing problems of the prior art and, with the goal of achieving highly efficient shipbuilding workshop processes, proposes a shipbuilding workshop process optimization method based on the CS-SQP process. First, a mathematical model for workshop scheduling optimization is constructed, and constraints are set. Based on these constraints, the goal of minimizing processing time is set as the workshop scheduling optimization objective, and a workshop scheduling objective function is established. Improvements are made to the adjustment step size of the cuckoo search algorithm, and the improved cuckoo search algorithm is used to obtain the optimal solution for the workshop scheduling solution. Data show that the improved cuckoo search algorithm improves workshop processing efficiency, significantly reduces workshop processing time, and improves the success rate of finding the optimal workshop process scheduling solution.
[0008] The technical solution for achieving the purpose of the present invention is: a shipbuilding workshop process optimization method based on SQP-CS, the method comprising the following steps:
[0009] Step 1: Code the process for each type of workpiece in the workshop;
[0010] Step 2: Construct an objective function with the goal of minimizing the maximum completion time and a fitness function;
[0011] Step 3: Based on the process coding, the SQP-CS algorithm is used to solve the objective function and obtain the process optimization solution.
[0012] Furthermore, step 1 specifically includes:
[0013] Step 1-1, according to the number of workpiece processes, randomly generate a preliminary process code work = [ 11 ,O 12 ,O 13 …], O ij represents the jth process of the i-th workpiece, i = 1, 2…, n, j = 1, 2…, m; where n is the total number of workpieces and m is the total number of processes;
[0014] Step 1-2: In the numerical range from 0 to 4 times the code length i×j, select i×j non-repeating numbers at any time, that is, Random(0, 4×i×j, i×j), to form a numerical sequence;
[0015] Step 1-3, arranging the values in the numerical sequence of step 1-2 in ascending order, and then obtaining the position number of each value in the numerical sequence of step 1-2 in turn to form a coding sequence;
[0016] Step 1-4: According to the coding sequence obtained in step 1-3, extract the values from the corresponding positions of the preliminary process code in sequence to obtain the final process code.
[0017] Furthermore, the objective function in step 2, which aims to minimize the maximum completion time, is:
[0018]
[0019] The constraints are:
[0020] C ik -P ik +T(1-X ikl )≥C ik
[0021] C jk -C ik +T(1-Y ijl )≥p ik
[0022]
[0023]
[0024] Where, k,l=1,2,…,q, q is the total number of machines processing the workpiece; P ik and C ik are the processing time and completion time of workpiece i on machine k, T is a positive real number, X ikl and Y ijl denote the indicator coefficient and indicator variable, respectively.
[0025] Furthermore, the fitness function in step 2 is:
[0026]
[0027] Furthermore, step 3 specifically includes:
[0028] Step 3-1, initialize the basic parameters of the SQP-CS algorithm: initialize the population, each individual in the population, i.e., the bird's nest, represents a solution, i.e., the process sequence, and the location of the bird's nest represents the completion time corresponding to each solution. Set the population size to 4n or 6n, and the probability of a solution being found is P a , the maximum number of iterations is T max ;
[0029] Step 3-2, calculate the fitness value of each individual, and take the individual corresponding to the maximum fitness value as the current optimal solution x best ;
[0030] Step 3-3: Keep the position of the previous optimal solution unchanged and generate a set of new solutions for all other solutions. Then compare the fitness values of the new and old solutions. If the fitness value of the new solution is better than that of the previous generation, the new solution will be used to replace the old solution.
[0031] Step 3-4, generate a random number r, and determine whether r is greater than P a If yes, proceed to the next step, otherwise jump to step 3-8;
[0032] Step 3-5, random discard (P a × the total number of solutions) solutions, and then generate new solutions to replace the discarded solutions;
[0033] Steps 3-6, solve the fitness value of the entire population and update the current optimal solution x best , and record its location;
[0034] Step 3-7: Based on the optimal solution of step 3-6, perform SQP depth search and update the optimal solution;
[0035] Step 3-8: Determine whether the maximum number of iterations or search accuracy requirements are met. If not, return to step 3-2; otherwise, output the optimal solution, i.e., the process sequence and the corresponding completion time.
[0036] Furthermore, in step 3-3, a set of new solutions is generated for all other solutions, specifically by the adaptive Levy flight method. The adaptive Levy flight position generation formula is:
[0037]
[0038] in, Indicates the solution position of the i-th cuckoo in the k-th generation, and is represented by C in the workshop scheduling problem. ik express, is a point-to-point multiplication, L(β) represents the random vector generated by the Levy distribution, namely:
[0039] L(β)~μ=k -β
[0040] a m is the adaptive Levy flight factor, which is:
[0041]
[0042] Where k i Indicates the current number of iterations, k max Indicates the total number of iterations, take amax =0.9, a r is a random step size factor on [-0.05, 0.05].
[0043] Furthermore, the new solution in steps 3-5 is generated based on the random walk of the population average position. The formula for generating the solution of the random walk is:
[0044]
[0045] in, represents the solution position of the i-th cuckoo in the k+1th generation, γ represents the step size, which controls the degree of the average position of the population; σ is a random number on [0,1]; Represents the average position of the entire population in the kth generation, and the calculation formula is:
[0046]
[0047] Where n is the population size.
[0048] Furthermore, steps 3-7 specifically include:
[0049] Take the optimal solution x best As the initial point, the SQP local search strategy is used to generate a new solution;
[0050] Calculate the fitness value of the new solution and compare it with the fitness value of the corresponding old solution. If the fitness value of the new solution is better than the old solution, use the new solution to replace the old solution.
[0051] Then update the optimal solution x according to the fitness value best .
[0052] Compared with the prior art, the present invention has the following significant advantages:
[0053] 1) The algorithm not only solves the problem of rational resource utilization and scheduling in shipbuilding workshops, but also takes into account the constraints of the order cycle, making the algorithm solution more accurate and practical.
[0054] 2) By directly taking the attributes of workshop operations as parameters, we finally get a set of optimal workshop scheduling solutions, which solves the unreasonable production and processing plans in the actual production process.
[0055] 3) In view of the defects of the traditional cuckoo algorithm in solving the workshop scheduling problem, the adjustment step size of the cuckoo search algorithm is improved, and the improved cuckoo search algorithm is used to obtain the optimal solution for the workshop operation scheduling plan. Experimental data show that the improved cuckoo search algorithm has accelerated the workshop processing efficiency, significantly reduced the workshop operation processing time, and improved the success rate of obtaining the optimal workshop process scheduling plan.
[0056] 4) The standard cuckoo algorithm is optimized in two key aspects: its fixed step size factor and its low solution accuracy. To address this issue, an adaptive method is added to the Lévy flight to expand its search space and improve its initial global search capabilities. Global population information is incorporated into the algorithm's random walk to update its position, enabling it to locate the region containing the global optimum. Finally, to ensure solution accuracy, the optimal nest location is used as the initial point for a SQP local search, searching for the local extremum of the optimal individual, enhancing the algorithm's local depth search capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 Flowchart of the optimized SQP-CS algorithm. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0059] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0060] In one embodiment, combined Figure 1 , provides a shipbuilding workshop process optimization method based on SQP-CS, the method comprising the following steps:
[0061] Step 1: Code the process for each type of workpiece in the workshop; specifically:
[0062] Step 1-1, according to the number of workpiece processes, randomly generate a preliminary process code work = [ 11 ,O 12 ,O 13 …], O ij represents the jth process of the i-th workpiece, i = 1, 2…, n, j = 1, 2…, m; where n is the total number of workpieces and m is the total number of processes;
[0063] Step 1-2: In the numerical range from 0 to 4 times the code length i×j, select i×j non-repeating numbers at any time, that is, Random(0, 4×i×j, i×j), to form a numerical sequence;
[0064] Step 1-3, arranging the values in the numerical sequence of step 1-2 in ascending order, and then obtaining the position number of each value in the numerical sequence of step 1-2 in turn to form a coding sequence;
[0065] Step 1-4: According to the coding sequence obtained in step 1-3, extract the values from the corresponding positions of the preliminary process code in sequence to obtain the final process code.
[0066] Step 2: Construct an objective function with the goal of minimizing the maximum completion time and a fitness function. The objective function with the goal of minimizing the maximum completion time is:
[0067]
[0068] The constraints are:
[0069] C ik -P ik +T(1-X ikl )≥C ik
[0070] C jk -C ik +T(1-Y ijl )≥p ik
[0071]
[0072]
[0073] Where, k,l=1,2,…,q, q is the total number of machines processing the workpiece; P ik and C ik are the processing time and completion time of workpiece i on machine k, T is a positive real number, X ikl and Y ijl Denote the indicator coefficient and indicator variable respectively. The three constraint adjustments represent: the processing order of each workpiece, the order of each machine processing each workpiece, and the completion time variable constraint.
[0074] The fitness function is:
[0075]
[0076] Step 3: Based on the process code, use the SQP-CS algorithm to solve the objective function and obtain the process optimization solution. Specifically include:
[0077] Step 3-1, initialize the basic parameters of the SQP-CS algorithm: initialize the population, each individual in the population, i.e., the bird's nest, represents a solution, i.e., the process sequence, and the location of the bird's nest represents the completion time corresponding to each solution. Set the population size to 4n or 6n, and the probability of a solution being found is P a (preferably set to 0.25), the maximum number of iterations is T max ;
[0078] Step 3-2, calculate the fitness value of each individual, and take the individual corresponding to the maximum fitness value as the current optimal solution x best ;
[0079] In step 3-3, the position of the previous optimal solution is kept unchanged, and a new set of solutions is generated for all other solutions. Then, the fitness values of the new and old solutions are compared. If the fitness value of the new solution is better than that of the previous generation, the new solution is used to replace the old solution. Among them, a new set of solutions is generated for all other solutions, specifically through the adaptive Levy flight method. The adaptive Levy flight position generation formula is:
[0080]
[0081] in, Indicates the solution position of the i-th cuckoo in the k-th generation, and is represented by C in the workshop scheduling problem. ik express, is a point-to-point multiplication, L(β) represents the random vector generated by the Levy distribution, namely:
[0082] L(β)~μ=k -β
[0083] a m is the adaptive Levy flight factor, which is:
[0084]
[0085] Where k i Indicates the current number of iterations, k max Indicates the total number of iterations, take a max =0.9, a r is a random step size factor on [-0.05, 0.05];
[0086] Step 3-4, generate a random number r, and determine whether r is greater than P a If yes, proceed to the next step, otherwise jump to step 3-8;
[0087] Step 3-5, random discard (P a × the total number of solutions) solutions, and then generate new solutions to replace the discarded solutions; the new solutions are generated based on the random walk of the population average position, and the formula for generating the random walk solution is:
[0088]
[0089] in, represents the solution position of the i-th cuckoo in the k+1 generation, γ represents the step size, and the preferred value is 1.6; it controls the degree of the average position of the population; σ is a random number on [0,1]; Represents the average position of the entire population in the kth generation, and the calculation formula is:
[0090]
[0091] Where n is the population size.
[0092] Steps 3-6, solve the fitness value of the entire population and update the current optimal solution x best , and record its location;
[0093] Step 3-7: Based on the optimal solution from step 3-6, perform an SQP deep search and update the optimal solution. Specifically, it includes:
[0094] Take the optimal solution x best As the initial point, the SQP local search strategy is used to generate a new solution;
[0095] Calculate the fitness value of the new solution and compare it with the fitness value of the corresponding old solution. If the fitness value of the new solution is better than the old solution, use the new solution to replace the old solution.
[0096] Then update the optimal solution x according to the fitness value best .
[0097] The SQP local search steps are as follows:
[0098] At the optimal solution x best The original model is replaced by an approximate quadratic programming model and solved, and then the optimal solution is approximated by a series of quadratic programming solutions. The specific steps are as follows:
[0099] (1) Update the Hessian matrix of the Lagrangian function
[0100] in
[0101] S k =x k+1 -x k
[0102]
[0103] Where λ is the Lagrange multiplier, k is the current iteration number, x is the optimization vector point, and g(x) is the function vector of the constraint condition. kis the quasi-Newton approximation of the Lagrangian function obtained using the semi-positive definite Newton approximation method
[0104] (2) Construct a quadratic program whose objective function is:
[0105]
[0106]
[0107] Where d is the search direction vector.
[0108] The QP solution process is divided into three steps:
[0109] Calculate feasible points for the solution.
[0110] An iterative sequence of feasible points that converges to the solution of the problem.
[0111] Perform a one-dimensional search along the new search vector d to obtain a new optimization vector x k+1 :
[0112] x k+1 =x k +β k d k
[0113] where β k is the step size parameter.
[0114] Step 3-8: Determine whether the maximum number of iterations or search accuracy requirements are met. If not, return to step 3-2; otherwise, output the optimal solution, i.e., the process sequence and the corresponding completion time.
[0115] In one embodiment, a shipbuilding workshop process optimization system based on SQP-CS is provided, the system comprising:
[0116] The first module is used to code the process for each type of workpiece in the workshop;
[0117] The second module is used to construct the objective function with the goal of minimizing the maximum completion time and the fitness function;
[0118] The third module is used to solve the objective function based on the process coding and obtain the process optimization solution using the SQP-CS algorithm.
[0119] For a detailed introduction to this system, please refer to the above-mentioned shipbuilding workshop process optimization method based on SQP-CS, which will not be repeated here.
[0120] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only illustrative of the principles of the present invention. Without departing from the spirit and scope of the present invention, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A shipbuilding workshop process optimization method based on SQP-CS, characterized by: The method comprises the following steps: Step 1: Code the process for each type of workpiece in the workshop; specifically: Step 1-1, according to the number of workpiece processes, randomly generate a preliminary process code work = [ 11 ,O 12 ,O 13 …], O ij represents the jth process of the i-th workpiece, i = 1, 2…, n, j = 1, 2…, m; where n is the total number of workpieces and m is the total number of processes; Step 1-2: In the numerical range from 0 to 4 times the code length i×j, select i×j non-repeating numbers at any time, that is, Random(0, 4×i×j, i×j), to form a numerical sequence; Step 1-3, arranging the values in the numerical sequence of step 1-2 in ascending order, and then obtaining the position number of each value in the numerical sequence of step 1-2 in turn to form a coding sequence; Step 1-4: according to the code sequence obtained in step 1-3, extract the values from the corresponding positions of the preliminary process code in sequence to obtain the final process code; Step 2: Construct an objective function with the goal of minimizing the maximum completion time and a fitness function; Step 3: Based on the process code, use the SQP-CS algorithm to solve the objective function and obtain the process optimization solution; specifically, it includes: Step 3-1, initialize the basic parameters of the SQP-CS algorithm: initialize the population, each individual in the population, i.e., the bird's nest, represents a solution, i.e., the process sequence, and the location of the bird's nest represents the completion time corresponding to each solution. Set the population size to 4n or 6n, and the probability of a solution being found is P a , the maximum number of iterations is T max ; Step 3-2, calculate the fitness value of each individual, and take the individual corresponding to the maximum fitness value as the current optimal solution x best ; Step 3-3: Keep the position of the previous optimal solution unchanged and generate a set of new solutions for all other solutions. Then compare the fitness values of the new and old solutions. If the fitness value of the new solution is better than that of the previous generation, the new solution will be used to replace the old solution. Step 3-4, generate a random number r, and determine whether r is greater than P a If yes, proceed to the next step, otherwise jump to step 3-8; Step 3-5, random discard (P a × the total number of solutions) solutions, and then generate new solutions to replace the discarded solutions; Steps 3-6, solve the fitness value of the entire population and update the current optimal solution x best , and record its location; Step 3-7: Based on the optimal solution of step 3-6, perform SQP depth search and update the optimal solution; Step 3-8: Determine whether the maximum number of iterations or search accuracy requirements are met. If not, return to step 3-2; otherwise, output the optimal solution, i.e., the process sequence and the corresponding completion time.
2. The shipbuilding workshop process optimization method based on SQP-CS according to claim 1 is characterized in that: The objective function in step 2, which aims to minimize the maximum completion time, is: The constraints are: C ik -P ik +T(1-X ikl )≥C ik C jk -C ik +T(1-Y ijl )≥p ik Where, k,l=1,2,…,q, q is the total number of machines processing the workpiece; P ik and C ik are the processing time and completion time of workpiece i on machine k, T is a positive real number, X ikl and Y ijl denote the indicator coefficient and indicator variable, respectively.
3. The shipbuilding workshop process optimization method based on SQP-CS according to claim 2 is characterized in that: The fitness function in step 2 is:
4. The shipbuilding workshop process optimization method based on SQP-CS according to claim 1 is characterized in that: In step 3-3, a new set of solutions is generated for all other solutions. Specifically, they are generated by the adaptive Levy flight method. The adaptive Levy flight position generation formula is: in, Indicates the solution position of the i-th cuckoo in the k-th generation, and is represented by C in the workshop scheduling problem. ik express, is a point-to-point multiplication, L(β) represents the random vector generated by the Levy distribution, namely: L(β)~μ=k -β a m is the adaptive Levy flight factor, which is: Where k i Indicates the current number of iterations, k max Indicates the total number of iterations, take a max =0.9, a r is a random step size factor on [-0.05, 0.05].
5. The shipbuilding workshop process optimization method based on SQP-CS according to claim 1 is characterized in that: The new solution in steps 3-5 is generated based on the random walk of the population average position. The formula for generating the solution of the random walk is: in, represents the solution position of the i-th cuckoo in the k+1th generation, γ represents the step size, which controls the degree of the average position of the population; σ is a random number on [0,1]; Represents the average position of the entire population in the kth generation, and the calculation formula is: Where n is the population size.
6. The shipbuilding workshop process optimization method based on SQP-CS according to claim 1 is characterized in that: Steps 3-7 specifically include: Take the optimal solution x best As the initial point, the SQP local search strategy is used to generate a new solution; Calculate the fitness value of the new solution and compare it with the fitness value of the corresponding old solution. If the fitness value of the new solution is better than the old solution, use the new solution to replace the old solution. Then update the optimal solution x according to the fitness value best .
7. A shipbuilding workshop process optimization system based on SQP-CS according to any one of claims 1 to 6, characterized in that: The system comprises: The first module is used to code the process for each type of workpiece in the workshop; The second module is used to construct the objective function with the goal of minimizing the maximum completion time and the fitness function; The third module is used to solve the objective function based on the process coding and obtain the process optimization solution using the SQP-CS algorithm.