Flow shop scheduling optimization method and system considering order delivery time
By dividing workshop scheduling problems into main problems and sub-problems, and combining adaptive fruit fly algorithms and mixed integer linear programming models, the problem of difficult to quickly converge scheduling problems in the existing technology is solved, and an efficient scheduling solution is achieved.
Patent Information
- Application Number
- CN202510119172.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to quickly converge to answer the scheduling problem of flow workshops, which makes it difficult to obtain satisfactory scheduling solutions within the time limit.
By dividing workshop scheduling problems into main problems and sub-problems, the adaptive fruit fly algorithm is used to solve the main problems, and the MILP and CP models are constructed to solve the sub-problems, combining upper and lower bound iteration and separating constraints, the optimal solution is gradually approached.
It realizes rapid convergence within time limit and obtains better scheduling solutions, which improves the scheduling problem's scheduling problem's solutionability and solution efficiency.
Smart Images

Figure CN120013180A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hybrid assembly line analysis, and in particular relates to an assembly line workshop scheduling optimization method and system taking order delivery time into consideration. Background Art
[0002] Prefabricated buildings are a new type of construction method based on industrialized production. Prefabricated components (such as wall panels, balconies, stairs, etc.) are produced in factories and then mechanized and assembled on site to complete the main structure and other parts of the building. Prefabricated buildings meet the requirements of the current green building concept because of their advantages such as energy saving and environmental protection, high construction efficiency, and controllable quality. However, the development of prefabricated buildings is still facing various challenges, one of which is the complexity of production scheduling. With the increasingly fierce market competition, more and more prefabricated component manufacturers are adopting distributed production and parallel production lines to improve production efficiency. However, due to the high equipment cost of the pouring machine, two or more production lines in the factory often need to share a pouring machine. And because different factories may have different machine models, the time and cost required for the same order to be processed in different factories are not exactly the same. Our goal is to formulate a better scheduling plan for prefabricated component manufacturers in a shorter time, taking into account the delivery time of the order and the production and transportation costs, so as to help enterprises improve their competitiveness.
[0003] In the existing methods, the production scheduling problem of prefabricated components can be solved by constructing a mixed integer linear programming model or a constraint programming model and then using commercial solvers such as Gurobi or CPLEX. However, due to the complexity of the distributed heterogeneous flow shop problem, using commercial planning solvers to solve the constraint model or mixed integer linear programming model cannot quickly converge the solution, so it is difficult to obtain a satisfactory scheduling solution within the time limit. And the heuristic algorithm cannot measure the quality of the obtained scheduling solution because it cannot obtain a lower bound. Therefore, the present invention proposes a solution to solve the above problem. Summary of the invention
[0004] The purpose of the present invention is to overcome the problem that the existing scheduling scheme cannot quickly converge the solution and it is difficult to obtain the optimal scheduling scheme within the time limit, and to provide a flow shop scheduling optimization method and system taking into account the order delivery time.
[0005] In order to achieve the above object, the present invention adopts the following technical solution: A flow shop scheduling optimization method considering order delivery time includes the following steps: S1: Collect production data and record the shop scheduling problem that takes into account the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; S2: Divide the workshop scheduling problem into a main problem and a sub-problem. The main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines. S3: Solve DHPPFSP_SR_TCPC by using the adaptive fruit fly algorithm to obtain a preliminary allocation plan for allocating orders to factories; S4: Construct the MILP model of the main problem and the CP model of the sub-problem, solve the CP model of the sub-problem based on the preliminary allocation plan of orders to factories, obtain the latest delivery time of each factory, add the latest delivery time of each factory to the MILP model of the main problem, and calculate the solution of DHPPFSP_SR_TCPC as the initial upper bound; S5: Construct the model MILP_LB3 based on the condition that the order only processes the third stage, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound based on the delivery time of other stages; S6: Determine the gap value between the initial upper bound and the initial lower bound. If the gap value is less than or equal to 0, output the initial upper bound as the optimal solution. Otherwise, execute S7. S7: With the goal of minimizing the order delivery time and the weighted sum of production and transportation costs, use the solver to solve the MILP model of the main problem, obtain the assignment scheme and lower bound for allocating orders to factories, and update the lower bound; S8: Update the CP model of the subproblem to obtain SSP_CP, take the minimization of the latest delivery time of each factory as the goal, and use the solver to solve the subproblem model SSP_CP based on the assignment scheme of orders to factories to obtain the minimization of the latest delivery time of each factory; S9: Compare the minimized latest delivery time of each factory to obtain the maximum value of the minimized latest delivery time, and calculate and update the upper bound based on the maximum value; S10: Determine the gap value between the updated upper bound and the lower bound. If the gap value is less than or equal to 0, output the upper bound value as the optimal solution. Otherwise, add a cut constraint to the main problem model MILP based on the updated upper bound value. Return to S7 for iterative solution based on the main problem model MILP after adding the cut constraint. The delivery time is the sum of the production time and the transportation time, and the delivery cost is the sum of the production cost and the transportation cost.
[0006] The production data collected in S1 include: the number of factories, the number of orders, the number of processes, the processing time and cost of each process of the order in different factories, the time and cost required for the order to be delivered from the factory to the order delivery location, and the number of production lines in each factory; the order needs to go through six processes: mold assembly, pre-embedded steel bars, concrete pouring, steam curing, mold removal, and defect repair.
[0007] In S3, the specific method of solving DHPPFSP_SR_TCPC by the adaptive fruit fly algorithm to obtain the preliminary allocation plan of orders to factories is as follows: S301: Encode all orders with real numbers; S302: randomly generating an order allocation scheme as a population center based on a real number coding method; S303: Taking the population center as the search starting point, multi-neighborhood collaborative search is performed based on the collected production data, and a population is generated according to the neighborhood selection probability; S304: Counting the number of solutions generated by each neighborhood structure that are better than the center of the current population according to the generated population; S305: updating the selection probability of each neighborhood in the next iteration according to the number of solutions generated by each neighborhood construction that are better than the current population center; S306: Determine whether the current population optimal solution is better than the population center. If so, replace the population center with the current population optimal solution; otherwise, keep the population center unchanged. S307: Determine whether the time limit has been reached, and if so, output the result; otherwise, return to step S303.
[0008] In the step of encoding all orders by real numbers, the real number encoding is performed by using an integrated encoding and decoding method of the insertion 0 method.
[0009] In S4, the latest delivery time of each factory is added to the MILP model of the main problem through formula (19), and the initial upper bound of DHPPFSP_SR_TCPC is calculated through formula (20). The specific formula is as follows:
[0010] in, is the latest delivery time for each factory, and the maximum value is recorded as , is the set of orders assigned to each factory, is a binary variable. When order j is assigned to factory f is 1, otherwise it is 0; is the weight coefficient of the delivery cost, is the weight coefficient of order delivery time, is the index of the factory, is the index of the order, is a collection of factories, is a collection of orders, It is an order In the factory The cost of production, It's a factory Shipping Orders The shipping cost to the corresponding customer.
[0011] In S5, the formula for calculating the initial lower bound is as follows: (27) Adding formula (28) to the MILP model of the main problem is used to improve the model's ability to obtain the initial lower bound. The specific formula is as follows:
[0012] in, Indicates factory Order In the The processing time of each process; For the factory Shipping Orders The shipping time to the corresponding customer, is the weighted sum of the delivery time and delivery cost of the order in the third stage, It is the maximum value of the sum of order completion time and transportation time.
[0013] The optimization goal of the updated sub-problem SSP_CP in S8 is:
[0014] in, represents the latest delivery time of each factory in the hth iteration.
[0015] In S9, the updated upper bound is:
[0016] in, The maximum value of the minimum latest delivery time of f factories is recorded as .
[0017] The cut constraint added in S10 is:
[0018] in, represents the minimum latest delivery time of each factory in the hth iteration, is the decision variable.
[0019] A flow shop scheduling optimization system considering order delivery time, comprising: The acquisition module is used to collect production data and record the shop scheduling problem that takes into account the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; A classification module is used to divide the workshop scheduling problem into a main problem and a sub-problem, the main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines; The adaptive solution module is used to solve DHPPFSP_SR_TCPC by using the adaptive fruit fly algorithm to obtain a preliminary allocation plan for allocating orders to factories; The initial upper bound calculation module is used to construct the MILP model of the main problem and the CP model of the sub-problem. The CP model of the sub-problem is solved based on the preliminary allocation plan of orders to factories to obtain the latest delivery time of each factory. The latest delivery time of each factory is added to the MILP model of the main problem, and the solution of DHPPFSP_SR_TCPC is calculated as the initial upper bound. The initial lower bound calculation module is used to construct the model MILP_LB3 based on the condition that the order only processes the third stage process, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound in combination with the delivery time of other stages; A first judgment module is used to judge the gap value between the initial upper bound and the initial lower bound. If the gap value is less than or equal to 0, the initial upper bound is output as the optimal solution. Otherwise, S7 is executed. The lower bound updating module is used to solve the MILP model of the main problem using a solver with the goal of minimizing the weighted sum of order delivery time and production and transportation costs, obtain the assignment scheme and lower bound for allocating orders to factories, and update the lower bound; The sub-problem iterative solution module is used to update the sub-problem CP model to obtain SSP_CP. With the goal of minimizing the latest delivery time of each factory, based on the assignment scheme of orders to factories, the sub-problem model SSP_CP is solved by the solver to obtain the minimized latest delivery time of each factory. An upper bound updating module, used for comparing the minimized latest delivery time of each factory, obtaining the maximum value of the minimized latest delivery time, and calculating and updating the upper bound based on the maximum value; The second judgment module is used to judge the gap value between the updated upper bound and the lower bound. If the gap value is less than or equal to 0, the upper bound value is output as the optimal solution. Otherwise, a cut constraint is added to the main problem model MILP based on the updated upper bound value, and the main problem model MILP after the cut constraint is added is returned to S7 for iterative solution.
[0020] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a flow shop scheduling optimization method and system considering order delivery time, comprising the following steps: S1: collecting production data, recording the workshop scheduling problem that considers the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; S2: dividing the workshop scheduling problem into a main problem and a sub-problem, the main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders in the factory to specific production lines and determining the production sequence on the production line; S3: solving DHPPFSP_SR_TCPC by an adaptive fruit fly algorithm to obtain a preliminary order allocation to the factory. allocation plan; S4: construct the MILP model of the main problem and the CP model of the sub-problem, solve the CP model of the sub-problem based on the preliminary allocation plan of the order to the factory, obtain the latest delivery time of each factory, add the latest delivery time of each factory to the MILP model of the main problem, and calculate the solution of DHPPFSP_SR_TCPC as the initial upper bound; S5: construct the model MILP_LB3 based on the condition that the order only processes the third stage process, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound in combination with the delivery time of other stages; S6: judge the The gap value between the initial upper bound and the initial lower bound, if the gap value is less than or equal to 0, then output the initial upper bound as the optimal solution, otherwise, execute S7; S7: With the goal of minimizing the order delivery time and the weighted sum of production and transportation costs, use the solver to solve the MILP model of the main problem, obtain the assignment plan and lower bound for allocating orders to factories, and update the lower bound; S8: Update the CP model of the subproblem to obtain SSP_CP, with the goal of minimizing the latest delivery time of each factory, based on the assignment plan for allocating orders to factories, use the solver to solve the subproblem model SSP_CP, and obtain the minimum latest delivery time of each factory. time; S9: compare the minimized latest delivery time of each factory, obtain the maximum value of the minimized latest delivery time, and calculate and update the upper bound based on the maximum value; S10: determine the gap value between the updated upper and lower bounds, if the gap value is less than or equal to 0, output the upper bound value as the optimal solution, otherwise, add a cut constraint to the main problem model MILP based on the updated upper bound value, and return to S7 for iterative solution based on the main problem model MILP after adding the cut constraint; the present invention adds a method for obtaining the initial upper bound and the initial lower bound, and in the subsequent iterative process, gradually approach the optimal solution by continuously updating the upper and lower bounds and adding the cut constraint. This method ensures the convergence of the solution process and the optimality of the solution.
[0021] Furthermore, by decomposing the complex scheduling problem into a main problem and sub-problems, the problem is easier to understand and handle. The main problem focuses on the allocation of orders to factories, while the sub-problems focus on the allocation of production lines and production sequence scheduling within the factory. This decomposition improves the solvability and efficiency of the problem.
[0022] Furthermore, using the adaptive fruit fly algorithm to solve the main problem can quickly obtain a preliminary order allocation plan. The adaptive algorithm can adjust the search strategy according to the actual situation and improve the accuracy and efficiency of the solution.
[0023] Furthermore, the present invention has high flexibility and scalability. With changes in the production environment or the emergence of new requirements, model parameters can be easily adjusted or new constraints can be added to adapt to new scheduling requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of the present invention; Figure 2 This is a flow chart of the adaptive fruit fly algorithm of the present invention; Table 1 is the meaning of the parameters of the present invention; Table 2 shows the meaning of the decision variables of the present invention; Table 3 is the and The experimental results of Table 4 is the comparison result of the average gap of small and medium scale in Example 3 of the present invention; Table 5 is a small-scale Compare the results; Table 6 is a small-scale Compare the results; Table 7 is the comparison result of large-scale average gap in Example 3 of the present invention; Table 8 shows the large-scale Compare the results; Table 9 shows the large-scale Compare the results. DETAILED DESCRIPTION
[0025] In order to further understand the content of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0026] Example 1 like Figure 1 As shown in the figure, a flow shop scheduling optimization method considering order delivery time is named ELBBD, which adopts the following steps: S1: Collect production data and record the shop scheduling problem that takes into account the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; S2: Divide the workshop scheduling problem into a main problem and a sub-problem. The main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines. S3: Solve DHPPFSP_SR_TCPC by using the adaptive fruit fly algorithm to obtain a preliminary allocation plan for allocating orders to factories; S4: Construct the MILP model of the main problem and the CP model of the sub-problem, solve the CP model of the sub-problem based on the preliminary allocation plan of orders to factories, obtain the latest delivery time of each factory, add the latest delivery time of each factory to the MILP model of the main problem, and calculate the solution of DHPPFSP_SR_TCPC as the initial upper bound; S5: Construct the model MILP_LB3 based on the condition that the order only processes the third stage, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound based on the delivery time of other stages; S6: Determine the gap value between the initial upper bound and the initial lower bound. If the gap value is less than or equal to 0, output the initial upper bound as the optimal solution. Otherwise, execute S7. S7: With the goal of minimizing the order delivery time and the weighted sum of production and transportation costs, use the solver to solve the MILP model of the main problem, obtain the assignment scheme and lower bound for allocating orders to factories, and update the lower bound; S8: Update the sub-problem CP model to obtain SSP_CP, take the minimization of the latest delivery time of each factory as the goal, and use the solver to solve the sub-problem model SSP_CP based on the assignment scheme of orders to factories to obtain the minimization of the latest delivery time of each factory; S9: Compare the minimized latest delivery time of each factory to obtain the maximum value of the minimized latest delivery time, and calculate and update the upper bound based on the maximum value; S10: Determine the gap value between the updated upper and lower bounds. If the gap value is less than or equal to 0, output the upper bound value as the optimal solution. Otherwise, add a cut constraint to the main problem model MILP based on the updated upper bound value. Return to S7 for iterative solution based on the main problem model MILP after adding the cut constraint.
[0027] Example 2 In S1, the collected production data include the number of factories, the number of orders, the number of processes, the processing time and cost of each process of the order in different factories, the time and cost required for the order to be delivered from the factory to the order delivery location, and the number of production lines in each factory.
[0028] An order needs to go through six processes: mold assembly, steel bar embedding, concrete pouring, steam curing, mold removal, and defect repair. Steam curing is a parallel process, and multiple orders can be processed at the same time. The remaining processes are serial processes, and only one order can be processed at the same time. During the concrete pouring stage, multiple production lines in the same factory need to share a pouring machine. Because the delivery locations of orders may be different, the time and cost required to transport the orders from the factory are also different. The delivery cost of an order is the sum of the production cost and transportation cost of the order. The delivery time of an order is the completion time of the order plus the time required to transport the order. For the sake of ease of description, this problem is called the DHPPFSP_SR_TCPC problem.
[0029] The above problem needs to meet the following conditions: before the start of a certain planning cycle, J orders are received from customers, and these orders need to be assigned to the production lines of F factories for processing. Each factory has multiple production lines, and all production lines in each factory share a casting machine. Because the machines in different factories are different, the processing time and cost of the same process of the same order in different factories may not be the same. The same factory has multiple production lines, and the machines on each production line are the same. Therefore, the processing time for the same process of the same order on different production lines in the same factory is the same. Each order contains only one workpiece; the buffer between each machine is large enough; all orders and machines are available at the zero scheduling time; except for parallel processes, the production resources on the remaining processes can only process one order at the same time; all production lines in each factory share a casting machine; each order needs to be pre-assigned to a certain transport vehicle before production, and loaded and waited for transportation immediately after production is completed; the transfer time from the completion of processing to the corresponding delivery vehicle is negligible.
[0030] In S2, the scheduling problem is decomposed into the assignment problem of allocating orders to factories as the main problem (AMP) and the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines as the sub-problem (SSP).
[0031] In S3, the adaptive fruit fly algorithm is used to solve the DHPPFSP_SR_TCPC problem and obtain a preliminary allocation plan for allocating orders to factories.
[0032] The specific method of the adaptive fruit fly algorithm is as follows: S301: Encode all orders with real numbers; S302: randomly generating an order allocation scheme as a population center based on a real number coding method; S303: Taking the population center as the search starting point, multi-neighborhood collaborative search is performed based on the collected production data, and a population is generated according to the neighborhood selection probability; S304: Counting the number of solutions generated by each neighborhood structure that are better than the center of the current population according to the generated population; S305: updating the selection probability of each neighborhood in the next iteration according to the number of solutions generated by each neighborhood construction that are better than the current population center; S306: Determine whether the current population optimal solution is better than the population center. If so, replace the population center with the current population optimal solution; otherwise, keep the population center unchanged. S307: Determine whether the time limit has been reached, and if so, output the result; otherwise, return to step S303.
[0033] Specifically, the encoding method in S301 adopts an integrated encoding and decoding method based on the insertion 0 method. The orders assigned to different factories are separated by the 0 element, and the sequence represents the processing order of the third stage of the orders in the factory. For example, the solution {5,2,1,0,3,4} means that orders 5, 2, and 1 are assigned to the first factory, and orders 3 and 4 are assigned to the second factory. The third-stage processing order of the orders of the first factory is to process order 5 first, then order 2, and finally order 1. The difficulty of the DHPPFSP_SR_TCPC problem is that it is necessary to consider the allocation of orders to factories and the allocation of orders to production lines in the factory and the processing order of orders on the production lines at the same time. In order to reduce the search space for solutions, we use a "proxy objective function" to reduce the search space for solutions.
[0034] The calculation method is to calculate the sum of the processing time of the first two stages of the first order of the solution assigned to the factory and the sum of the processing time and transportation time of the last three stages of the last order, and finally add the sum of the processing time of the third stage of all orders of the factory.
[0035] This method can reduce the search space of solutions and improve the efficiency of solving. For example, the estimated completion time of the solution {5,2,1,0,3,4} in the first factory is: the sum of the processing time of order 5 in the first two stages plus the sum of the processing time and transportation time of order 1 in the last three stages plus the sum of the processing time of all orders assigned to factory one (order 5, order 2 and order 1) in the third stage. We use this method to replace the calculation of the true target value in the heuristic algorithm search, and after the heuristic algorithm runs, we use the solver to solve the CP model according to the distribution plan of the order in the factory to calculate the true initial upper bound and the distribution plan in the factory, and further optimize the scheduling plan for the third stage. (Please note that the processing time here refers to the time required to process the order, not the completion time of the order.) Specifically, in S303, the initial solution randomly generated in S302 is used as the search starting point in combination with the encoding and decoding characteristics of the problem, and four neighborhood action modes are used to perform neighborhood search: (1) Greedy exchange: Greedy exchange is the process of randomly selecting an element from the encoding sequence, exchanging it with the remaining non-zero elements, generating multiple neighborhood structures, and selecting the best neighborhood structure. Obviously, for an encoding sequence of length n and number of factories f, greedy exchange can be used to generate n-2-f neighborhood structures.
[0036] (2) Head-end insertion: Head-end insertion is to randomly select an element from the coding sequence and insert it before and after the first order of the third processing stage and before and after the last order of the third processing stage in all factories, and select the best neighborhood structure. For example, {1,2,3,0,4,5,7,8,9,6}, then the first order of the third processing stage in factory 1 is 1, and the last order of the third processing stage is 3. The first order of the third processing stage in factory 2 is 4, and the last order of the third processing stage is 6. Assuming that the randomly selected order is 2, seven individuals will be generated: {2,1,3,0,4,5,7,8,9,6},{1,2,3,0,4,5,7,8,9,6},{1,3,2,0,4,5,7,8,9,6},{1,3,0,2,4,5,7,8,9,6},{1,3,0,4,2,5,7,8,9,6},{1,3,0,4,5,7,8,9,2,6},{1,3,0,4,5,7,8,9,6,2}. Finally, the individual with the smallest proxy objective function value among these seven individuals is retained as the newly generated individual.
[0037] (3) Reversal: Reversal is the process of randomly selecting two positions from the encoding sequence and then reversing the order of the elements between the two positions. For example, {1,2,3,4,5,0,7,8,9,10}. Assume that 1 and 5 are randomly selected, then after reversal, it becomes {5,4,3,2,1,0,7,8,9,10}. (4) Destruction and reconstruction: The destruction and reconstruction process first removes three non-zero elements from the complete feasible solution to obtain a remaining sequence and a removed sequence. Then, the elements in the removed sequence are inserted one by one into the remaining sequence at the position where the surrogate objective function value is minimized to minimize the objective function value. For example, if 2, 6, and 7 are removed from {1, 2, 3, 0, 4, 5, 6, 7, 8}, the remaining sequence {1, 3, 0, 4, 5, 8} and the removed sequence {2, 6, 7} are obtained. Then insert 2 into all possible positions to get {2,1,3,0,4,5,8},{1,2,3,0,4,5,8},{1,3,2,0,4,5,8},{1,3,0,2,4,5,8},{1,3,0,4,2,5,8},{1,3,0,4,5,2,8},{1,3,0,4,5,8,2}. Select the individual with the smallest proxy objective function among these seven individuals as the new remaining sequence. Assuming that {2,1,3,0,4,5,8} has the smallest proxy objective value, the remaining sequence becomes {2,1,3,0,4,5,8}, and the sequence to be inserted becomes {6,7}. Repeat the above steps until the sequence to be inserted is empty.
[0038] Specifically, in S305, the calculation formula for updating the population neighborhood selection probability is: by Indicates The neighborhood structure is used in the iteration The probability of generating a population individual, Indicates Iterate through the neighborhood structure The number of neighborhood solutions that are better than the current population center solution is obtained, then , , and Respectively represent The probability of generating individuals in the population through greedy exchange, head and tail insertion, reversal and destruction reconstruction is selected in the iteration. , , and They represent the number of neighborhood solutions that are better than the population center solution through greedy exchange, head-tail insertion, reversal, and destructive reconstruction in the 𝑔th iteration. , , and are all set to 0.25. The minimum probability of being selected for each neighborhood action mode is set to 0.1. If no neighborhood solution better than the population center is produced in each neighborhood structure in this iteration, the next iteration will be , , and Reset to 0.25. The calculation formulas are shown in formula (1) and formula (2):
[0039] In S4, the constructed sub-problem CP model is as follows: Optimization goal:
[0040] Constraints:
[0041] Among them, formula (3) defines the objective function. Constraints (4)-(5) define interval variables. Constraint (6) ensures that all orders are assigned to the production line. Constraint (7) ensures that the next process of an order can only be started after the previous process is completed. Constraint (8) ensures that each machine can only process one order at a time except in the fourth stage (steam maintenance). Constraint (9) ensures that only one order can be processed at a time in the third stage. Constraints (10) and (11) ensure that each order can only be assigned to one production line for processing. Formula (12) ensures that the latest delivery time of factory f is equal to the latest delivery time of the orders processed in factory f.
[0042] After the above model is executed f times, we get the minimum latest delivery time for each factory: .
[0043] The MILP model of the main problem is constructed as follows: Optimization goal:
[0044] Constraints:
[0045] Among them, formula (13) is to define the objective function, formula (14) is to ensure that the latest delivery time of all orders is greater than or equal to the sum of the completion time and transportation time of each order, formula (15) and formula (16) ensure that the completion time of an order in a certain stage shall not be earlier than the sum of the start time and completion time of the order in that stage. Formula (17) is to ensure that all orders are assigned to the factory for processing, and formula (18) is to define the decision variables.
[0046] By using the solver to solve the CP model of the sub-problem, the latest delivery time of each factory is obtained, which is denoted as , where the maximum value is recorded as , the set of orders assigned to each factory is recorded as Then add equation (19) to the MILP model of the main problem (since there are f factories, it is still added f times), and calculate the initial upper bound through equation (20): .in, is the weight coefficient of the delivery cost, is the weight coefficient of order delivery time. is the index of the factory, is the index of the order. is a collection of factories, is a collection of orders. It is an order In the factory The cost required for production. It's a factory Shipping Orders The shipping cost to the corresponding customer. is a binary variable. When order j is assigned to factory f is 1, otherwise it is 0. The specific formula is as follows:
[0047] In S5, the method for calculating the initial lower bound is: Construct a MILP_LB3 model that only processes the third stage of the order. The optimization goal is to minimize the weighted sum of the order delivery time, order processing costs, and transportation costs (i.e., delivery costs) when only processing the third stage of the order. Calculate the solution of the MILP_LB3 model based on the production data of the third stage to obtain the target value ; Optimization goal:
[0048] Constraints:
[0049] Then find the minimum value of the sum of the first and second stage processing time of each factory, add the minimum value of the sum of the fourth, fifth and sixth stage processing time, and the time required to transport the order, and record it as ; Calculate the Each factory Compare and find the smallest , the smallest After multiplying by the weight coefficient Add together as the initial lower bound. Therefore, the initial lower bound The calculation method is to record the initial lower bound as : (27) After calculating the initial lower bound We can then add equation (28) to the MILP model of the main problem to improve the model’s ability to obtain lower bounds. is a 0-1 decision variable, factory Assign to order If yes, it is 1, otherwise it is 0;
[0050] In S6, the calculation formula for gap is:
[0051] In S7, the main problem AMP is solved using the main problem MILP model constructed in S4.
[0052] On this basis, by studying the nature of the problem, inequality (30) is proposed to enhance the MILP model of the main problem. However, because the inequality is nonlinear, it is linearized into equations (31)-(39) and then added to the model MILP. , , and They are all auxiliary variables. The specific formulas are as follows:
[0053]
[0054] In S8, after solving the main problem, the decision variables (determines which factory each order is assigned to) is fixed. For ease of presentation, we denote the decision variable fixed at the hth iteration as . Therefore, the minimum latest delivery time for each factory can be solved independently. After the subproblem is solved, the completion time of the factory with the longest processing time is returned as the upper bound. We first use the CP model to solve the subproblem. For ease of description, the model is named SSP_CP. Note that because the allocation plan of orders in the factory has been determined, the factory f is known when solving this model. Because there are f factories, the model needs to be run f times for each iteration.
[0055] The model SSP_CP is shown below: Optimization goal:
[0056] Constraints:
[0057] Formula (40) defines the objective function. Constraints (41)-(42) define interval variables. Constraint (43) ensures that all orders are assigned to the production line. Constraint (44) ensures that the next process can only be started after the previous process is completed. Constraint (45) ensures that each machine can only process one order at a time except in the fourth stage (steam maintenance). Constraint (46) ensures that only one order can be processed at a time in the third stage. Constraints (47) and (48) ensure that each order can only be assigned to one production line for processing. Formula (49) ensures that the latest delivery time of factory f is equal to the latest delivery time of the orders processed in factory f.
[0058] After the above model is executed f times, we get the minimum latest delivery time for each factory in the hth iteration: . In S9, the upper bound can be calculated by equation (50). For ease of presentation, we will use the f factories obtained in S8 as The maximum value in is recorded as :
[0059] In S10, the cut constraint is added to the main problem model MILP based on the updated upper bound value: At iteration h, the master problem (AMP) is solved to generate the set of assignments And after solving the subproblem, the delivery time of the order is returned The purpose of introducing the cut constraint is to ensure that in subsequent iterations, when other orders are assigned to factory f, Provide a specific lower bound. The specific form of the cut constraint is shown in formula (51):
[0060] Proof of the validity of the cut constraint: Representative Assigned to the factory in iterations A collection of orders. Representative in the Assigned to the factory in iterations The order collection of The iteration occurs at After iterations. On behalf of factory f The latest delivery time of an order in iteration. On behalf of factory f The latest delivery time in the iteration. Assigned to the factory in iterations Order collection .
[0061] Case 1: When hour, and are completely equal. In the In the iteration, cut is equivalent to , so the cut is valid.
[0062] Case 2: When This means and Not exactly equal, .therefore , .because , so cut will not remove any feasible solutions in this case.
[0063] In summary, the cut constraint is valid.
[0064] The meanings of the symbols in the model in this article are shown in the following table: Table 1
[0065] Table 2
[0066] Example 3 For the sake of comparison, the MILP model and CP model of the DHPPFSP_SR_TCPC problem are given below: For the sake of convenience, the MILP model of the DHPPFSP_SR_TCPC problem is recorded as TCPC_MILP, as shown below: Optimization goal:
[0067] Constraints:
[0068] For the sake of convenience, we record the CP model of the DHPPFSP_SR_TCPC problem as TCPC_CP, as shown below: Optimization goal:
[0069] Constraints:
[0070] In order to facilitate the solution of the constraint programming model, we expand the production data of a prefabricated component factory in Xi'an by ten times and use it as a basis to generate data in hours. The cost and time required for transportation and generation are generated based on the paper Chen J, Ma W, Ye X, et al. Logic-based Benders decomposition for order acceptance and scheduling in distributed manufacturing[J]. Advanced Engineering Informatics, 2023, 58: 102228.
[0071] The processing time of the order in the first, second, third and fifth stages is generated from the uniform distribution [10,30]; the processing time of the order in the sixth stage is generated from the uniform distribution [5,10]; and the processing time of the order in the fourth stage is fixed to 80. We generate two sets of instances in total. The production cost is generated from the uniform distribution [10,30], the distance between the factory and the order delivery location is calculated using the Euclidean distance, and the coordinates are generated from the uniform distribution [5,10]. Assume that the distance is generated using represents the distance from the order delivery location when order j is assigned to factory f. Then the transportation cost Assume that the transport speed is 1, that is, the transport time is .
[0072] For small-scale instances, the number of orders is set to J={15,20,25}, the number of factories is F={2,3}, the number of production lines in the factory is randomly set to 2 or 3, and five groups of instances of each size are generated, totaling 3×2×5=30 instances.
[0073] For medium-sized or large-scale instances, the number of orders is set to J={30,50,80,100}, the number of factories F={2,3,5}, the number of production lines in the factory is randomly set to 2 or 3, and five groups of instances of each size are generated, totaling 4×3×5=120 instances.
[0074] Therefore, we tested a total of 120+30=150 instances. The computational time limit for all instances was 1800 seconds. The adaptive fruit fly to obtain the initial upper bound in the small regular instance ran for 200 seconds, the main problem time limit was 200 seconds, and the subproblem time limit was 100 seconds. The main problem MILP and the subproblem SSP_CP were allowed to run for a maximum of 300 seconds in one iteration. The computer configuration was Microsoft Windows 10, the processor was 2.30 GHz Intel Core i5-8300H, and the memory was 16G. All models and algorithms were written in Julia 1.8.5 and solved in combination with Gurobi 10.0.2 and IBM ILOG CPLEX12.10 (including CPLEX and CP Optimizer). Among them, all mixed integer linear programming models are solved by calling Gurobi on the VS Code 1.92.2 platform, and the constraint programming models are solved by calling CP Optimizer through the PyCall package on the VS Code 1.92.2 platform.
[0075] At the same time, because MILP, CP, LBBD, and ELBBD are all exact algorithms, it is not meaningful to repeatedly calculate the same example. Therefore, in order to reduce the error, we run five different examples for each scale problem and then take the average.
[0076] In order to measure the quality of the solution, gap is used as an indicator for comparison. The smaller the gap, the closer the scheduling solution is to the optimal scheduling solution. In order to measure the quality of the upper and lower bounds obtained by the method, ARPD is used as an indicator. The smaller the ARPD, the better the upper or lower bound obtained.
[0077] The relative percentage deviation (RPD) is calculated as follows:
[0078] in represents the best lower bound obtained by four methods, The lower bounds obtained by the four methods are shown in Table 1. The average relative percentage deviation of the lower bounds is The calculation formula is as follows:
[0079] in represents the best upper bound obtained by four methods, The upper bounds obtained by the four methods are shown in Table 1. The average relative percentage deviation of the upper bounds is The calculation formula is as follows:
[0080] Weight and weight It can be adjusted according to customer preferences. In the experiment of this paper, we set the weights according to the method of setting weights in Li Y, Côté JF, Coelho LC, et al. Order assignment and scheduling under processing and distribution time uncertainty [J]. European Journal of Operational Research, 2023, 305 (1): 148-163. First, set , , the TCPC_MILP model is solved using a commercial solver, and the objective function value is recorded as .set up , , the TCPC_CP model is solved using a commercial solver, and the average value of the objective function is recorded as Then use equations (77) and (78) to determine each case and The maximum calculation time allowed for each model solution using the solver is set to 1800 seconds:
[0081] We used 18 examples to determine the parameters. The maximum number of orders was 100 and the minimum was 20. The maximum number of factories in each example was 5 and the minimum was 2. Finally, in this experiment, The value of is 0.18, The value of is 0.82.
[0082] The experimental results are as follows: Table 3
[0083] Table 4
[0084] Table 5
[0085] Table 6
[0086] Table 7
[0087] Table 8
[0088] Table 9
[0089] Example 4 A flow shop scheduling optimization system considering order delivery time, comprising: The acquisition module is used to collect production data and record the shop scheduling problem that takes into account the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; A classification module is used to divide the workshop scheduling problem into a main problem and a sub-problem, the main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines; The adaptive solution module is used to solve DHPPFSP_SR_TCPC by using the adaptive fruit fly algorithm to obtain a preliminary allocation plan for allocating orders to factories; The initial upper bound calculation module is used to construct the MILP model of the main problem and the CP model of the sub-problem. The CP model of the sub-problem is solved based on the preliminary allocation plan of orders to factories to obtain the latest delivery time of each factory. The latest delivery time of each factory is added to the MILP model of the main problem, and the solution of DHPPFSP_SR_TCPC is calculated as the initial upper bound. The initial lower bound calculation module is used to construct the model MILP_LB3 based on the condition that the order only processes the third stage process, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound in combination with the delivery time of other stages; A first judgment module is used to judge the gap value between the initial upper bound and the initial lower bound. If the gap value is less than or equal to 0, the initial upper bound is output as the optimal solution. Otherwise, S7 is executed. The lower bound updating module is used to solve the MILP model of the main problem using a solver with the goal of minimizing the weighted sum of order delivery time and production and transportation costs, obtain the assignment scheme and lower bound for allocating orders to factories, and update the lower bound; The sub-problem iterative solution module is used to update the sub-problem CP model to obtain SSP_CP. With the goal of minimizing the latest delivery time of each factory, based on the assignment scheme of orders to factories, the sub-problem model SSP_CP is solved by the solver to obtain the minimized latest delivery time of each factory. An upper bound updating module, used for comparing the minimized latest delivery time of each factory, obtaining the maximum value of the minimized latest delivery time, and calculating and updating the upper bound based on the maximum value; The second judgment module is used to judge the gap value between the updated upper bound and the lower bound. If the gap value is less than or equal to 0, the upper bound value is output as the optimal solution. Otherwise, a cut constraint is added to the main problem model MILP based on the updated upper bound value, and the main problem model MILP after the cut constraint is added is returned to S7 for iterative solution.
[0090] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A flow shop scheduling optimization method considering order delivery time, characterized in that: The steps include: S1: Collect production data and record the shop scheduling problem that takes into account the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; S2: Divide the workshop scheduling problem into a main problem and a sub-problem. The main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines. S3: Solve DHPPFSP_SR_TCPC by using the adaptive fruit fly algorithm to obtain a preliminary allocation plan for allocating orders to factories; S4: Construct the MILP model of the main problem and the CP model of the sub-problem, solve the CP model of the sub-problem based on the preliminary allocation plan of orders to factories, obtain the latest delivery time of each factory, add the latest delivery time of each factory to the MILP model of the main problem, and calculate the solution of DHPPFSP_SR_TCPC as the initial upper bound; S5: Construct the model MILP_LB3 based on the condition that the order only processes the third stage, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound based on the delivery time of other stages; S6: Determine the gap value between the initial upper bound and the initial lower bound. If the gap value is less than or equal to 0, output the initial upper bound as the optimal solution. Otherwise, execute S7. S7: With the goal of minimizing the order delivery time and the weighted sum of production and transportation costs, use the solver to solve the MILP model of the main problem, obtain the assignment scheme and lower bound for allocating orders to factories, and update the lower bound; S8: Update the CP model of the subproblem to obtain SSP_CP, take the minimization of the latest delivery time of each factory as the goal, and use the solver to solve the subproblem model SSP_CP based on the assignment scheme of orders to factories to obtain the minimization of the latest delivery time of each factory; S9: Compare the minimized latest delivery time of each factory to obtain the maximum value of the minimized latest delivery time, and calculate and update the upper bound based on the maximum value; S10: Determine the gap value between the updated upper bound and the lower bound. If the gap value is less than or equal to 0, output the upper bound value as the optimal solution. Otherwise, add a cut constraint to the main problem model MILP based on the updated upper bound value. Return to S7 for iterative solution based on the main problem model MILP after adding the cut constraint. The delivery time is the sum of the production time and the transportation time, and the delivery cost is the sum of the production cost and the transportation cost.
2. The method for optimizing flow shop scheduling considering order delivery time according to claim 1, characterized in that: The production data collected in S1 include: the number of factories, the number of orders, the number of processes, the processing time and cost of each process of the order in different factories, the time and cost required for the order to be delivered from the factory to the order delivery location, and the number of production lines in each factory; the order needs to go through six processes: mold assembly, pre-embedded steel bars, concrete pouring, steam curing, mold removal, and defect repair.
3. The method for optimizing flow shop scheduling considering order delivery time according to claim 1 is characterized in that: In S3, the specific method of solving DHPPFSP_SR_TCPC by the adaptive fruit fly algorithm to obtain the preliminary allocation plan of orders to factories is as follows: S301: Encode all orders with real numbers; S302: randomly generating an order allocation scheme as a population center based on a real number coding method; S303: Taking the population center as the search starting point, multi-neighborhood collaborative search is performed based on the collected production data, and a population is generated according to the neighborhood selection probability; S304: Counting the number of solutions generated by each neighborhood structure that are better than the center of the current population according to the generated population; S305: updating the selection probability of each neighborhood in the next iteration according to the number of solutions generated by each neighborhood construction that are better than the current population center; S306: Determine whether the current population optimal solution is better than the population center. If so, replace the population center with the current population optimal solution; otherwise, keep the population center unchanged. S307: Determine whether the time limit has been reached, and if so, output the result; otherwise, return to step S303.
4. The method for optimizing flow shop scheduling considering order delivery time according to claim 3 is characterized in that: In the step of encoding all orders by real numbers, the real number encoding is performed by using an integrated encoding and decoding method of the insertion 0 method.
5. The method for optimizing flow shop scheduling considering order delivery time according to claim 1, characterized in that: In S4, the latest delivery time of each factory is added to the MILP model of the main problem through formula (19), and the initial upper bound of DHPPFSP_SR_TCPC is calculated through formula (20). The specific formula is as follows: in, is the latest delivery time for each factory, and the maximum value is recorded as , is the set of orders assigned to each factory, is a binary variable. When order j is assigned to factory f is 1, otherwise it is 0; is the weight coefficient of the delivery cost, is the weight coefficient of order delivery time, is the index of the factory, is the index of the order, is a collection of factories, is a collection of orders, It is an order In the factory The cost of production, It's a factory Shipping Orders The shipping cost to the corresponding customer.
6. The method for optimizing flow shop scheduling considering order delivery time according to claim 5, characterized in that: In S5, the formula for calculating the initial lower bound is as follows: (27) Adding formula (28) to the MILP model of the main problem is used to improve the model's ability to obtain the initial lower bound. The specific formula is as follows: in, Indicates factory Order In the The processing time of each process; For the factory Shipping Orders The shipping time to the corresponding customer, is the weighted sum of the delivery time and delivery cost of the order in the third stage, It is the maximum value of the sum of order completion time and transportation time.
7. The method for optimizing flow shop scheduling considering order delivery time according to claim 5, characterized in that: The optimization goal of the updated sub-problem SSP_CP in S8 is: in, represents the latest delivery time of each factory in the hth iteration.
8. The method for optimizing flow shop scheduling considering order delivery time according to claim 7, characterized in that: In S9, the updated upper bound is: in, The maximum value of the minimum latest delivery time of f factories is recorded as .
9. The method for optimizing flow shop scheduling considering order delivery time according to claim 8, characterized in that: The cut constraint added in S10 is: in, represents the minimum latest delivery time of each factory in the hth iteration, is the decision variable.
10. A flow shop scheduling optimization system considering order delivery time, characterized in that: include: The acquisition module is used to collect production data and record the shop scheduling problem that takes into account the minimum weighted sum of order delivery time and delivery cost as DHPPFSP_SR_TCPC; A classification module is used to divide the workshop scheduling problem into a main problem and a sub-problem, the main problem is the assignment problem of orders to factories, and the sub-problem is the scheduling problem of allocating orders within the factory to specific production lines and determining the production sequence on the production lines; The adaptive solution module is used to solve DHPPFSP_SR_TCPC by using the adaptive fruit fly algorithm to obtain a preliminary allocation plan for allocating orders to factories; The initial upper bound calculation module is used to construct the MILP model of the main problem and the CP model of the sub-problem. The CP model of the sub-problem is solved based on the preliminary allocation plan of orders to factories to obtain the latest delivery time of each factory. The latest delivery time of each factory is added to the MILP model of the main problem, and the solution of DHPPFSP_SR_TCPC is calculated as the initial upper bound. The initial lower bound calculation module is used to construct the model MILP_LB3 based on the condition that the order only processes the third stage process, solve the model MILP_LB3 based on the production data of the third stage, and calculate the initial lower bound in combination with the delivery time of other stages; A first judgment module is used to judge the gap value between the initial upper bound and the initial lower bound. If the gap value is less than or equal to 0, the initial upper bound is output as the optimal solution. Otherwise, S7 is executed. The lower bound updating module is used to solve the MILP model of the main problem using a solver with the goal of minimizing the weighted sum of order delivery time and production and transportation costs, obtain the assignment scheme and lower bound for allocating orders to factories, and update the lower bound; The sub-problem iterative solution module is used to update the sub-problem CP model to obtain SSP_CP. With the goal of minimizing the latest delivery time of each factory, based on the assignment scheme of orders to factories, the sub-problem model SSP_CP is solved by the solver to obtain the minimized latest delivery time of each factory. An upper bound updating module, used for comparing the minimized latest delivery time of each factory, obtaining the maximum value of the minimized latest delivery time, and calculating and updating the upper bound based on the maximum value; The second judgment module is used to judge the gap value between the updated upper bound and the lower bound. If the gap value is less than or equal to 0, the upper bound value is output as the optimal solution. Otherwise, a cut constraint is added to the main problem model MILP based on the updated upper bound value, and the main problem model MILP after the cut constraint is added is returned to S7 for iterative solution.