Method, device and storage medium for managing product dosing

By breaking down the ingredient mixing problem into two steps and using an exact algorithm to solve it, the problem of low efficiency in solving the ingredient mixing problem in the existing technology is solved, and efficient ingredient mixing scheme optimization is achieved.

CN115409247BActive Publication Date: 2026-02-10ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210980962.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2026-02-10
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

Existing technologies are inefficient and time-consuming when dealing with large-scale product batching problems, making it difficult to optimize batching schemes.

Method used

The ingredient mixing problem is solved in two steps. First, the required amount of each raw material in multiple product requirements is determined by the first optimization model. Then, the ingredient mixing scheme for each product requirement is refined by the second optimization model, and the exact algorithm is used to solve the problem.

Benefits of technology

This improved the output efficiency of the ingredient mixing scheme, shortened the optimization time, and ensured the acquisition of the optimal solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409247B_ABST
    Figure CN115409247B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of for product batching management method, equipment and storage medium. Among them, method includes as follows: obtaining multiple product demands;The product demand includes product demand amount in it;According to the multiple product demands, utilize first optimization model, determine the multiple raw materials required by each product demand in the multiple product demands and the demand amount of each raw material;The first objective function of the first optimization model is related to total raw material cost minimization;The multiple product demands include first product demand;According to the multiple raw materials required by the first product demand and the demand amount of each raw material, utilize second optimization model, determine the batching scheme corresponding to each respectively for completing the first product demand multiple batching;The second objective function of the second optimization model is related to batching times minimization. The optimization scheme provided by the embodiments of the present application can improve the output efficiency of batching scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and storage medium for managing product ingredients. Background Technology

[0002] Resource combination and matching is one of the most common problems in industries such as metal smelting, food, and chemicals.

[0003] Taking food processing ingredients as an example, the processing of a single food typically requires multiple raw materials, which are combined and matched in a certain proportion to obtain the final product. In the food processing process, to meet processing needs, avoid raw material waste, and reduce raw material and storage costs, the ingredient preparation process needs to be optimized.

[0004] In actual production environments, the data involved in the ingredient batching problem is large, which leads to problems such as low solution efficiency and long processing time in existing optimization schemes. Summary of the Invention

[0005] This application provides a method, device, and storage medium for managing product ingredients, which can improve the output efficiency of ingredient mixing schemes and shorten the optimization time.

[0006] Therefore, in one embodiment of this application, a method for managing product ingredients is provided, comprising:

[0007] Obtain multiple product requirements; the product requirements include the quantity of products required.

[0008] Based on the multiple product requirements, a first optimization model is used to determine the various raw materials required for each product requirement and the required quantity of each raw material; the first objective function of the first optimization model is related to minimizing the total raw material cost; the multiple product requirements include the first product requirement;

[0009] Based on the various raw materials required for the first product and the required quantity of each raw material, the second optimization model is used to determine the batching schemes corresponding to the multiple batching operations required to complete the first product requirement; the second objective function of the second optimization model is related to minimizing the number of batching operations.

[0010] In another embodiment of this application, a method for managing product ingredients related to beef patties is provided, comprising:

[0011] Obtain multiple food requirements; the food requirements include the quantity of food required.

[0012] Based on the multiple food demands, a first optimization model is used to determine the various raw materials required for each food demand and the required quantity of each raw material; the first objective function of the first optimization model is related to minimizing the total raw material cost; the multiple food demands include the first food demand;

[0013] Based on the various raw materials required for the first food demand and the required quantity of each raw material, the second optimization model is used to determine the corresponding ingredient schemes for each of the multiple ingredient batching steps required to fulfill the first food demand; the second objective function of the second optimization model is related to minimizing the number of ingredient batching steps.

[0014] In another embodiment of this application, an electronic device is provided. The electronic device includes: a memory and a processor, wherein,

[0015] The memory is used to store programs;

[0016] The processor, coupled to the memory, is configured to execute the program stored in the memory to implement the method described in any of the preceding embodiments.

[0017] In another embodiment of this application, a computer-readable storage medium storing a computer program is provided, which, when executed by a computer, can implement the methods described in any of the above-described embodiments.

[0018] The technical solution provided in this application breaks down the ingredient mixing problem into two steps. The first step involves solving a first optimization model to obtain an initial solution to the ingredient mixing problem, which yields the various raw materials required for each product requirement and the required quantity of each raw material. The second step further refines the initial solution by solving a second optimization model to obtain the ingredient mixing schemes corresponding to the multiple ingredient batches required for each product requirement. By breaking down the ingredient mixing problem, the complex problem is simplified, thereby improving the output efficiency of the ingredient mixing scheme and shortening the optimization time. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic flowchart illustrating a method for managing product ingredients according to an embodiment of this application;

[0021] Figure 2aA schematic flowchart illustrating a method for managing product ingredients according to an embodiment of this application;

[0022] Figure 2b This is an example diagram of a beef patty ingredient preparation method provided in an embodiment of this application;

[0023] Figure 3a An example diagram of the second stage of a method for managing product ingredients provided in an embodiment of this application;

[0024] Figure 3b An example diagram of the first stage of a method for managing product ingredients provided in an embodiment of this application;

[0025] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] Typically, in various product processing scenarios, the data scale involved in the ingredient mixing problem to be solved is large, the output efficiency of the ingredient mixing solution is low, and the optimization time is long.

[0027] To address the aforementioned problems, this application provides a material optimization scheme. The material optimization scheme provided in this application breaks down the material problem into two steps. The first step solves a first optimization model to obtain an initial solution to the material problem, which reveals the various raw materials required for each product requirement and the required quantity of each raw material. The second step further refines the initial solution by solving a second optimization model to obtain the material formulation schemes corresponding to the multiple material formulations required for each product requirement. By breaking down the material problem, the complex problem is simplified, thereby improving the output efficiency of the material formulation scheme and shortening the optimization time.

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0029] Furthermore, some processes described in the specification, claims, and accompanying drawings of this application include multiple operations that appear in a specific order. These operations may be performed out of order or in parallel. Operation numbers such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel. It should be noted that the terms "first," "second," etc., used herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0030] Figure 1 This illustration shows a flowchart of a product ingredient management method according to an embodiment of this application. The method can be executed by a client or a server. The client can be hardware with embedded programs integrated into a terminal, application software installed on the terminal, or utility software embedded in the terminal's operating system; this embodiment does not limit this. The terminal can be any terminal device, including mobile phones and tablets. The server can be a conventional server, a cloud server, or a virtual server; this embodiment does not specifically limit this. Figure 1 As shown, the method includes:

[0031] 101. Obtain multiple product requirements.

[0032] The product demand includes the quantity of products required.

[0033] 102. Based on the multiple product requirements, using the first optimization model, determine the various raw materials required for each product requirement and the required quantity of each raw material.

[0034] Wherein, the first objective function of the first optimization model is related to minimizing the total raw material cost; the multiple product demands include the first product demand. 103. Based on the various raw materials required for the first product demand and the demand quantity of each raw material, the second optimization model is used to determine the batching schemes corresponding to the multiple batching operations required to complete the first product demand; the second objective function of the second optimization model is related to minimizing the number of batching operations. In 101 above, the product demand includes the product demand quantity. Multiple product demands can be proposed by multiple product demanders. In one example, the product demand may also include the product demand time. The processing order of multiple product demands can be determined by the product demand time; the earlier the product demand time, the earlier the corresponding product demand is processed.

[0035] In the above 102, the product demand and raw materials refer to different things in different product processing scenarios. In the food processing scenario, the product demand can be food demand, and the raw materials can be various ingredients and / or additives. For example, in the beef patty processing scenario, the product demand can specifically be the demand for beef patties, and the raw materials can be beef with different lean meat ratios, different origins, and different batches. In the steel processing scenario, the product demand can be the demand for steel, and the raw materials can be various minerals. In the chemical processing scenario, the product demand can be the demand for chemicals, and the raw materials can be various chemical raw materials.

[0036] The first objective function of the aforementioned first optimization model is determined based on minimizing the total raw material cost. The total raw material cost refers to the cost of raw materials required to fulfill the demands of the multiple products. The raw material cost is related to the inventory time of the raw materials and the cost of acquiring them. The longer the inventory time of the raw materials, the greater the raw material cost.

[0037] In one feasible approach, minimizing the total raw material cost can be directly used as the first objective function of the first optimization model.

[0038] In one instance, the first optimization model described above may include: a first programming model, such as: a first mixed-integer programming model.

[0039] In the above 102, the first optimization model includes: a first objective function and at least one first constraint; the first objective function and at least one first constraint include: a first design constant and a first design variable. The design variable is also called a decision variable. Based on multiple product requirements, a solution algorithm can be used to solve the first optimization model to determine the various raw materials required for each product requirement and the required quantity of each raw material.

[0040] In one example, the constant value of the first design constant in the first optimization model can be determined based on multiple product requirements. Specifically, the constant value of the first design constant in the first optimization model can be determined based on multiple product requirements and raw material supply conditions. Based on the constant value of the first design constant in the first optimization model, a solution algorithm is used to solve the first optimization model to determine the various raw materials required for each product requirement and the required quantity of each raw material. Specifically, the first optimization model and the constant value of the first design constant in the first optimization model can be input into the solution algorithm so that the solution algorithm can determine the various raw materials required for each product requirement and the required quantity of each raw material. The solution algorithm can be selected according to actual needs, and this embodiment does not specifically limit it.

[0041] The first product requirement mentioned above refers to any one of the multiple product requirements mentioned above.

[0042] In section 103 above, ingredient mixing refers to the process of mixing certain raw materials together in a specific proportion to obtain a corresponding product. The ingredient mixing plan may include: information on the required raw materials and the required quantity of each raw material. The raw material information can be used to uniquely identify the corresponding raw material. Each batch of ingredients is used to fulfill a portion of the product demand for the first product, for example, a portion of the product demand.

[0043] The second objective function of the second optimization model is determined by minimizing the number of batching operations. In practical applications, the product demand for each product is relatively large; therefore, the number of batching operations required to fulfill the product demand is usually greater than or equal to 2.

[0044] In one feasible approach, minimizing the number of batching operations can be directly used as the second objective function of the second optimization model.

[0045] In one instance, the second optimization model described above may include: a second programming model, such as: a second mixed-integer programming model.

[0046] In the above 103, the second optimization model includes: a second objective function and at least one second constraint; the second objective function and at least one second constraint include: a second design constant and a second design variable. Based on the various raw materials required for the first product and the required quantity of each raw material, a solution algorithm can be used to solve the second optimization model to determine the batching schemes corresponding to the multiple batching operations required to complete the first product demand.

[0047] In one example, the constant value of the second design constant in the second optimization model can be determined based on the various raw materials required for the first product and the required quantity of each raw material. Based on the constant value of the second design constant in the second optimization model, a solution algorithm is used to solve the second optimization model to determine the batching schemes corresponding to each of the multiple batching operations required to complete the first product requirement. Specifically, the second optimization model and the constant value of the second design constant in the second optimization model can be input into the solution algorithm so that the solution algorithm can determine the batching schemes corresponding to each of the multiple batching operations required to complete the first product requirement. The solution algorithm can be selected according to actual needs, and this embodiment does not specifically limit its selection.

[0048] In one instance, the second optimization model can also output the execution order of multiple batching operations.

[0049] For example: Figure 3a As shown, the current demand (i.e., the demand for the first product mentioned above) requires several raw materials: A, B, C, and D, and their corresponding alternative pool P is as follows. Figure 3aAs shown, the alternative ingredient plans in the alternative plan pool P are obtained by permuting and combining A, B, C, and D. Based on the alternative plan pool P, the second optimization model is solved, and the following are determined from the alternative plan pool P: the first ingredient plan is A+B, and the second ingredient plan is B+C+D. Furthermore, the first ingredient plan maintains continuity of raw material usage with the previous requirement, and the second ingredient plan maintains continuity of raw material usage with the next requirement.

[0050] For example: Solving the first optimization model yields the following raw materials required for the first product demand X: raw material A, raw material B, and raw material C; where the required quantity of raw material A is 'a', the required quantity of raw material B is 'b', and the required quantity of raw material C is 'c'. Solving the second optimization model yields the following multiple batching schemes required to fulfill the first product demand: the first batching scheme is Z1, and the second batching scheme is Z2. Z1 requires raw materials A and B, with a required quantity of raw material A of 'a' and b1 of raw material B. Z2 requires raw materials B and C, with b2 of raw material B and c of raw material C. Here, 'b' is the sum of b1 and b2.

[0051] The technical solution provided in this application breaks down the ingredient mixing problem into two steps. The first step involves solving a first optimization model to obtain an initial solution to the ingredient mixing problem, which yields the various raw materials required for each product requirement and the required quantity of each raw material. The second step further refines the initial solution by solving a second optimization model to obtain multiple ingredient mixing schemes required for each product requirement. By breaking down the ingredient mixing problem, the complex problem is simplified, thereby improving the output efficiency of the ingredient mixing scheme and shortening the optimization time.

[0052] In practical applications, heuristic algorithms can be used to solve the first and second optimization models. However, heuristic methods refer to problem-solving methods that rely on inductive reasoning and experimental analysis based on past experience. That is, they use intuitive judgment or trial-and-error methods to find a suboptimal solution or, with a certain probability, the optimal solution. However, heuristic methods can only find local optima and lack effective ways to escape them, leading to inconsistent quality of the final ingredient formulation. Furthermore, heuristic algorithms are usually problem-oriented; that is, there is no universal framework, and different heuristic algorithms need to be designed for different problems.

[0053] Therefore, to further address the aforementioned issues, an exact algorithm can be used to solve both the first and second optimization models. The exact algorithm guarantees an optimal solution, while heuristic algorithms do not; the exact algorithm can determine the infeasibility of a problem, while heuristic algorithms cannot; the exact algorithm is easy to maintain and adapts to constantly changing processing conditions, while heuristic methods are typically designed for specific problems, and changes in conditions can easily render them ineffective.

[0054] In one example, the step 102 above, "Based on the multiple product requirements, using the first optimization model, determine the various raw materials required for each product requirement and the required quantity of each raw material," can be implemented using the following steps:

[0055] 1021. Based on the multiple product requirements, the first optimization model is solved using a solver based on an exact algorithm to determine the various raw materials required for each product requirement and the required quantity of each raw material.

[0056] The solver incorporates one or more exact algorithms. These exact algorithms can be selected according to actual needs, and this application does not impose specific limitations on them. An exact algorithm refers to an algorithm that can find the optimal solution. To date, many types of exact algorithms have been proposed, including branch and bound methods, cutting plane methods, integer programming algorithms, and dynamic programming algorithms.

[0057] In practical applications, the step 1021 above, "using a solver based on an exact algorithm to solve the first optimization model to determine the various raw materials required for each product requirement and the required quantity of each raw material," can be implemented using the following steps:

[0058] S11. Based on the raw material supply information and the demand for multiple products, determine the constant value of the first design constant in the first optimization model.

[0059] S12. Input the constant value of the first design constant and the first optimization model into the solver based on the exact algorithm to obtain the output result of the solver.

[0060] The output results include: the various raw materials required for each product requirement and the required quantity of each raw material.

[0061] In S11 above, it should be noted that the first design constant in the first optimization model is also the design constant involved in the first objective function and at least one constraint condition of the first optimization model. There can be multiple first design constants.

[0062] The aforementioned first design constant may include: raw material set, demand set, raw material cost for each product demand (the later the raw material is used, the higher the cost), the proportion of specified elements in the raw material, raw material inventory, etc.

[0063] The aforementioned first design constant can be designed according to actual needs, and the embodiments of this application do not impose specific limitations on it.

[0064] Optionally, the step 103 above, "based on the various raw materials required for the first product and the required quantity of each raw material, using the second optimization model to determine the batching scheme corresponding to each of the multiple batching operations required to complete the first product demand," can be achieved through the following steps:

[0065] 1031. Based on the various raw materials required for the first product and the required quantity of each raw material, the second optimization model is solved using a solver based on an exact algorithm to determine the batching schemes corresponding to the multiple batching processes required to complete the first product requirements.

[0066] The solver incorporates one or more exact algorithms. These exact algorithms can be selected according to actual needs, and this application does not impose specific limitations on them. An exact algorithm refers to an algorithm that can find the optimal solution. To date, many types of exact algorithms have been proposed, including branch and bound methods, cutting plane methods, integer programming algorithms, and dynamic programming algorithms.

[0067] The solver in this embodiment can be the same solver as the solver in the above embodiments.

[0068] In practical applications, the step 1031 above, "based on the various raw materials required for the first product and the required quantity of each raw material, using a solver based on an exact algorithm to solve the second optimization model to determine the batching schemes corresponding to each of the multiple batching operations required to complete the first product demand," can be implemented using the following steps:

[0069] S21. Based on the various raw materials required for the first product and the required quantity of each raw material, determine the constant value of the second design constant in the second optimization model.

[0070] S22. Input the constant value of the second design constant and the second optimization model into the solver based on the exact algorithm to obtain the output result of the solver.

[0071] The output results include: the ingredient mixing schemes for each of the multiple ingredient mixing steps required to fulfill the first product requirement.

[0072] In S21 above, the second design constant in the second optimization model refers to the design constant involved in the second objective function of the second optimization model and at least one second constraint condition. There can be multiple second design constants.

[0073] The second design constant may include: the set of raw materials corresponding to the various raw materials required for the first product, the required quantity of each raw material for the first product, etc. The second design constant can also be set according to actual needs, and this application embodiment does not specifically limit it in this regard.

[0074] In one feasible implementation, the above method may further include:

[0075] 104. Based on the preset first product production requirements, determine at least one first constraint condition.

[0076] 105. Construct the first optimization model based on the first objective function and the at least one first constraint.

[0077] In the above 104, the production requirements of the first product will be different in different product processing scenarios. Therefore, at least one first constraint condition will also be different in different product processing scenarios.

[0078] The above-mentioned first constraint may include, but is not limited to: the constraint of continuous use of raw materials among multiple product demands, the constraint of the proportion of elements corresponding to each product demand, the constraint of the source of raw materials in each product demand, the constraint of virtual raw materials being acquired in batches, the constraint of the number of raw materials used continuously in two adjacent product demands, the constraint of the demand quantity of each product demand being met, the constraint of the proportion of special raw materials in each product demand, the constraint of the complete consumption of inventory raw materials, etc.

[0079] In actual processing, allowing discontinuous use of raw materials can lead to materials being left at the processing site, repeatedly entering and leaving the warehouse, and repeatedly switching between materials, thus increasing related costs. Therefore, it is best to ensure that raw materials, once retrieved from the warehouse, are used continuously until they are exhausted, which can reduce related costs. Specifically, demand has a time sequence, and the different ingredients for each demand also have a sequence; the use of each raw material cannot be interrupted during the ingredient preparation process. Therefore, in the first stage, it is necessary to design constraints on the continuous use of raw materials across multiple product demands to ensure the continuous use of raw materials across multiple product demands. Constraints on the continuous use of raw materials across multiple product demands can take various forms, but different forms have different complexities. For the model, the simpler the constraints, the simpler the solution process and the faster the solution speed.

[0080] This application provides a simplified constraint on the continuous use of raw materials across multiple product demands. Specifically, the at least one first constraint includes a constraint on the continuous use of raw materials across multiple product demands. The step 104 above, "determining the constraint on the continuous use of raw materials across multiple product demands based on preset first product production requirements," can be achieved through the following steps:

[0081] S31. Establish a first expression for the number of product requirements that use the first raw material in the multiple product requirements.

[0082] S32. Establish a second expression for the total number of times the first raw material is used by two adjacent product demands among the multiple product demands.

[0083] S33. The difference between the first expression and the second expression is less than or equal to 1, which serves as a constraint condition for the continuous use of the first raw material among multiple product demands.

[0084] The constraint on the continuous use of raw materials across multiple product demands includes: the constraint on the continuous use of the first raw material across multiple product demands. The first raw material refers to any raw material.

[0085] The specific formula for the constraint on the continuous use of raw materials across multiple product demands will be shown in the following embodiments.

[0086] In one instance, the above method may further include:

[0087] 106. Based on the preset production requirements of the second product, determine at least one second constraint condition.

[0088] 107. Construct a second optimization model based on the second objective function and the at least one second constraint.

[0089] In the above 1032, the production requirements of the second product will be different in different product processing scenarios. Therefore, at least one second constraint condition will also be different in different product processing scenarios.

[0090] The at least one second constraint includes: a constraint on the continuous use of raw materials among multiple batching processes; a constraint on the continuous use of raw materials between the batching scheme corresponding to the first batching process and the demand for the previous product; a constraint on the continuous use of raw materials between the batching scheme corresponding to the last batching process and the demand for the next product; a constraint on the ordering of batching schemes; a constraint on the total demand of the first product; a constraint on the proportion of elements corresponding to each batching scheme; a constraint on the proportion of the same raw material corresponding to each batching scheme; a constraint that the sum of the raw material usage equals the output of the batching scheme; and so on.

[0091] In one example, the at least one second constraint includes a constraint on the continuous use of raw materials between the batching scheme corresponding to the last batching and the next product requirement. The phrase "determine at least one second constraint according to the preset second product production requirements" in step 106 above can be implemented using the following steps:

[0092] S41. Define the first 0-1 variable, the second 0-1 variable, the third 0-1 variable, and the fourth 0-1 variable.

[0093] Wherein, the first 0-1 variable is used to indicate whether the constraint condition of continuous use of raw materials between the last batching scheme and the next product demand is violated; the second 0-1 variable is used to indicate whether the batching scheme located at the first sorting position uses the first raw material; the first sorting position refers to any one of a plurality of preset sorting positions; the first raw material refers to any one of a plurality of raw materials required by the first product demand; the third 0-1 variable is used to indicate whether the next product demand uses the first raw material; the fourth 0-1 variable is used to indicate whether the batching scheme at the first sorting position is the last batching scheme.

[0094] Note: It should be noted that the three basic elements of an optimization model include: design variables, objective function, and constraints. The variables mentioned above are also design variables.

[0095] S42. The difference between the sum of the first 0-1 variable and the second 0-1 variable and the third 0-1 variable is greater than or equal to the difference between the fourth 0-1 variable and 1. This difference is used as a constraint condition for the continuous use of raw materials between the batching scheme corresponding to the last batching and the next product demand.

[0096] In this embodiment, the aforementioned first 0-1 variable is introduced to avoid situations where there is no solution. This is because in practical applications, simultaneously satisfying the three consecutive usage constraints—the consecutive usage constraint between multiple batches of raw materials, the consecutive usage constraint between the batching scheme corresponding to the first batch and the previous product demand, and the consecutive usage constraint between the batching scheme corresponding to the last batch and the next product demand—may lead to no solution. Therefore, it is permissible to allow one of the consecutive usage constraints to be violated. In this embodiment, the constraint between the batching scheme corresponding to the last batch and the next product demand is allowed to be violated.

[0097] To avoid an excessive number of violations, the second objective function can be redesigned. Specifically, the method may further include:

[0098] 108. Construct penalty items for violations of the constraints on the continuous use of raw materials.

[0099] 109. Determine the second objective function based on minimizing the number of ingredient additions and minimizing the violation penalty term.

[0100] Specifically, the violation penalty item can be the total number of violations of the constraint on continuous use of raw materials. The specific formula for the violation penalty item will be described in the following examples.

[0101] In one instance, the sum of minimizing the number of ingredient additions and minimizing the violation penalty term can be used as the second objective function.

[0102] Furthermore, in one feasible embodiment, the above method also includes:

[0103] 110. Construct an expiration penalty item for raw materials.

[0104] 111. Determine the first objective function based on minimizing the total raw material cost and minimizing the expiration penalty term.

[0105] In practical applications, expired raw materials cannot be used. Therefore, in actual processing scenarios, the cost of expiration also needs to be considered.

[0106] In one instance, the sum of minimizing the total raw material cost and minimizing the expiration penalty term can be used as the second objective function.

[0107] The product ingredient management method provided in this application can be applied to scenarios such as metal smelting, food processing, and chemical processing. The technical solution provided in this application will be described below in the context of a food processing scenario.

[0108] In this embodiment, the aforementioned product demand specifically refers to food demand. For example... Figure 2a As shown, the method includes:

[0109] 201. Obtain multiple food requirements.

[0110] The food demand mentioned here includes the quantity of food required.

[0111] 202. Based on the multiple food demands, using the first optimization model, determine the various raw materials required for each food demand and the required quantity of each raw material.

[0112] The first objective function of the first optimization model is related to minimizing the total raw material cost; the multiple food demands include the first food demand.

[0113] 203. Based on the various raw materials required for the first food demand and the required quantity of each raw material, the second optimization model is used to determine the corresponding ingredient schemes for each of the multiple ingredient batches required to fulfill the first food demand.

[0114] The second objective function of the second optimization model is related to minimizing the number of batching operations.

[0115] The technical solution provided in this application breaks down the ingredient mixing problem into two steps. The first step involves solving a first optimization model to obtain an initial solution to the ingredient mixing problem, which yields the various raw materials required for each product requirement and the required quantity of each raw material. The second step further refines the initial solution by solving a second optimization model to obtain multiple ingredient mixing schemes required for each product requirement. By breaking down the ingredient mixing problem, the complex problem is simplified, thereby improving the output efficiency of the ingredient mixing scheme and shortening the optimization time.

[0116] Optionally, the step 202 above, "based on the multiple food demands, using the first optimization model to determine the various raw materials required for each food demand and the required quantity of each raw material," can be achieved through the following steps:

[0117] 2021. Based on the multiple food requirements, the first optimization model is solved using a solver based on an exact algorithm to determine the various raw materials required for each food requirement and the required quantity of each raw material.

[0118] The specific implementation of step 2021 can be found in the corresponding content of the above embodiments, and will not be repeated here.

[0119] It should be noted that any steps in the method provided in this application that are not described in detail can be found in the corresponding content of the above embodiments, and will not be repeated here. Furthermore, the method provided in this application may include other parts or all of the steps in the above embodiments in addition to the steps described above; for details, please refer to the corresponding content of the above embodiments, and will not be repeated here.

[0120] The following will take the beef patty processing scenario as an example, combined with... Figure 2b The technical solutions provided in the embodiments of this application are illustrated with examples. Figure 2b As shown:

[0121] Suppose a beef patty processing factory receives multiple beef patty orders from various customers: Order 1 and Order 2. Order 1 has a demand date of September 16, 2021, and a quantity of 500 kg. Order 2 has a demand date of September 23, 2021, and a quantity of 800 kg. Based on Order 1 and Order 2, a first optimization model is solved using a solver based on an exact algorithm. The raw materials required for Order 1 are determined to be: Raw Material 1, Raw Material 2, Raw Material 3, and Raw Material 4, with the quantities required for each material being Q11, Q12, Q13, and Q14, respectively. Similarly, the raw materials required for Order 2 are determined to be: Raw Material 1, Raw Material 2, Raw Material 4, and Raw Material 5, with the quantities required for each material being Q21, Q22, Q24, and Q25, respectively.

[0122] Taking requirement 1 as an example, based on the various raw materials required for requirement 1 and the required quantity of each raw material, the second optimization model is used to determine the batching schemes for each of the multiple batching operations required to complete requirement 1. These multiple batching operations include: a first batching operation and a second batching operation. The first batching operation is performed before the second batching operation. The batching scheme for the first batching operation includes: raw material 1 and its required quantity q11, raw material 2 and its required quantity q12, and raw material 3 and its required quantity q13. The batching scheme for the second batching operation includes: raw material 2 and its required quantity q22, raw material 3 and its required quantity q23, and raw material 4 and its required quantity q24, as shown in Figure 3. Where Q11 = q11, Q12 = q12 + q22, Q13 = q13 + q23, and Q14 = q24.

[0123] In practical applications, the primary optimization objective of raw material combination and matching is usually to minimize the cost of raw material combination. Based on the inventory of raw materials, as well as those in transit and awaiting acquisition, the composition and input quantity of each type of raw material are determined to meet the demand for different products at different times. The technical solution provided in this application also considers a second optimization objective of minimizing the number of batching operations. This is because in real-world scenarios, combination switching often incurs costs, such as the time cost of mold changeovers, thus necessitating the simplification of batching operations. The main principle of raw material combination and matching is to meet both demand and processing requirements, such as the continuity of raw material use, the mutual exclusivity between raw materials, and raw material ratio requirements.

[0124] The technical solution provided in this application addresses the problem of adapting large-scale models to real-world scenarios. Taking the beef patty processing ingredient problem as an example, it designs a two-stage optimization scheme. In this scheme, the raw materials for the beef patty processing ingredient problem are beef from different regions, with varying lean meat percentages and effective usage deadlines. The customer's requirement is to produce semi-finished beef patties with a specified lean meat percentage at different times. The ingredient preparation process requires avoiding expired raw materials, minimizing raw material costs, and minimizing the number of resource combinations. The two-stage optimization is as follows: Figure 3b As shown, Phase 1 provides an overall rough formulation plan with the goal of minimizing costs; Phase 2 provides specific combination plans (i.e., ingredient plans) with the goal of simplifying the plan. For example, Phase 1 outputs the raw materials required for Requirement 1, including: A, B, C, D, and E. Phase 2 outputs the two ingredient plans required for Requirement 2: the first ingredient plan corresponds to A+B+C, and the second ingredient plan corresponds to C+D+E.

[0125] By breaking down the original problem, we obtain two stages and two smaller-scale problems. The first stage includes only some constraints and ultimately outputs a general rough formulation solution, which only includes the beef raw materials needed for each demand and their required quantities. In the second stage, for each demand, based on the beef raw materials and their required quantities determined in the first stage, we further consider the remaining constraints to form a specific ingredient formulation solution. The food ingredient problem discussed in the products to which this solution is applied requires that an ingredient formulation solution contain a maximum of three raw materials.

[0126] Phase One (Main Problem)

[0127] This phase aims to minimize total raw material costs by determining which types of beef raw materials can meet each demand and how much of each type is needed.

[0128] 1.1 Define the parameters (i.e., the first design constant mentioned above)

[0129] The defined parameters are shown in Table 1:

[0130] Table 1:

[0131]

[0132] 1.2 Defining Variables

[0133] The defined variables are shown in Table 2:

[0134] Table 2:

[0135] variable meaning <![CDATA[y kj ]]> Does demand j involve raw materials from region k? <![CDATA[x ij ]]> The amount of raw material i used in demand j <![CDATA[q ij ]]> Did raw material i use in demand j? <![CDATA[u i ]]> Number of batches required for virtual raw material i <![CDATA[f j ]]> The percentage of demand j satisfied is between 0 and 1. <![CDATA[ind i,j ]]> Indicator variables in continuity constraints <![CDATA[ct ij ]]> Do both demand j and j+1 use raw material i?

[0136] 1.3 Objective Function

[0137] The sum of minimizing total raw material costs and minimizing the penalty for unmet demand is used as the second objective function.

[0138]

[0139] in, The total cost of raw materials, This is a penalty for unmet requirements.

[0140] 1.4 Constraints

[0141] (1) The demand for each product meets the constraints.

[0142] Specifically, the sum of the demand for each raw material required for each product is equal to the product demand corresponding to each product demand and the fulfillment ratio corresponding to each product demand.

[0143] (2) Constraints on the continuous use of raw materials across multiple product demands

[0144] Once a raw material is selected, it must be used up before selecting the next raw material. For example, first mix a and b. If a is not used up, then you need to select a material c to continue mixing with a, and so on, until a is used up.

[0145] If two adjacent demands both use raw material i, then ct ij The value equals 1, therefore when raw material i is used, ct ij The sum equals q ij The difference between the sum and 1; when raw material i is not used, ct ij The sum equals q ij The sum of q. That is, q ij The sum of and ct ij The difference between the sums is less than or equal to 1.

[0146] (3) Lean meat percentage constraints for each product demand (corresponding to the element proportion constraints for each product demand mentioned above)

[0147] Specifically, the lean meat percentage required for each product is less than or equal to the preset lean meat percentage, such as 76%.

[0148] (4) Constraints on the proportion of special raw materials in the demand for each product

[0149] The proportion of raw materials with a lean meat ratio of 0.75% and 0.80% in each product requirement shall not exceed the preset proportion, for example, 75%.

[0150] (5) Demand and source regions are linked

[0151] If demand j uses raw material i from region k, then q ij y is 1 kjIf q is 1, then y is 0; otherwise, y is 0 or 1. That is, q ij Less than or equal to y kj .

[0152] (6) Constraints on the source of raw materials in the demand for each product (corresponding to the constraints on the source of raw materials in the demand for each product mentioned above)

[0153] The number of source regions for the raw materials required by each product shall not exceed the preset number of source regions, such as 5.

[0154] (7) Constraint on the complete consumption of all raw materials in inventory

[0155] All raw materials were consumed by the demand in the demand set, which includes virtual demand.

[0156] (8) Virtual raw material batch acquisition constraints

[0157] (9) Constraints on the number of raw materials required for two adjacent product demands

[0158] When both demand j and j+1 use raw material i, ct ij 1:

[0159]

[0160] When demand j or j+1 does not use raw material i, ct ij =0:

[0161]

[0162] For the last requirement

[0163] ct ij =0 (4)

[0164] The number of raw materials that overlap with the demand for the next product shall not exceed two.

[0165] No more than one special raw material (0.75, 0.80) may be used that overlaps with the demand of the next product.

[0166] (10) Minimum feed amount of raw materials

[0167] Ensure that the amount of raw material fed each time is greater than the minimum usage amount, for example, 20.

[0168] (11) Each requirement shall use at least two raw materials.

[0169] (12) Each raw material can be used for a maximum of 5 needs.

[0170] Phase Two (Sub-problems):

[0171] This stage aims to minimize the number of batching operations and determines the batching scheme for a given demand j, with each batching scheme containing no more than three raw materials.

[0172] The known conditions for this stage are the demand for each raw material R of demand j determined in stage one. i .

[0173] Note: The order of ingredients needs to be considered.

[0174] 2.1 Define parameters (i.e., the design constants in the above embodiments)

[0175] The defined parameters are shown in Table 3:

[0176] Table 3:

[0177] parameter meaning P A collection of hybrid schemes; each scheme contains no more than three raw materials. <![CDATA[I s ]]> The set of raw materials selected for this requirement in Phase 1 <![CDATA[I p ]]> <![CDATA[In the set I s the raw material sets with lean meat percentages of 0.75 and 0.8]]> <![CDATA[R i ]]> Demand for raw material i <![CDATA[n i ]]> Whether raw material i will be used in the next stage of this stage. <![CDATA[b i ]]> Was raw material i used in the previous stage of this stage? <![CDATA[r i ]]> Lean meat percentage of raw material i M Big M

[0178] 2.2 Defining Variables

[0179] The defined variables are shown in Table 4:

[0180] Table 4:

[0181] variable meaning <![CDATA[z p ]]> binary, whether to use a hybrid scheme p <![CDATA[w p ]]> cont, the yield of the mixed scheme p <![CDATA[v ip ]]> cont, in the mixing scheme p, the amount of raw material i used. <![CDATA[t iq ]]> binary, whether raw material i is used in the sorting scheme for the q-th position. <![CDATA[t′ iq ]]> cont represents the amount of raw material i used in the sorting scheme at position q. <![CDATA[a pq ]]> In binary, is the mixed scheme p ranked in the qth position? <![CDATA[vio iq ]]> In binary, does the continuity between raw material i and the next demand violate the following condition in the q-th scheme? <![CDATA[indi q ]]> binary, an indicator variable, indicating whether raw material i, ranked qth, still has inventory. <![CDATA[ind2 iq ]]> binary, an indicator variable, indicating whether the q-th solution is the last solution.

[0182] Note: A mixed solution is also known as a formulation solution.

[0183] 2.3 Objective Function

[0184] The objective function is the sum of minimizing the number of ingredient additions and minimizing the violation penalty term.

[0185]

[0186] in, For the number of times ingredients are added, This constitutes a violation of the penalty clause.

[0187] 2.4 Constraints

[0188] (1) Demand constraint

[0189] Specifically, the sum of the amounts of raw material i used in multiple batching processes equals the product demand for raw material i.

[0190] (2) Lean meat percentage constraint (corresponding to the element proportion constraint conditions of each ingredient scheme mentioned above)

[0191] The lean meat percentage of the mixture obtained from each batch of ingredients is greater than or equal to the preset lean meat percentage, for example: 0.76.

[0192] (3) Constraints on the proportion of the same raw material in each batching scheme (only need to iterate through the raw materials contained in P).

[0193] In each batching plan, the ratio between the amount of raw material i used and the output obtained by that batching plan is less than or equal to a preset ratio, for example: 0.75.

[0194] (4) The constraint that the sum of raw material usage equals the output of the batching scheme (only the raw materials contained in P need to be traversed).

[0195] (5) Production constraint (only need to traverse the raw materials contained in P)

[0196] In the set of mixing schemes (i.e., the set of ingredient schemes), the yield corresponding to each ingredient scheme is less than or equal to z. p The product of M and M.

[0197] (6) Constraints on the sorting of ingredients

[0198] How a solution is used will occupy a sequence position.

[0199]

[0200] Each sequence number can have at most one solution.

[0201]

[0202] Since not all feasible solutions may be used, prioritize those from the beginning when sorting.

[0203]

[0204] (7) Constraints on the continuous use of raw materials between multiple batching processes

[0205] When raw material i is used in both the (q+1)th and qth batching schemes, the difference between the product demand for raw material i and the total amount of raw material i used in the previous q batching schemes is greater than or equal to a set value, which can be set as needed.

[0206] (8) Constraints on the continuous use of raw materials between the batching scheme corresponding to the first batching and the demand of the previous product.

[0207]

[0208] (9) Constraints on the continuous use of raw materials between the last batching plan and the next product demand.

[0209] Specifically, if there is a solution at position q, but no solution at position q+1, it means that q is the last solution. If n i If = 1, then raw material i needs to be in q. This constraint can be expressed by the following formula:

[0210]

[0211] Furthermore, a binary variable vio can be added. iq This indicates whether the constraint is violated, and sets the violation value accordingly. iq If we include the objective and conclude that continuity cannot be guaranteed in the end, then n=1 and t=0.

[0212]

[0213] (10) Bind t′ iq

[0214] If the p-th scheme is ranked q-th, then the amount of raw material i used in the q-th scheme is the same as the amount of raw material i used in the p-th scheme. If a scheme containing raw material i is ranked q-th, then raw material i is used to rank the q-th scheme. If raw material i is used to rank the q-th scheme, then the scheme ranked q-th contains raw material i.

[0215] (11) Minimum feed quantity constraint of raw materials

[0216] The amount of raw material fed each time is greater than or equal to the minimum usage amount of 10.

[0217] In practical applications, the second stage sub-problems (or second optimization models) corresponding to each requirement in multiple product requirements can be solved in parallel to further improve the solution efficiency.

[0218] For specific constraints, the optimal value of M can be further clarified to minimize the search space and improve solution efficiency. For example, if the three relevant variables in the constraint are all 0-1 variables, then setting M to 1 will satisfy the requirements.

[0219] This solution extracts commonalities from raw material combination and matching problems, establishing a general solution model applicable to various scenarios such as food processing ingredient formulation, metal smelting, and chemical product manufacturing. Through problem decomposition, this solution effectively handles large-scale raw material combination and matching problems, solving the scalability issue in model implementation.

[0220] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Figure 4As shown, the electronic device includes a memory 1101 and a processor 1102. The memory 1101 can be configured to store various other data to support operation on the electronic device. Examples of such data include instructions for any application or method used to operate on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0221] The memory 1101 is used to store programs;

[0222] The processor 1102 is coupled to the memory 1101 and is used to execute the program stored in the memory 1101 to implement the methods provided in the above-described method embodiments.

[0223] Furthermore, such as Figure 4 As shown, the electronic device also includes: communication component 1103, display 1104, power supply component 1105, audio component 1106, and other components. Figure 4 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 4 The components shown.

[0224] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the steps or functions of the methods provided in the above-described method embodiments.

[0225] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0226] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0227] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for managing product ingredients, wherein, include: Obtain multiple product requirements; the product requirements include the quantity of products required. Based on the multiple product requirements, a first optimization model is used to determine the various raw materials required for each product requirement and the required quantity of each raw material; the first optimization model is constructed based on a first objective function and at least one first constraint condition, wherein the first objective function is to minimize the total raw material cost; the multiple product requirements include the first product requirement; Based on the various raw materials required for the first product and the required quantity of each raw material, the second optimization model is used to determine the batching schemes corresponding to the multiple batching operations required to complete the first product requirement. The second optimization model is constructed based on a second objective function and at least one second constraint condition. The second objective function is to minimize the number of batching operations. The first optimization model and the second optimization model are solved using an exact algorithm.

2. The method according to claim 1, wherein, Based on the multiple product requirements, using a first optimization model, the required raw materials for each product requirement and the required quantity of each raw material are determined, including: Based on the multiple product requirements, the first optimization model is solved using a solver based on an exact algorithm to determine the various raw materials required for each product requirement and the required quantity of each raw material.

3. The method according to claim 1, wherein, Based on the various raw materials required for the first product and the required quantity of each raw material, the second optimization model is used to determine the batching schemes for each of the multiple batching operations required to fulfill the first product demand, including: Based on the various raw materials required for the first product and the required quantity of each raw material, the second optimization model is solved using a solver based on an exact algorithm to determine the batching schemes corresponding to each of the multiple batching operations required to complete the first product requirement.

4. The method according to any one of claims 1 to 3, wherein, Also includes: Based on the preset first product production requirements, at least one first constraint condition is determined; The first optimization model is constructed based on the first objective function and the at least one first constraint.

5. The method according to claim 4, wherein, The at least one first constraint includes one or more of the following: a constraint on the continuous use of raw materials among multiple product demands, a constraint on the proportion of elements corresponding to each product demand, a constraint on the source of raw materials in each product demand, a constraint on the batch acquisition of virtual raw materials, and a constraint on the number of raw materials used continuously in two adjacent product demands.

6. The method according to claim 4, wherein, The at least one first constraint includes a constraint on the continuous use of raw materials among multiple product demands; Based on the pre-set production requirements of the first product, determine the constraints on the continuous use of raw materials across multiple product demands, including: Establish a first expression for the number of product requirements that use the first raw material in the multiple product requirements; Establish a second expression for the total number of times the first raw material is used by two adjacent product demands among the multiple product demands; The difference between the first expression and the second expression is less than or equal to 1, which serves as a constraint on the continuous use of the first raw material among multiple product demands.

7. The method according to any one of claims 1 to 3, wherein, Also includes: Based on the preset production requirements of the second product, at least one second constraint condition shall be determined; A second optimization model is constructed based on the second objective function and the at least one second constraint.

8. The method according to claim 7, wherein, The at least one second constraint includes one or more of the following: a constraint on the continuous use of raw materials among multiple batching processes, a constraint on the continuous use of raw materials between the batching scheme corresponding to the first batching process and the previous product demand, a constraint on the continuous use of raw materials between the batching scheme corresponding to the last batching process and the next product demand, and a constraint on the ordering of batching schemes.

9. The method according to any one of claims 1 to 3, wherein, Also includes: Establish an expiration penalty system for raw materials that have expired; The first objective function is determined based on minimizing the total raw material cost and minimizing the expiration penalty term.

10. The method according to any one of claims 1 to 3, wherein, Also includes: Construct penalty items for violations of the constraint of continuous use of raw materials; The second objective function is determined by minimizing the number of ingredient additions and minimizing the violation penalty term.

11. A method for managing food ingredients, wherein, include: Obtain multiple food requirements; the food requirements include the quantity of food required. Based on the multiple food demands, a first optimization model is used to determine the various raw materials required for each food demand and the required quantity of each raw material; the first optimization model is constructed based on a first objective function and at least one first constraint condition, wherein the first objective function is to minimize the total raw material cost; the multiple food demands include the first food demand; Based on the various raw materials required for the first food demand and the required quantity of each raw material, the second optimization model is used to determine the corresponding ingredient schemes for each of the multiple ingredient batching steps required to fulfill the first food demand. The second optimization model is constructed based on a second objective function and at least one second constraint condition, wherein the second objective function is to minimize the number of ingredient batching steps. The first optimization model and the second optimization model are solved using an exact algorithm.

12. The method according to claim 11, wherein, Based on the multiple food demands, using a first optimization model, the required raw materials for each food demand and the required quantity of each raw material are determined, including: Based on the multiple food requirements, the first optimization model is solved using a solver based on an exact algorithm to determine the various raw materials required for each food requirement and the required quantity of each raw material.

13. An electronic device, wherein, include: Memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is configured to execute the program stored in the memory to implement the method of any one of claims 1 to 12.

14. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by a computer, it can implement the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Batching system and batching method

    CN111427314A

  • Iron-making multi-target integrated batching optimization method and system, equipment and medium

    CN112699613A