A dynamic programming method to minimize the processing resource cost of a given process
By establishing a solution graph model through dynamic programming method, the minimum processing cost in the part processing process is quickly solved, which solves the problem of large-scale part process sequencing and provides an efficient resource allocation solution.
Patent Information
- Application Number
- CN202210997718.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Existing technologies make it difficult to efficiently solve the problem of sequencing large-scale parts processing processes in a short period of time. In particular, it is difficult to accurately determine the process sequence and resource allocation, resulting in a huge solution space and difficulty in obtaining high-quality solutions.
The dynamic programming method is used to quickly solve the minimum processing cost in the part processing process by establishing a solution graph model and calculating edge weights combined with a recursive formula.
It can quickly and accurately solve the minimum processing cost of a given process, reduce time complexity, and provide high-quality part processing solutions.
Smart Images

Figure CN115456356B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resource selection in parts processing technology, and in particular to a dynamic programming method for minimizing the processing resource cost of a given process. Background Art
[0002] Computer-aided process planning (CAD) is an important link between CAD and CAD manufacturing. It can reduce the processing time of parts during the production process and improve the processing quality of parts, and is therefore widely used in the machinery industry. The main contents of CAD process planning include machining feature recognition, machining operation type selection, manufacturing resource selection, and process sequencing. Among them, process sequencing is particularly important. Process sequencing is to determine the processing sequence required to produce parts, and at the same time, determine the resources used in each step, including machine tools and tool information, in order to minimize the use and conversion costs of machine tools and tools during the processing. A good process processing sequence and resource selection strategy can reduce the cost or time of the production process, thereby improving the efficiency of the production system.
[0003] Current research on process sequencing problems focuses on solving them using various heuristic algorithms. Because process sequencing is considered an NP-hard combinatorial optimization problem, its complexity increases rapidly with the number of processes and priority constraints. This makes it difficult to accurately solve large-scale problems in a short period of time. Consequently, many researchers have turned to heuristic algorithms. However, since solving process sequencing is a combinatorial optimization problem, it requires determining both the order of processes and the resources used for each step. Many researchers, when using heuristic algorithms, encode the process order and its corresponding resources together. This results in an extremely large solution space, making it difficult to obtain a high-quality solution. Summary of the Invention
[0004] The purpose of the present invention is to address the problems existing in the background technology and propose a dynamic programming method for minimizing the processing resource cost of a given process.
[0005] The technical solution of the present invention is a dynamic programming method for minimizing the processing resource cost of a given process, comprising the following specific steps:
[0006] S1. Obtain the available machines for each step according to the resource allocation table of a given step, including tools and tool angles;
[0007] S2. Establish a graphical model to solve the minimum cost of a given process; for a problem with n steps, each step has p types of machine tools, q types of tools, and w types of tool angles
[0008] S21. List all possible resource combinations for each process step, and each possible resource combination serves as an intermediate node under this process step;
[0009] S22. Add a virtual start node before Process 1 and connect it to the intermediate nodes of the first layer. Add a virtual end node after Process n and connect it to the intermediate nodes of the nth layer;
[0010] S23. Connect all nodes of adjacent layers from the start node to the end node;
[0011] S231. For the i-th process step, initialize the intermediate nodes according to all possible resource selections; the intermediate nodes are based on the combinations of available machine tools, cutting tools, and cutting tool angles for each process step; initialize i as 1;
[0012] S232. Connect the intermediate nodes of the i-th layer and the (i + 1)-th layer, and calculate the weight of each edge;
[0013] S233. Let i = i + 1. If i < n, return to 2.2 and continue to execute.
[0014] S3. Calculate the weight of the connecting edges;
[0015] S4. Use dynamic programming to solve the minimum processing cost of a given process step in the part processing process.
[0016] Preferably, the detailed steps for connecting all nodes in S23 are as follows:
[0017] Preferably, the specific steps for calculating the weight of the edges in S3 are as follows:
[0018] In the process sequencing problem of part processing, the processing cost includes five parts: machine tool usage cost, cutting tool usage cost, machine tool exchange cost, cutting tool exchange cost, and installation cost; and the following parameter descriptions are given:
[0019] N Number of process steps
[0020] M Number of available machine tool types
[0021] T Number of available cutting tool types
[0022] op[i] The i-th process step, i = 1, 2,..., N
[0023] op[i].MID The available machine tool number of the i-th process step
[0024] op[i].TID The available cutting tool number of the i-th process step
[0025] op[i].AID The available cutting tool angle number of the i-th process step
[0026] CM[m] is the cost of machine tool numbered m, where m = 1, 2…, M
[0027] CT[t] is the cost of tool numbered t, t=1,2…,T
[0028] CS installation cost
[0029] CMC machine tool replacement costs
[0030] CTC tool exchange cost
[0031] The following formula is also used to calculate various expenses:
[0032]
[0033] (1) Total machine cost (TMC): the total machine cost during the entire machining process
[0034]
[0035] (2) Total tool cost (TTC): the total tool cost during the entire machining process
[0036]
[0037] (3) Total machine tool exchange cost (TMCC): The cost incurred by machine tool exchange during the entire machining process. Here, the cost of each exchange is considered fixed. Therefore, the total machine tool exchange cost is the product of the machine tool exchange cost CMC and the number of machine tool exchanges NMC.
[0038]
[0039] TMCC=NMC×CMC
[0040] (4) Total tool exchange cost (TTCC): The cost incurred by tool exchange during the entire machining process. Here, the cost of each exchange is considered fixed. Therefore, the total tool exchange cost is the product of the tool exchange cost CTC and the number of tool exchanges NTC.
[0041]
[0042] TTCC=NTC×CTC
[0043] (5) Total setup cost (TSC): The cost of installing and setting up the machine tool and cutting tools during the entire machining process. Here, the cost of each installation is considered fixed. Therefore, the total setup cost is the product of the setup cost CS and the number of installations NS.
[0044]
[0045] TSC=NS×CS
[0046] Taking the above costs into consideration, the total cost of the parts processing process can be calculated as:
[0047] TC=ω1TMC+ω2TTC+ω3TMCC+ω4TSC+ω5TTCC
[0048] Among them, ω1~ω5 are the weight coefficients of the corresponding costs, all of which are 1;
[0049] Each edge in the solution graph model connects two endpoints. The left endpoint is the resource combination selected in the previous step, and the right endpoint is the resource combination selected in the next step. The weight of each edge is the machine tool cost and tool cost of the right endpoint, and the exchange cost and installation cost of the machine tool and tool obtained by comparing the left and right endpoints, as shown in the following formula:
[0050] edge=CM[op[right].MID]+CT[op[right].TID]+
[0051] CMC×φ1(op[right].MID,op[left].MID)+
[0052] CTC×φ2{φ1(op[right].MID,op[left].MID),φ1(op[right].TID,op[left].TID)}+
[0053] CS×φ2{φ1(op[right].MID,op[left].MID),φ1(op[right].AID,op[left].AID)};
[0054] Get the calculation results.
[0055] Preferably, the detailed steps of the dynamic programming method in S4 are:
[0056] Calculate using the recursive formula:
[0057] Cost[i+1]=Cost[i]+min{edge[i,i+1]}
[0058] Where Cost[i] represents the minimum cost of the i-th layer, and edge[i,i+1] represents all connected edges in the i-th layer and the i+1-th layer;
[0059] The minimum cost of the i+1th layer is the sum of the minimum cost of the ith layer and the weight of the smallest edge connecting the ith layer and the i+1th layer;
[0060] Remember Cost[0]=0, the detailed steps are as follows, where K i Represents the number of nodes in the i-th layer:
[0061] 4.1 Execute 4.2 for each node in the i-th layer (i = 0, 1, ..., n) of the graph model;
[0062] 4.2 For the jth (j=0,1,…,K i ) node and the kth node (k=0,1,…,K i+1 ) Node executes 4.3;
[0063] 4.3min{edge[i,i+1]}=min{edge[j,k]};
[0064] 4.4 Recursively calculate the minimum cost of the i+1th layer based on the node information of the ith layer, and store the selected nodes:
[0065] Cost[i+1]=Cost[i]+min{edge[i,i+1]}
[0066] 4.5 When i=n, the derivation is completed, and the result Cost[n+1] is the minimum processing cost of the given process.
[0067] Compared with the prior art, the present invention has the following beneficial technical effects:
[0068] 1. The present invention adopts a solution graph model to solve the minimum processing cost and resource allocation of a given process, visualizes the resource selection of parts processing, and facilitates the subsequent calculation process.
[0069] 2. The dynamic programming method proposed in this invention can accurately and quickly solve the minimum processing cost of a given process. The time complexity of its mapping process and solution process is O(nK 2 ) (where n represents the number of given processes), a high-quality parts processing solution can be obtained in a very short time. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a flowchart for solving the problem in the present invention;
[0071] Figure 2 Schematic diagram of the solution graph model constructed in the present invention;
[0072] Figure 3 This is a schematic diagram of the ANC-101 part, an example of verification of the present invention;
[0073] Figure 4 This is the processing priority constraint diagram of the example part ANC-101 used to verify the present invention. DETAILED DESCRIPTION
[0074] The principles and features of the present invention are further described in detail below with reference to the accompanying drawings. The examples given are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0075] 1. Determine the description and assumptions related to the part processing problem
[0076] There are related constraints on multiple processing features of part processing, and these constraints must be met when determining the processing sequence; it is assumed that the total cost of the part processing process includes only five parts: machine tool usage cost, tool usage cost, machine tool exchange cost, tool exchange cost and installation cost; it is assumed that the cost of each machine tool exchange during the processing is equal; it is assumed that the cost of each tool exchange during the processing is equal; it is assumed that the cost of each installation during the processing is equal.
[0077] 2. Dynamic programming method to solve the problem of minimum processing cost for a given process in the part processing process
[0078] A solution graph model is established for a given part processing procedure; then, the weight value of each edge in the graph model is calculated; finally, the dynamic programming method is used to solve the minimum processing cost.
[0079] Example 1
[0080] The experimental analysis is carried out based on the actual processing data of the part ANC-101.
[0081] This part contains 14 machining features and 20 machining steps. The optional machine tools, tools and tool angles for each step are shown in Table 1. The corresponding machine tool costs, tool costs and machine tool replacement costs, tool replacement costs and installation costs are shown in Table 2. The three-dimensional diagram of the part is shown in Figure 3 , precedence constraint diagram see Figure 4 .
[0082] Given a process that satisfies the precedence constraint,
[0083] For example, in the sequence 1-3-5-18-2-11-6-12-13-17-7-8-9-19-14-10-20-15-4-16, the machine tools, cutting tools, and tool angles selected for each process step are shown in Table 3. The minimum processing cost is 2530, which is consistent with the optimal solution obtained by current researchers, proving the correctness of this method. The same process sequence is solved using the greedy algorithm, selecting the resource configuration that minimizes the current cost at each step. The comparison results are shown in Table 4. As can be seen, this method outperforms the greedy algorithm in both results and efficiency.
[0084] This method was embedded in a genetic algorithm to solve a process planning problem for parts machining (indefinite sequence) and compared with a greedy algorithm embedded in a genetic algorithm to solve the same problem. The genetic algorithm parameters used specified a population size of 100, 200 iterations, a crossover method using randomly selected segments and performing crossover according to priority constraints, and a mutation method using randomly selected segments and recombining them according to priority constraints. The comparison was conducted 10 times independently, and the results are shown in Table 5. As shown in Table 5, the hit rate of this method is higher than that of the greedy algorithm, resulting in better results, but the solution time is relatively longer.
[0085] Table 1 Part characteristics and process description
[0086] feature Process Optional tool angle Optional machine tools Optional tools F1 Op1 +z M2,M3 C6,C7,C8 F2 Op2 -z M2,M3 C6,C7,C8 F3 Op3 +x M2,M3 C6,C7,C8 F4 Op4 +z,-z M1,M2,M3 C2 F5 Op5 +x,-z M2,M3 C6,C7 F6 Op6 +y,-z M2,M3 C7,C8 F7 Op7 -a M2,M3 C7,C8 F8 Op8 -a M1,M2,M3 C2,C3,C4 Op9 -a M1,M2,M3 C9 Op10 -a M3,M4 C10 F9 Op11 -y,-z M2,M3 C7,C8 F10 Op12 -z M1,M2,M3 C2,C3,C4 Op13 -z M1,M2,M3 C9 Op14 -z M3,M4 C10 F11 Op15 -z M1,M2,M3 C1 Op16 -z M1,M2,M3 C5 F12 Op17 -x M2,M3 C7,C8 F13 Op18 -x,-z M2,M3 C6,C7 F14 Op19 +z M1,M2,M3 C9 Op20 +z M3,M4 C10
[0087] Table 2 Parts machine tools and tool costs
[0088]
[0089] Table 3 Parts specific implementation resources table
[0090]
[0091] Table 4 Comparison results of different methods for solving given sequences
[0092] method Optimal spending Calculation time (ms) This method 2530 0.32 Greedy Algorithm 2630 0.41
[0093] Table 5 Comparison results of different methods embedded in genetic algorithm to solve process planning problem (indefinite sequence)
[0094] method Optimal spending Average cost Hit rate Average solution time (ms) This method 2530 2530 100% 0.754 Greedy Algorithm 2530 2538.5 60% 0.079
[0095] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A dynamic programming method for minimizing the processing resource cost of a given process, characterized in that: It includes the following specific steps: S1. Obtain the machines available for each process according to the resource allocation table of the given process; S2. Establish a graph model for solving the minimum cost of the given process; S21. List all possible resource combinations for each process, and each possible resource combination is used as an intermediate node under this process; S22. Add a virtual start node at the very front of all processes; add a virtual end node at the very end of all processes; S23. Connect all nodes in adjacent layers from the start node to the end node; The detailed steps for connecting all nodes in S23 are as follows: For the problem of having n processes, p types of machine tools, q types of cutting tools, and w types of tool angles in each process S231. For the i-th process, initialize the intermediate nodes according to all possible resource selections; the intermediate nodes are based on the combinations of machine tools, cutting tools, and tool angles available for each process; initialize i as 1; S232. Connect the intermediate nodes in the i-th layer and the (i + 1)-th layer, and calculate the weight of each edge; S233. Let i = i + 1. If i < n, return to 2.2 and continue to execute; S3. Calculate the weight of the connecting edges; S4. Use dynamic programming to solve the minimum processing cost of the given process in the part processing process; The detailed steps of the dynamic programming method in S4 are as follows: Use the recurrence formula for calculation: Cost[i + 1] = Cost[i] + min{edge[i, i + 1]} where Cost[i] represents the minimum cost of the i-th layer, and edge[i, i + 1] represents all the connecting edges between the i-th layer and the (i + 1)-th layer; The minimum cost of the (i + 1)-th layer is the sum of the minimum cost of the i-th layer and the weight of the minimum edge connecting the i-th layer and the (i + 1)-th layer; Remember Cost[0]=0, the detailed steps are as follows, where K i Represents the number of nodes in the i-th layer: 4.1 Execute 4.2 for each node in the i-th layer (i = 0, 1,..., n) in the graph model; 4.2 For the jth (j=0,1,…,K i ) node and the kth node (k=0,1,…,K i+1 ) Node executes 4.3; 4.3 min{edge[i, i + 1]} = min{edge[j, k]}; 4.4 Recursively calculate the minimum cost of the (i + 1)-th layer based on the node information of the i-th layer, and store the selected nodes: Cost[i + 1] = Cost[i] + min{edge[i, i + 1]} 4.5 When i = n, the derivation is completed, and the obtained result Cost[n + 1] is the minimum processing cost of the given process sought.
2. A dynamic programming method for minimizing the processing resource cost of a given process according to claim 1, characterized in that: The specific steps for calculating the weight of the edges in S3 are as follows: In the problem of process sequencing in part processing, the processing cost includes five parts: machine tool usage cost, cutting tool usage cost, machine tool exchange cost, cutting tool exchange cost, and installation cost; And the following parameter explanations are given: N Number of processes M Types of available machine tools T Types of available cutting tools op[i] The i-th process, i = 1, 2,..., N op[i].MID The available machine tool number of the i-th process op[i].TID The available cutting tool number of the i-th process op[i].AID The available tool angle number of the i-th process CM[m] The cost of the machine tool numbered m, m = 1, 2,..., M CT[t] The cost of the cutting tool numbered t, t = 1, 2,..., T CS Installation cost CMC Machine tool exchange cost CTC Cutting tool exchange cost (1) Total machine tool cost TMC: All machine tool costs during the entire processing process (2) Total tool cost TTC: the total tool cost during the entire machining process (3) Total machine tool exchange cost TMCC: The cost incurred by machine tool exchange during the entire machining process. The cost of each exchange is fixed. The total machine tool exchange cost is the product of the machine tool exchange cost CMC and the number of machine tool exchanges NMC. TMCC=NMC×CMC (4) Total tool exchange cost TTCC: The cost incurred by tool exchange during the entire machining process. The cost of each exchange is fixed. The total tool exchange cost is the product of the tool exchange cost CTC and the number of tool exchanges NTC. TTCC=NTC×CTC (5) Total setup cost TSC: The cost of installing and setting up the machine tool and cutting tools during the entire machining process. The cost of each installation is fixed. The total setup cost is the product of the setup cost CS and the number of installations NS. TSC=NS×CS Taking the above costs into consideration, the total cost of the parts processing process can be calculated as: TC=ω1TMC+ω2TTC+ω3TMCC+ω4TSC+ω5TTCC Among them, ω1~ω5 are the weight coefficients of the corresponding costs, all of which are 1; Each edge in the solution graph model connects two endpoints. The left endpoint is the resource combination selected in the previous step, and the right endpoint is the resource combination selected in the next step. The weight of each edge is the machine tool cost and tool cost of the right endpoint, and the exchange cost and installation cost of the machine tool and tool obtained by comparing the left and right endpoints, as shown in the following formula: edge=CM[op[right].MID]+CT[op[right].TID]+ CMC×φ1(op[right].MID,op[left].MID)+ CTC×φ2{φ1(op[right].MID,op[left].MID),φ1(op[right].TID,op[left].TID)}+ CS×φ2{φ1(op[right].MID,op[left].MID),φ1(op[right].AID,op[left].AID)}; Get the calculation results.