Production scheduling method, device, equipment and computer readable storage medium
The order production sequence is optimized through the ant colony algorithm, and the problem of maximization of production capacity and quality in order-driven production is solved, efficient production scheduling under diversified and small batch demands is achieved, and the risk of default is reduced.
Patent Information
- Application Number
- CN202210193599.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-02-28
AI Technical Summary
In order-driven production, how to maximize enterprise production capacity and product quality without violating the constraints of site, personnel, and delivery time, especially under diversified and small batch demands, it is difficult for existing technology to effectively solve order production scheduling. optimization problem.
The ant colony algorithm is used to construct the production sequence of orders. By initializing the number of ants and the two-dimensional pheromone matrix, update the pheromone concentration, iteratively optimize the production sequence until the iterative stop condition is met, ensuring that the default days are minimum or zero, thus obtaining the optimal Production scheduling strategy.
It has achieved the maximization of enterprise production capacity and product quality, reduce default risks, and improve production efficiency and market competitiveness without increasing production costs.
Smart Images

Figure CN114638406B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of production scheduling, and in particular relates to a production scheduling method, device, equipment and computer-readable storage medium. Background Art
[0002] Industry is an indispensable industry in society. With the development of society, industrial orders have changed from single batch demand in the past to diversified and small batch demand.
[0003] In this way, current enterprises usually adopt the method of order-driven production operations to process orders. The production method of order-driven production operations can effectively avoid market risks and meet diverse market demands. It is the most widely used production organization method for small and medium-sized enterprises. The production scheduling of orders, that is, the selection and scheduling of orders, is the key for such enterprises to meet the diverse needs of customers, respond quickly to market demands, and improve their market competitiveness.
[0004] How to maximize the company's production capacity and product quality while ensuring that the production scheduling of orders does not violate the constraints of site, personnel, and delivery time is the company's constant pursuit. Summary of the invention
[0005] The embodiments of the present invention provide a production scheduling method, device, equipment and computer-readable storage medium for an order, which can maximize the production capacity and product quality of an enterprise.
[0006] In a first aspect, an embodiment of the present invention provides a production scheduling method for an order, the method comprising:
[0007] Get order information for multiple orders;
[0008] Initialize the number of ants in the ant colony algorithm according to the order quantity of multiple orders;
[0009] According to the order information of multiple orders, a two-dimensional pheromone matrix is determined. The pheromone Dij in the two-dimensional pheromone matrix is the pheromone between order i and order j. The pheromone Dij is used to represent the probability of producing order j after order i is produced. i and j are positive integers.
[0010] According to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix, a first solution space is constructed, and the solutions in the first solution space are production sequences of multiple orders;
[0011] When the iteration stop condition of the ant colony algorithm is not met, the pheromones in the two-dimensional pheromone matrix are updated according to the following first relation; and the solution space is constructed according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix;
[0012] Under the condition that the iteration stop condition of the ant colony algorithm is met, determine whether the optimal solution in the solution space is feasible. The optimal solution is the production sequence with zero default days or the minimum default days.
[0013] When the optimal solution is determined to be feasible, the optimal solution is optimized to obtain the final production scheduling strategy for multiple orders;
[0014] The first relation is:
[0015]
[0016] Among them, pheromones tij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter.
[0017] In some implementations, the order production scheduling method may further include:
[0018] When it is determined that the optimal solution is not feasible, multiple default orders are randomly popped out from the optimal solution until the production sequence after the multiple default orders are popped out is feasible;
[0019] Insert multiple default orders that pop up one by one into the production sequence after the default orders pop up to construct the second solution space;
[0020] If the second iteration stop condition is not met, return to execute and randomly pop out multiple default orders in the optimal solution until the production sequence after popping out multiple default orders is feasible;
[0021] When the second iteration stopping condition is met, determining whether the second optimal solution in the second solution space is feasible;
[0022] When it is determined that the second optimal solution is feasible, the second optimal solution is optimized to obtain a final production scheduling strategy for multiple orders.
[0023] In some implementations, multiple default orders are randomly popped out from the optimal solution until the production sequence after the multiple default orders are popped out is feasible, specifically including:
[0024] Obtain the accepted orders and unaccepted orders in the production sequence corresponding to the optimal solution;
[0025] Multiple unaccepted orders with defaults pop up randomly;
[0026] Determine whether the production sequence is feasible after multiple unaccepted orders with defaults are ejected;
[0027] If it is determined that the production sequence after ejecting multiple unaccepted orders is not feasible, all unaccepted orders with defaults are randomly ejected;
[0028] Determine whether the production sequence after ejecting all unaccepted orders with default is feasible;
[0029] When it is determined that the production sequence after ejecting all unaccepted orders is not feasible, all unaccepted orders with defaults and multiple accepted orders with defaults are randomly ejected until the production sequence after ejecting all unaccepted orders with defaults and multiple accepted orders with defaults is feasible.
[0030] In some implementations, multiple default orders that pop up are inserted one by one into the production sequence after the default orders pop up to construct a second solution space, which specifically includes:
[0031] Get the accepted orders and unreceived orders among the multiple default orders that pop up;
[0032] Sort the accepted orders among the default orders that pop up according to the order production time, and insert the sorted accepted orders among the default orders that pop up into the production sequence after the default orders pop up one by one;
[0033] After the accepted orders in the pop-up default orders are inserted, the unaccepted orders in the pop-up default orders are sorted according to the order production time, and the order production time is determined based on the order information;
[0034] The unaccepted orders in the sorted popped-up default orders are inserted one by one into the production sequence after the popped-up default orders to construct the second solution space.
[0035] In some implementations, optimizing the optimal solution to obtain a final production scheduling strategy for multiple orders or optimizing the second optimal solution to obtain a final production scheduling strategy for multiple orders specifically includes:
[0036] Initialize the fitness values of multiple preset operators in the optimization algorithm;
[0037] Determine the probability of each operator being selected according to the fitness values of multiple operators;
[0038] Randomly select an operator based on the probability of each operator being selected to optimize the optimal solution or the second optimal solution;
[0039] When the optimized solution does not satisfy the third iteration stop condition, the fitness value of each operator is updated according to the following second relational expression, and the process of determining the probability of each operator being selected according to the fitness values of multiple operators is returned to be executed;
[0040] When the second iteration stop condition is met, the optimized solution corresponding to the iteration stop condition is determined as the final production scheduling strategy for the multiple orders;
[0041] The second relationship is:
[0042] O i(t) =(1-α)O i(t-1) +βΔO i
[0043] Among them, ΔO i is the improvement of the solution after the current operator i is optimized for the tth time, O i(t) is the fitness value of operator i after t optimizations are completed, and α and β are preset constants between 0 and 1.
[0044] In some implementations, determining the probability of each operator being selected according to the fitness values of multiple operators specifically includes:
[0045] Determine the probability of each operator being selected according to the fitness values of multiple operators;
[0046] Determine whether the probability of each operator being selected exceeds a preset threshold;
[0047] When the probability of any one of the operators in each operator exceeds a preset threshold, the probability of the operator corresponding to the probability exceeding the threshold being selected is determined as the preset probability.
[0048] In some implementations, the order production scheduling method may further include:
[0049] In the case that the second optimal solution is not feasible, based on the Pareto dominance principle and the profit loss and default days corresponding to each solution in the second solution space, a preset number of solutions in the second solution space are determined as solutions to be optimized; the profit loss is determined based on the unaccepted orders with default in the solution, and the default days are determined based on the accepted orders with default in the solution;
[0050] Delete the defaulted orders in each solution to be optimized to obtain a second solution to be optimized;
[0051] The second solution to be optimized is optimized to obtain the final production scheduling strategy for multiple orders.
[0052] In some implementations, optimizing the second solution to be optimized to obtain an optimized final solution specifically includes:
[0053] Initialize the fitness values of multiple preset operators in the optimization algorithm;
[0054] Determine the probability of each operator being selected according to the fitness values of multiple operators;
[0055] Randomly selecting an operator based on the probability of each operator being selected to optimize the second solution to be optimized;
[0056] When the optimized solution does not satisfy the fourth iteration stop condition, the fitness value of each operator is updated according to the following second relational expression, and the process of determining the probability of each operator being selected according to the fitness values of the multiple operators is returned to be executed;
[0057] When the fourth iteration stop condition is met, the optimized solution corresponding to the iteration stop condition is determined as the final production scheduling strategy for the multiple orders;
[0058] The second relationship is:
[0059] O i(t) =(1-α)O i(t-1 )+βΔO i .
[0060] In a second aspect, an embodiment of the present invention provides a production scheduling device for an order, the device comprising:
[0061] The acquisition module is used to obtain the order information of multiple orders;
[0062] An initialization module is used to initialize the number of ants in the ant colony algorithm according to the order quantity of multiple orders;
[0063] The first determination module is used to determine a two-dimensional pheromone matrix according to the order information of multiple orders. The pheromone Dij in the two-dimensional pheromone matrix is the pheromone between order i and order j. The pheromone Dij is used to represent the probability of producing order j after order i is produced. i and j are positive integers.
[0064] The first construction module is used to construct a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix. The solutions in the first solution space are production sequences of multiple orders.
[0065] The second construction module is used to update the pheromones in the two-dimensional pheromone matrix according to the following first relationship when the iteration stop condition of the ant colony algorithm is not met; and return to construct a solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix;
[0066] The second determination module is used to determine whether the optimal solution in the solution space is feasible when the iteration stop condition of the ant colony algorithm is met. The optimal solution is a production sequence with zero default days or the minimum default days;
[0067] The first optimization module is used to optimize the optimal solution when it is determined that the optimal solution is feasible, so as to obtain the final production scheduling strategy for multiple orders;
[0068] The first relation is:
[0069]
[0070] Among them, pheromonestij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter.
[0071] In some embodiments, the order production scheduling device may further include:
[0072] A pop-up module is used to randomly pop out multiple default orders from the optimal solution when it is determined that the optimal solution is not feasible, until the production sequence after the multiple default orders are popped out is feasible;
[0073] The third construction module is used to insert the multiple default orders that pop up one by one into the production sequence after the default orders pop up, so as to construct a second solution space;
[0074] A return module is used for returning to execute randomly popping out multiple default orders in the optimal solution when the second iteration stop condition is not met, until the production sequence after the multiple default orders are popped out is feasible;
[0075] A third determination module is used to determine whether the second optimal solution in the second solution space is feasible when the second iteration stop condition is met;
[0076] The second optimization module is used to optimize the second optimal solution when it is determined that the second optimal solution is feasible, so as to obtain a final production scheduling strategy for multiple orders.
[0077] In some embodiments, the pop-up module may include:
[0078] A first acquisition unit is used to acquire accepted orders and unaccepted orders in the production sequence corresponding to the optimal solution;
[0079] A first pop-up unit, used for randomly popping out a plurality of unaccepted orders that are in default;
[0080] A first determination unit is used to determine whether the production sequence after a plurality of unaccepted orders with defaults are ejected is feasible;
[0081] A second ejection unit is used to randomly eject all unaccepted orders with defaults when it is determined that the production sequence after ejecting multiple unaccepted orders is not feasible;
[0082] The second determination unit is used to determine whether the production sequence after all unaccepted orders with default are ejected is feasible;
[0083] The third pop-up unit is used to randomly pop out all the unaccepted orders with defaults and multiple accepted orders with defaults when it is determined that the production sequence after popping out all the unaccepted orders is not feasible, until the production sequence after popping out all the unaccepted orders with defaults and multiple accepted orders with defaults is feasible.
[0084] In some embodiments, the third building block further includes:
[0085] A second acquisition unit is used to acquire accepted orders and unreceived orders from the popped-up multiple default orders;
[0086] A first inserting unit is used to sort the accepted orders among the popped-up default orders according to the order production time, and insert the sorted accepted orders among the popped-up default orders one by one into the production sequence after the popped-up default orders;
[0087] A sorting unit, used for sorting the unaccepted orders in the popped-up default orders according to order production time after the accepted orders in the popped-up default orders are inserted, and the order production time is determined based on the order information;
[0088] The construction unit is used to insert the unaccepted orders in the sorted popped-up default orders one by one into the production sequence after the popped-up default orders, so as to construct a second solution space.
[0089] In some implementations, the first optimization module or the second optimization module may include:
[0090] A first initialization unit, used to initialize the fitness values of multiple preset operators in the optimization algorithm;
[0091] A third determining unit, used to determine the probability of each operator being selected according to the fitness values of the multiple operators;
[0092] A selection unit, used to randomly select an operator based on the probability of each operator being selected to optimize the optimal solution or the second optimal solution;
[0093] A first updating unit is used for updating the fitness value of each operator according to the following second relational expression when the optimized solution does not satisfy the third iteration stopping condition, and returning to execute determining the probability of each operator being selected according to the fitness values of the multiple operators;
[0094] A fourth determination unit, when the second iteration stop condition is met, determines the optimized solution corresponding to the iteration stop condition as the final production scheduling strategy for the multiple orders;
[0095] The second relationship is:
[0096] O i(t) =(1-α)O i(t-1) +βΔO i
[0097] Among them, ΔO i is the improvement of the solution after the current operator i is optimized for the tth time, O i(t)is the fitness value of operator i after t optimizations are completed, and α and β are preset constants between 0 and 1.
[0098] In some implementations, the third determining unit may include:
[0099] A first determining subunit, used to determine the probability of each operator being selected according to the fitness values of the multiple operators;
[0100] A second determination subunit is used to determine whether the probability of each operator being selected exceeds a preset threshold;
[0101] The third determining subunit is used to determine the probability of selecting the operator corresponding to the probability exceeding the threshold as the preset probability when the probability of any one of the operators in each operator exceeds the preset threshold.
[0102] In some embodiments, the order production scheduling device may further include:
[0103] The fourth determination module is used to determine a preset number of solutions in the second solution space as solutions to be optimized based on the Pareto dominance principle and the profit loss and default days corresponding to each solution in the second solution space when the second optimal solution is not feasible; the profit loss is determined based on the unaccepted orders with default in the solution, and the default days are determined based on the accepted orders with default in the solution;
[0104] A deletion module is used to delete the defaulted orders in each solution to be optimized to obtain a second solution to be optimized;
[0105] The third optimization module is used to optimize the second solution to be optimized to obtain a final production scheduling strategy for multiple orders.
[0106] In some implementations, the third optimization module may include:
[0107] A second initialization unit, used to initialize the fitness values of multiple preset operators in the optimization algorithm;
[0108] A fourth determining unit, configured to determine the probability of each operator being selected according to the fitness values of the multiple operators;
[0109] An optimization unit, configured to randomly select an operator based on the probability of each operator being selected to optimize the second solution to be optimized;
[0110] A second updating unit is used for updating the fitness value of each operator according to the following second relational expression when the optimized solution does not satisfy the fourth iteration stop condition, and returning to execute determining the probability of each operator being selected according to the fitness values of the multiple operators;
[0111] a fifth determining unit, configured to determine, when the fourth iteration stopping condition is met, the optimized solution corresponding to the iteration stopping condition being met as the final production scheduling strategy for the multiple orders;
[0112] The second relationship is:
[0113] O i(t) =(1-α)O i(t-1) +βΔO i .
[0114] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the steps of the production scheduling method for orders as in any one of the embodiments of the first aspect are implemented.
[0115] In a fourth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the steps of the production scheduling method for orders in any embodiment of the first aspect.
[0116] The order production scheduling method, device, equipment and computer-readable storage medium of the embodiments of the present invention can obtain order information of multiple orders, and then initialize the number of ants of the ant colony algorithm according to the number of orders, and then determine the two-dimensional pheromone matrix according to the obtained order information, and then construct a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix, and determine whether the ant colony algorithm satisfies the iteration stop condition. If the iteration stop condition of the ant colony algorithm is not met, the pheromones in the two-dimensional pheromone matrix are updated according to the first relationship, and then the above iterative process is repeated until the iteration stop condition of the ant colony algorithm is met. Determine whether the optimal solution in the first solution space after the iteration is feasible. If the optimal solution is feasible, optimize the optimal solution to obtain the final production scheduling strategy for multiple orders. Since the multiple production sequences of the orders are obtained based on the ant colony algorithm, the multiple production sequences obtained can be the production sequences with the highest pheromone concentration in the two-dimensional pheromone matrix after multiple iterations, that is, the production sequences with fewer default days. Moreover, since the production sequence is optimized after obtaining a production sequence with zero default days or the smallest default days, the production cost of the optimized production sequence can be reduced. Furthermore, order production based on the optimized production sequence can maximize the company's production capacity and product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0118] Figure 1 It is a flowchart of a production scheduling method for an order provided by an embodiment of the present invention;
[0119] Figure 2 It is a flowchart of another method for production scheduling of orders provided by an embodiment of the present invention;
[0120] Figure 3 It is a structural schematic diagram of a production scheduling device for an order provided by an embodiment of the present invention;
[0121] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0122] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present invention, rather than to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0123] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0124] In order to solve the problems in the prior art, embodiments of the present invention provide a production scheduling method, apparatus, device and computer-readable storage medium for an order.
[0125] The following first introduces the order production scheduling method provided by an embodiment of the present invention.
[0126] Figure 1 FIG. 1 is a flow chart showing a method for scheduling production of an order provided by an embodiment of the present invention. Figure 1As shown, the method may include the following steps:
[0127] S110, obtaining order information of multiple orders;
[0128] S120, initializing the number of ants of the ant colony algorithm according to the order quantities of the multiple orders;
[0129] S130, determining a two-dimensional pheromone matrix according to order information of the plurality of orders, wherein the pheromone Dij in the two-dimensional pheromone matrix is the pheromone between order i and order j, and the pheromone Dij is used to represent the probability of producing order j after order i is produced, and i and j are positive integers;
[0130] S140, constructing a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix, where the solutions in the first solution space are production sequences of multiple orders;
[0131] S150, when the iteration stop condition of the ant colony algorithm is not met, updating the pheromones in the two-dimensional pheromone matrix according to the following first relational expression; and returning to construct a solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix;
[0132] S160. When the iteration stop condition of the ant colony algorithm is met, determine whether the optimal solution in the solution space is feasible, and the optimal solution is a production sequence with zero default days or the minimum default days;
[0133] S170. When it is determined that the optimal solution is feasible, the optimal solution is optimized to obtain a final production scheduling strategy for multiple orders;
[0134] The first relation is:
[0135]
[0136] Among them, pheromones tij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter.
[0137] Thus, the order information of multiple orders can be obtained, and then the number of ants of the ant colony algorithm is initialized according to the number of orders, and then the two-dimensional pheromone matrix is determined according to the obtained order information. Then, the first solution space is constructed according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix, and it is determined whether the ant colony algorithm meets the iteration stop condition. If the iteration stop condition of the ant colony algorithm is not met, the pheromone in the two-dimensional pheromone matrix is updated according to the first relationship, and then the above iteration process is repeated until the iteration stop condition of the ant colony algorithm is met. Determine whether the optimal solution in the first solution space after the iteration is completed is feasible. If the optimal solution is feasible, optimize the optimal solution to obtain the final production scheduling strategy for multiple orders. Since it is based on multiple production sequences of orders obtained by the ant colony algorithm, the multiple production sequences obtained can be the production sequences with the highest pheromone concentration in the two-dimensional pheromone matrix after multiple iterations, that is, the production sequences with fewer default days, and since the production sequence with zero default days or the smallest default days is obtained, the above production sequence is optimized, so the production cost of the optimized production sequence can be reduced. Further, order production based on the optimized production sequence can maximize the production capacity and product quality of the enterprise.
[0138] In some embodiments, in S110 , the order information may include at least one of the order quantity, the deadline of the order, the production time of the order, the processing requirements of the order, and the size of the order.
[0139] In some embodiments, before S110, the order production scheduling method may also include determining the optimal number of production personnel on each production line in multiple order production lines based on a genetic algorithm or historical experience, wherein the optimal number of production personnel on each production line may include the minimum number of workers set for the production line while completing the production tasks corresponding to the production line.
[0140] In some embodiments, in S120, the ant colony algorithm is a probabilistic algorithm for finding an optimized path. In the ant colony algorithm, ants release a substance called pheromone on the path they pass through. The ants in the ant colony have the ability to perceive pheromones, that is, the higher the pheromone content of the path, the more ants pass through it, and the better the concentration of pheromones on this path, thereby forming a positive feedback, so that the path with the highest concentration of pheromones after the ant colony algorithm iteration is the optimal path. Corresponding to this application, the path with the highest pheromone concentration is the optimal production sequence.
[0141] In some specific examples, the initial pheromone of the ant colony algorithm can be the inverse of the total number of orders, and the number of ants can be set in direct proportion to the total number of orders.
[0142] In some embodiments, in S130, the two-dimensional pheromone matrix may include multiple elements, each element represents the pheromone concentration between any two orders, and each element is different from other elements. The two-dimensional pheromone matrix can be set by those skilled in the art based on conventional calculation techniques, and will not be described in detail here.
[0143] In some specific examples, the elements in the two-dimensional pheromone matrix can be expressed as Dij is the pheromone between order i and order j, and the pheromone Dij is used to represent the probability of producing order j after order i is produced, and i and j are positive integers.
[0144] In some implementations, in S140, the solution may include a production sequence of a corresponding order generated by an ant algorithm. The solution space may include a connected space consisting of a plurality of the above solutions.
[0145] In some embodiments, in the above two-dimensional pheromone matrix, ants can select elements in the two-dimensional pheromone matrix based on the roulette method, where the probability of selecting each element can be calculated based on the following relationship:
[0146]
[0147] The earliest production date can be determined based on the production date corresponding to the current order in the production sequence in the previous iteration. The production time can be determined based on the size of the order and the number of workers on the production line that produces the order. After each iteration, the probabilities of the elements in the two-dimensional pheromone matrix can be updated based on the above relationship. Then in the next iteration, the ants can obtain the probabilities of different elements and then use the roulette method to select elements based on the probabilities of different elements.
[0148] In some embodiments, S140 may specifically include: making ants pass through the above-mentioned two-dimensional pheromone matrix according to the ant colony algorithm, and then using the order of different elements in the two-dimensional pheromone matrix passed by the ants as the arrangement order of the elements, and each element represents the processing order between different orders, so the production sequence of the order can be obtained according to the obtained arrangement order of the elements, and the obtained production sequence is a solution.
[0149] In some embodiments, in S150, the iteration stop condition may include that the number of iterations of the ant colony algorithm reaches a preset number of iterations, and the preset number of iterations may be customized based on the user. It is also possible to include that the optimal solution in the constructed solution space meets the feasible condition. In some embodiments, the feasible condition may be that the production sequence obtained by the ant colony algorithm meets the order processing requirements, and the default days of the orders in the production sequence are zero. The order processing requirements may be customized by the user.
[0150] In some implementations, the first relationship may include:
[0151]
[0152] Among them, pheromones tij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter.
[0153] In some embodiments, ρ may include a value less than 1 set by a user, and m may include a hyperparameter determined by the user according to the number of orders, where m is a positive integer. The total default days may include the sum of the default days of each default order in the production sequence corresponding to the order production sequence obtained after any ant passes through the two-dimensional pheromone matrix.
[0154] In some embodiments, S150 may specifically include: after any ant passes through the above-mentioned two-dimensional pheromone matrix, a solution is obtained, and then a judgment is made as to whether the total number of ants that have passed through exceeds a preset number of iterations; if the total number of ants that have passed through exceeds the preset number of iterations, it is determined whether the solution generated by the ants is feasible; if not feasible, the step of constructing a solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix is returned, and the next ant is used to pass through the two-dimensional pheromone matrix for the next round of iterative update.
[0155] In some specific examples, in S160, satisfying the iteration stop condition of the ant colony algorithm may include the number of ants passing through the two-dimensional pheromone matrix exceeding the preset number of iterations. At this time, the iteration can be stopped and the optimal solution in the constructed solution space can be obtained, wherein the optimal solution may include a production sequence with zero default days or the smallest default days. After obtaining the optimal solution in the solution space, it can be determined whether there are default orders in the production sequence corresponding to the optimal solution. If so, it is determined that the optimal solution is not feasible. If not, it is determined that the optimal solution is feasible.
[0156] In some implementations, in S170, optimizing the optimal solution may include:
[0157] Initialize the fitness values of multiple preset operators in the optimization algorithm;
[0158] Determine the probability of each operator being selected according to the fitness values of multiple operators;
[0159] Randomly select an operator based on the probability of each operator being selected to optimize the optimal solution or the second optimal solution;
[0160] When the optimized solution does not satisfy the third iteration stop condition, the fitness value of each operator is updated according to the following second relational expression, and the process of determining the probability of each operator being selected according to the fitness values of multiple operators is returned to be executed;
[0161] When the second iteration stop condition is met, the optimized solution corresponding to the iteration stop condition is determined as the final production scheduling strategy for the multiple orders;
[0162] The second relationship is:
[0163] O i(t) =(1-α)O i(t-1) +βΔO i
[0164] Among them, ΔO i is the improvement of the solution after the current operator i is optimized for the tth time, O i(t) is the fitness value of operator i after t optimizations are completed, and α and β are preset constants between 0 and 1.
[0165] In some implementations, the plurality of preset operators may include at least two of: 2opt, 3opt, two-exchange, and reverse, wherein each optimization operator corresponds to a different optimization method.
[0166] In some implementations, initializing the fitness values of multiple preset operators in the optimization algorithm may include setting the fitness values of the multiple preset operators to the same user-defined value.
[0167] In some implementations, each operator corresponds to a fitness value, and the probability of the operator being selected is determined according to the fitness value corresponding to each operator. After initializing the fitness value corresponding to each operator, the fitness value of each operator is the same, so the probability of each operator being selected is the same.
[0168] In some embodiments, optimizing the optimal solution or the second optimal solution based on the operator may include, after selecting the operator, optimizing the optimal solution or the second optimal solution according to an optimization method corresponding to the operator.
[0169] In some specific examples, if the selected optimization operator is 2opt, the optimization method for the optimal solution based on the 2opt operator may include, in the production sequence corresponding to the optimal solution, according to the sorting method of the production sequence, randomly selecting an order at the head and tail of the production sequence, then exchanging the processing order of the two orders, and then obtaining whether the total default days corresponding to the production sequence after the exchange is 0, if not 0, then selecting another order at the tail to exchange with the order at the head of the production sequence, and then re-determining whether the total default days corresponding to the production sequence after the exchange is 0, and when the total default days is 0, stopping this optimization, and obtaining the production cost corresponding to the optimized production sequence. The production cost may include at least one of the production cost of the production line, the wages of the production workers, and the storage cost of the storage order, and the production cost may be determined based on user customization, and the production cost is not specifically limited here.
[0170] In some embodiments, the third iteration stop condition may include that the number of optimizations meets a preset number or that the production cost corresponding to the optimized production sequence meets a preset cost. Both the preset number and the preset cost may be customized by the user.
[0171] In some embodiments, when the solution obtained after any optimization does not satisfy the third iteration stop condition, it is necessary to update the fitness value of the above operator according to the production sequence corresponding to the optimized solution and the second relationship, and then determine the probability of each operator being selected according to the fitness value of the updated operator, and then select the operator using the roulette method, and then use the selected operator to optimize the solution after this optimization for the next time.
[0172] In some implementations, the second relationship may include:
[0173] O i(t) =(1-α)O i(t-1) +βΔO i
[0174] Among them, ΔO i is the improvement of the solution after the current operator i is optimized for the tth time, O i(t) is the fitness value of operator i after t optimizations are completed, and α and β are preset constants between 0 and 1.
[0175] The improvement of the solution may include obtaining the production cost corresponding to the production sequence corresponding to the solution before any optimization, and then obtaining the production cost corresponding to the production sequence corresponding to the solution after the optimization is completed. The improvement of the solution may include the difference between the production cost corresponding to the solution after the optimization is completed and the production cost corresponding to the solution before the optimization is completed. α and β may include user-defined values.
[0176] In some implementations, determining the probability of each operator being selected according to the fitness values of the multiple operators may further include:
[0177] Determine the probability of each operator being selected according to the fitness values of multiple operators;
[0178] Determine whether the probability of each operator being selected exceeds a preset threshold;
[0179] When the probability of any one of the operators in each operator exceeds a preset threshold, the probability of the operator corresponding to the probability exceeding the threshold being selected is determined as the preset probability.
[0180] In some implementations, the preset threshold may include 10% to 60%. After re-determining the fitness value corresponding to each operator through the second relationship, and then determining the probability value of the operator through the current fitness value, it is necessary to determine whether the above probability value meets the preset, and when the probability value of the operator exceeds the preset threshold, the probability exceeding the preset threshold can be determined as the probability value set by the user.
[0181] Therefore, since the probability value exceeding the preset threshold is set as the preset probability, it can prevent the probability of a certain operator being selected from multiple operators being too low, resulting in a low degree of participation of this operator in the optimization, which in turn causes the optimization result to fail to meet user needs.
[0182] In some implementations, when the second iteration stop condition is met, the production sequence of multiple orders corresponding to the optimized solution that meets the iteration stop condition can be determined as the final production scheduling strategy.
[0183] Therefore, when the optimal solution with a total number of default days of zero is obtained, the production sequence corresponding to the optimal solution is optimized, and then the optimized production sequence with lower production cost is obtained, which can reduce the user's production cost when producing based on the optimized production sequence.
[0184] In some embodiments, when the iteration stop condition of the ant colony algorithm is met, the optimal solution in the generated solution space may be feasible. In this case, an embodiment of the present application provides another production scheduling method for orders.
[0185] Figure 2 FIG. 2 is a flow chart showing another method for scheduling production of an order provided by an embodiment of the present invention. Figure 2 As shown, the production scheduling method may include the following steps:
[0186] S210, when it is determined that the optimal solution is not feasible, randomly popping out multiple default orders from the optimal solution until the production sequence after the multiple default orders are popped out is feasible;
[0187] S220, inserting the multiple default orders that pop up one by one into the production sequence after the default order pops up, to construct a second solution space;
[0188] S230, when the second iteration stop condition is not met, returning to execute to randomly pop out multiple default orders in the optimal solution until the production sequence after the multiple default orders are popped out is feasible;
[0189] S240, when the second iteration stop condition is met, determining whether the second optimal solution in the second solution space is feasible;
[0190] S250: When it is determined that the second optimal solution is feasible, the second optimal solution is optimized to obtain a final production scheduling strategy for multiple orders.
[0191] Therefore, when the optimal solution is not feasible, multiple orders with defaults in the production sequence corresponding to the optimal solution are popped out, and then multiple default orders are inserted into the production sequence after the default orders are popped out, so that the production order of the orders in the production sequence corresponding to the original infeasible optimal solution can be changed, so that the production sequence of the orders after the production order is changed can be obtained, and then it is determined whether there is a feasible production sequence in the production sequence after the production order is changed, so as to obtain a feasible production sequence. By changing the production order of the orders in the infeasible production sequence, the solution with the minimum number of default days or the solution with zero default days in the production sequence after the production order is changed is obtained, and then the above solution is optimized, so that the production sequence with the minimum number of default days can be obtained, so that the user can maximize the company's production capacity and product quality when performing production and processing based on the obtained production sequence with the minimum number of default days.
[0192] In some embodiments, in S210, the orders with default may include orders whose production time is shorter due to the later production order of the orders in the production sequence, but the default is caused by the later earliest production time.
[0193] In some implementations, S210 may specifically include:
[0194] Obtain the accepted orders and unaccepted orders in the production sequence corresponding to the optimal solution;
[0195] Multiple unaccepted orders with defaults pop up randomly;
[0196] Determine whether the production sequence is feasible after multiple unaccepted orders with defaults are ejected;
[0197] If it is determined that the production sequence after ejecting multiple unaccepted orders is not feasible, all unaccepted orders with defaults are randomly ejected;
[0198] Determine whether the production sequence after ejecting all unaccepted orders with default is feasible;
[0199] When it is determined that the production sequence after ejecting all unaccepted orders is not feasible, all unaccepted orders with defaults and multiple accepted orders with defaults are randomly ejected until the production sequence after ejecting all unaccepted orders with defaults and multiple accepted orders with defaults is feasible.
[0200] In some implementations, an order may include an order initiated to the user by a buyer user corresponding to the user acquired by the user. The above orders may include orders that the user has confirmed to accept and orders that have not been accepted.
[0201] In some implementations, unaccepted orders with defaults may be ejected first, and if the production sequence is still not feasible after all unaccepted orders with defaults are ejected, accepted orders with defaults may be ejected.
[0202] Therefore, since the unaccepted orders with defaults are popped up first, when the production sequence of the unaccepted orders with defaults is still not feasible, the accepted orders with defaults will be popped up, which can enable users to avoid defaults of accepted orders as much as possible, thereby reducing the risk of user defaults.
[0203] In some implementations, S220 may specifically include:
[0204] Get the accepted orders and unreceived orders among the multiple default orders that pop up;
[0205] Sort the accepted orders among the default orders that pop up according to the order production time, and insert the sorted accepted orders among the default orders that pop up into the production sequence after the default orders pop up one by one;
[0206] After the accepted orders in the pop-up default orders are inserted, the unaccepted orders in the pop-up default orders are sorted according to the order production time, and the order production time is determined based on the order information;
[0207] The unaccepted orders in the sorted popped-up default orders are inserted one by one into the production sequence after the popped-up default orders to construct the second solution space.
[0208] In some implementations, the accepted orders among the popped-up default orders may be preferentially inserted into the production sequence after the popped-up default orders.
[0209] In some implementations, the unaccepted orders and accepted orders with defaults may be sorted according to the production time required for the orders, and then inserted into the production sequence after the default orders are popped up in order of production time from low to high.
[0210] In some embodiments, after all default orders are inserted into the production sequence after the default orders are popped out, a solution in the second solution space is obtained. Then, it is determined whether the number of current solutions reaches the number of solutions preset in the second iteration stop condition or whether the current solution is feasible. When any one of the above second iteration stop conditions is met, the default orders are stopped from being popped out and the iteration is stopped.
[0211] In some embodiments, when any one of the solutions after iteration is feasible, the currently feasible solution can be determined as the second optimal solution. When the number of solutions in the second solution space meets the preset number of solutions and there is no feasible solution in the second solution space, the order production scheduling method can also include:
[0212] In the case that the second optimal solution is not feasible, based on the Pareto dominance principle and the profit loss and default days corresponding to each solution in the second solution space, a preset number of solutions in the second solution space are determined as solutions to be optimized; the profit loss is determined based on the unaccepted orders with default in the solution, and the default days are determined based on the accepted orders with default in the solution;
[0213] Delete the defaulted orders in each solution to be optimized to obtain a second solution to be optimized;
[0214] The second solution to be optimized is optimized to obtain the final production scheduling strategy for multiple orders.
[0215] In some embodiments, determining the profit loss based on the unaccepted order due to the breach of contract may specifically include: obtaining the order amount and the processing cost of the order, determining the profit of the processing order, and determining the profit of the processing order as the profit loss. In this application, the method for determining the profit loss based on the unaccepted order due to the breach of contract is not limited, and the user may perform custom settings and calculations.
[0216] In some embodiments, the application of the Pareto dominance principle in the present application may include sorting the production sequences based on the profit loss and default days corresponding to each production sequence, and obtaining multiple production sequences with smaller profit losses and smaller default days.
[0217] In some embodiments, after obtaining a solution with a smaller profit loss and default days in the second solution space based on the Pareto dominance principle, the defaulted orders in the production sequence corresponding to the above solution can be deleted, and then the solution after deleting the defaulted orders can be determined as the second solution to be optimized.
[0218] In some implementations, the process of optimizing the second solution to be optimized is the same as the process of optimizing the optimal solution and the second optimal solution in the above steps, and will not be repeated here.
[0219] Therefore, since it is based on the Pareto dominance principle to obtain solutions with smaller profit losses and default days from the infeasible solutions in the second solution space, and then delete the default orders in the production sequence corresponding to these solutions to obtain a feasible second solution to be optimized, and then the second solution to be optimized is converted into a feasible second solution to be optimized, and then the second solution to be optimized is optimized to obtain the final production scheduling strategy. When a feasible solution cannot be obtained, a solution with smaller profit loss and default days can be obtained, so that when processing is performed based on the production sequence corresponding to the above solution, the user's profit loss is smaller.
[0220] It should be noted that the application scenarios described in the above-mentioned disclosed embodiments are intended to more clearly illustrate the technical solutions of the disclosed embodiments, and do not constitute a limitation of the technical solutions provided by the disclosed embodiments. A person of ordinary skill in the art can appreciate that with the emergence of new application scenarios, the technical solutions provided by the disclosed embodiments are also applicable to similar technical problems.
[0221] Based on the same inventive concept, the embodiment of the present application also provides a production scheduling device for an order, such as Figure 3 The structure diagram of the production scheduling device for orders provided in the embodiment of the present application is shown. Figure 3 The apparatus shown may include:
[0222] An acquisition module 301 is used to acquire order information of multiple orders;
[0223] An initialization module 302 is used to initialize the number of ants of the ant colony algorithm according to the order quantity of multiple orders;
[0224] The first determination module 303 is used to determine a two-dimensional pheromone matrix according to the order information of the multiple orders, where the pheromone Dij in the two-dimensional pheromone matrix is the pheromone between order i and order j, and the pheromone Dij is used to represent the probability of producing order j after order i is produced, where i and j are positive integers;
[0225] The first construction module 304 is used to construct a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix. The solutions in the first solution space are production sequences of multiple orders.
[0226] The second construction module 305 is used to update the pheromones in the two-dimensional pheromone matrix according to the following first relationship when the iteration stop condition of the ant colony algorithm is not met; and return to construct a solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix;
[0227] The second determination module 306 is used to determine whether the optimal solution in the solution space is feasible when the iteration stop condition of the ant colony algorithm is met. The optimal solution is a production sequence with zero default days or the minimum default days;
[0228] The first optimization module 307 is used to optimize the optimal solution when it is determined that the optimal solution is feasible, so as to obtain a final production scheduling strategy for multiple orders;
[0229] The first relation is:
[0230]
[0231] Among them, pheromones tij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter.
[0232] Thus, the order information of multiple orders can be obtained, and then the number of ants of the ant colony algorithm is initialized according to the number of orders, and then the two-dimensional pheromone matrix is determined according to the obtained order information. Then, the first solution space is constructed according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix, and it is determined whether the ant colony algorithm meets the iteration stop condition. If the iteration stop condition of the ant colony algorithm is not met, the pheromone in the two-dimensional pheromone matrix is updated according to the first relationship, and then the above iteration process is repeated until the iteration stop condition of the ant colony algorithm is met. Determine whether the optimal solution in the first solution space after the iteration is completed is feasible. If the optimal solution is feasible, optimize the optimal solution to obtain the final production scheduling strategy for multiple orders. Since it is based on multiple production sequences of orders obtained by the ant colony algorithm, the multiple production sequences obtained can be the production sequences with the highest pheromone concentration in the two-dimensional pheromone matrix after multiple iterations, that is, the production sequences with fewer default days, and since the production sequence with zero default days or the smallest default days is obtained, the above production sequence is optimized, so the production cost of the optimized production sequence can be reduced. Further, order production based on the optimized production sequence can maximize the production capacity and product quality of the enterprise.
[0233] In some implementations, the order production scheduling device 300 may further include:
[0234] The pop-up module can be used to randomly pop out multiple default orders from the optimal solution when it is determined that the optimal solution is not feasible, until the production sequence after popping out multiple default orders is feasible;
[0235] The third construction module can be used to insert the multiple default orders that pop up one by one into the production sequence after the default orders pop up, so as to construct a second solution space;
[0236] The return module can be used to return to the execution of randomly popping out multiple default orders in the optimal solution when the second iteration stop condition is not met, until the production sequence after popping out multiple default orders is feasible;
[0237] A third determination module may be used to determine whether a second optimal solution in the second solution space is feasible when a second iteration stop condition is met;
[0238] The second optimization module can be used to optimize the second optimal solution when it is determined that the second optimal solution is feasible, so as to obtain a final production scheduling strategy for multiple orders.
[0239] Therefore, when the optimal solution is not feasible, multiple orders with defaults in the production sequence corresponding to the optimal solution are popped out, and then multiple default orders are inserted into the production sequence after the default orders are popped out, so that the production order of the orders in the production sequence corresponding to the original infeasible optimal solution can be changed, so that the production sequence of the orders after the production order is changed can be obtained, and then it is determined whether there is a feasible production sequence in the production sequence after the production order is changed, so as to obtain a feasible production sequence. By changing the production order of the orders in the infeasible production sequence, the solution with the minimum number of default days or the solution with zero default days in the production sequence after the production order is changed is obtained, and then the above solution is optimized, so that the production sequence with the minimum number of default days can be obtained, so that the user can maximize the company's production capacity and product quality when performing production and processing based on the obtained production sequence with the minimum number of default days.
[0240] In some embodiments, the pop-up module may include:
[0241] A first acquisition unit may be used to acquire accepted orders and unaccepted orders in a production sequence corresponding to an optimal solution;
[0242] A first pop-up unit may be used to randomly pop-up a plurality of unaccepted orders that are in default;
[0243] The first determination unit may be used to determine whether the production sequence after a plurality of unaccepted orders with defaults are ejected is feasible;
[0244] The second ejection unit may be used to randomly eject all unaccepted orders with defaults when it is determined that the production sequence after ejecting multiple unaccepted orders is not feasible;
[0245] The second determination unit may be used to determine whether the production sequence after all unaccepted orders with default are ejected is feasible;
[0246] The third pop-up unit can be used to randomly pop out all the unaccepted orders with defaults and multiple accepted orders with defaults when it is determined that the production sequence after popping out all the unaccepted orders is not feasible, until the production sequence after popping out all the unaccepted orders with defaults and multiple accepted orders with defaults is feasible.
[0247] In some embodiments, the third building block further includes:
[0248] The second acquisition unit may be used to acquire the accepted orders and the unreceived orders among the multiple default orders that pop up;
[0249] The first inserting unit may be used to sort the accepted orders among the popped-up default orders according to the order production time, and insert the sorted accepted orders among the popped-up default orders one by one into the production sequence after the popped-up default orders;
[0250] A sorting unit may be used to sort the unaccepted orders in the popped-up default orders according to order production time after the accepted orders in the popped-up default orders are inserted, and the order production time is determined based on the order information;
[0251] The construction unit can be used to insert the unaccepted orders in the sorted popped-up default orders one by one into the production sequence after the popped-up default orders, so as to construct a second solution space.
[0252] Therefore, since the unaccepted orders with defaults are popped up first, when the production sequence of the unaccepted orders with defaults is still not feasible, the accepted orders with defaults will be popped up, which can enable users to avoid defaults of accepted orders as much as possible, thereby reducing the risk of user defaults.
[0253] In some implementations, the first optimization module 306 or the second optimization module may include:
[0254] A first initialization unit may be used to initialize the fitness values of multiple preset operators in the optimization algorithm;
[0255] A third determining unit may be used to determine the probability of each operator being selected according to the fitness values of the multiple operators;
[0256] A selection unit may be used to randomly select an operator to optimize the optimal solution or the second optimal solution based on the probability of each operator being selected;
[0257] A first updating unit may be used to update the fitness value of each operator according to the following second relational expression when the optimized solution does not satisfy the third iteration stop condition, and return to execute determining the probability of each operator being selected according to the fitness values of the multiple operators;
[0258] A fourth determination unit, when the second iteration stop condition is met, determines the optimized solution corresponding to the iteration stop condition as the final production scheduling strategy for the multiple orders;
[0259] The second relationship is:
[0260] O i(t) =(1-α)O i(t-1) +βΔO i
[0261] Among them, ΔO i is the improvement of the solution after the current operator i is optimized for the tth time, O i(t) is the fitness value of operator i after t optimizations are completed, and α and β are preset constants between 0 and 1.
[0262] Therefore, when the optimal solution with a total number of default days of zero is obtained, the production sequence corresponding to the optimal solution is optimized, and then the optimized production sequence with lower production cost is obtained, which can reduce the user's production cost when producing based on the optimized production sequence.
[0263] In some implementations, the third determining unit may include:
[0264] A first determination subunit may be used to determine the probability of each operator being selected according to the fitness values of the multiple operators;
[0265] The second determination subunit may be used to determine whether the probability of each operator being selected exceeds a preset threshold;
[0266] The third determining subunit may be configured to determine, when the probability of any one of the operators in each operator exceeds a preset threshold, the probability of the operator corresponding to the probability exceeding the threshold being selected as the preset probability.
[0267] Therefore, since the probability value exceeding the preset threshold is set as the preset probability, it can prevent the probability of a certain operator being selected from multiple operators being too low, resulting in a low degree of participation of this operator in the optimization, which in turn causes the optimization result to fail to meet user needs.
[0268] In some embodiments, the order production scheduling device may further include:
[0269] The fourth determination module, when the second optimal solution is not feasible, can be used to determine a preset number of solutions in the second solution space as solutions to be optimized based on the Pareto dominance principle and the profit loss and default days corresponding to each solution in the second solution space; the profit loss is determined based on the unaccepted orders with default in the solution, and the default days are determined based on the accepted orders with default in the solution;
[0270] A deletion module can be used to delete the defaulted orders in each solution to be optimized to obtain a second solution to be optimized;
[0271] The third optimization module can be used to optimize the second solution to be optimized to obtain a final production scheduling strategy for multiple orders.
[0272] In some implementations, the third optimization module may include:
[0273] A second initialization unit may be used to initialize the fitness values of multiple preset operators in the optimization algorithm;
[0274] A fourth determining unit may be used to determine the probability of each operator being selected according to the fitness values of the multiple operators;
[0275] An optimization unit, which can be used to randomly select an operator based on the probability of each operator being selected to optimize the second solution to be optimized;
[0276] The second updating unit may be used to update the fitness value of each operator according to the following second relational expression when the optimized solution does not satisfy the fourth iteration stop condition, and return to execute determining the probability of each operator being selected according to the fitness values of the multiple operators;
[0277] A fifth determining unit may be configured to determine, when the fourth iteration stopping condition is met, the optimized solution corresponding to the iteration stopping condition being met as the final production scheduling strategy for the multiple orders;
[0278] The second relationship is:
[0279] O i(t) =(1-α)O i(t-1) +βΔO i .
[0280] Therefore, since it is based on the Pareto dominance principle to obtain solutions with smaller profit losses and default days from the infeasible solutions in the second solution space, and then delete the default orders in the production sequence corresponding to these solutions to obtain a feasible second solution to be optimized, and then the second solution to be optimized is converted into a feasible second solution to be optimized, and then the second solution to be optimized is optimized to obtain the final production scheduling strategy. When a feasible solution cannot be obtained, a solution with smaller profit loss and default days can be obtained, so that when processing is performed based on the production sequence corresponding to the above solution, the user's profit loss is smaller.
[0281] Figure 4 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention is shown.
[0282] The electronic device may include a processor 401 and a memory 402 storing computer program instructions.
[0283] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0284] The memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 402 may include a removable or non-removable (or fixed) medium, or the memory 402 is a non-volatile solid-state memory. The memory 402 may be inside or outside the integrated gateway disaster recovery device.
[0285] In one example, the memory 402 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0286] The memory 402 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0287] The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement Figure 1 or Figure 2 The method / steps S110 to S170 or S210 to S250 in the illustrated embodiment, and achieving Figure 1 or Figure 2 The corresponding technical effects achieved by executing the methods / steps in the example shown are not repeated here for the sake of brevity.
[0288] In one example, the electronic device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0289] The communication interface 403 is mainly used to implement the communication between the modules, devices, units and / or equipment in the embodiment of the present invention.
[0290] Bus 410 includes hardware, software or both, and the components of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), Hyper Transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.
[0291] The electronic device can execute the production scheduling method of the order in the embodiment of the present application, thereby realizing the combination Figures 1 to 3 A method and apparatus for scheduling production of orders are described.
[0292] In addition, in combination with the production scheduling method for orders in the above embodiments, the embodiment of the present invention can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the production scheduling methods for orders in the above embodiments is implemented.
[0293] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0294] The functional blocks shown in the above structured block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0295] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0296] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0297] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A production scheduling method for an order, characterized in that: The method comprises: Get order information for multiple orders; Initializing the number of ants of the ant colony algorithm according to the order quantity of the multiple orders; According to the order information of the plurality of orders, a two-dimensional pheromone matrix is determined, wherein the pheromone Dij in the two-dimensional pheromone matrix is the pheromone between order i and order j, and the pheromone Dij is used to characterize the probability of producing order j after order i is produced, and i and j are positive integers; Constructing a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix, wherein the solutions in the first solution space are the production sequences of the multiple orders; When the iteration stop condition of the ant colony algorithm is not met, the pheromones in the two-dimensional pheromone matrix are updated according to the following first relational expression; and the step of constructing a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix is returned; Under the condition that the iteration stop condition of the ant colony algorithm is met, determining whether the optimal solution in the solution space is feasible, the optimal solution being a production sequence with zero default days or the minimum default days; When it is determined that the optimal solution is feasible, optimizing the optimal solution to obtain a final production scheduling strategy for the multiple orders; The first relation is: Among them, pheromones tij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter; The method further comprises: When it is determined that the optimal solution is not feasible, a plurality of default orders are randomly popped out from the optimal solution until the production sequence after the plurality of default orders are popped out is feasible; Inserting the popped-up multiple default orders one by one into the production sequence after the popped-up default orders, to construct a second solution space; If the second iteration stop condition is not met, returning to the step of randomly popping out a plurality of default orders from the optimal solution until the production sequence after the plurality of default orders are popped out is feasible; When a second iteration stop condition is met, determining whether a second optimal solution in the second solution space is feasible; When it is determined that the second optimal solution is feasible, optimizing the second optimal solution to obtain a final production scheduling strategy for the multiple orders; Inserting the popped-up multiple default orders one by one into the production sequence after the popped-up default order to construct a second solution space specifically includes: Obtain the accepted orders and unreceived orders among the multiple default orders that pop up; Sorting the accepted orders among the default orders that pop up according to the order production time, and inserting the sorted accepted orders among the default orders that pop up one by one into the production sequence after the default orders pop up; After the accepted orders in the default orders that pop up are inserted, the unaccepted orders in the default orders that pop up are sorted according to order production time, where the order production time is determined based on the order information; The unaccepted orders in the sorted popped-up default orders are inserted one by one into the production sequence after the popped-up default orders to construct a second solution space.
2. The method according to claim 1, characterized in that The randomly popping out multiple default orders from the optimal solution until the production sequence after the multiple default orders are popped out is feasible specifically includes: Obtaining accepted orders and unaccepted orders in the production sequence corresponding to the optimal solution; Randomly pop up multiple unaccepted orders that are in default; Determine whether the production sequence is feasible after multiple unaccepted orders with defaults are ejected; If it is determined that the production sequence after ejecting multiple unaccepted orders is not feasible, all unaccepted orders with defaults are randomly ejected; Determine whether the production sequence after ejecting all unaccepted orders with default is feasible; When it is determined that the production sequence after ejecting all unaccepted orders with defaults is not feasible, all unaccepted orders with defaults and multiple accepted orders with defaults are randomly ejected until the production sequence after ejecting all unaccepted orders with defaults and multiple accepted orders with defaults is feasible.
3. The method according to claim 1, characterized in that The optimizing the optimal solution to obtain the final production scheduling strategy for the multiple orders or optimizing the second optimal solution to obtain the final production scheduling strategy for the multiple orders specifically includes: Initialize the fitness values of multiple preset operators in the optimization algorithm; Determining the probability of each operator being selected according to the fitness values of the multiple operators; Randomly selecting an operator based on the probability of each operator being selected to optimize the optimal solution or the second optimal solution; When the optimized solution does not satisfy the third iteration stop condition, updating the fitness value of each operator according to the following second relational expression, and returning to execute the step of determining the probability of each operator being selected according to the fitness values of the multiple operators; When the second iteration stop condition is met, determining the optimized solution corresponding to the iteration stop condition as the final production scheduling strategy for the multiple orders; The second relation is: The x(n) =(1-a)O x(n-1) +βΔO x Among them, ΔO x is the improvement of the solution of the current operator x after the nth optimization, O x(n) is the fitness value of operator x after n optimizations are completed, and α and β are preset constants between 0 and 1.
4. The method according to claim 3, characterized in that Determining the probability of each operator being selected according to the fitness values of the multiple operators specifically includes: Determining the probability of each operator being selected according to the fitness values of the multiple operators; Determining whether the probability of each operator being selected exceeds a preset threshold; When the probability of any one of the operators exceeds a preset threshold, the probability of the operator corresponding to the probability exceeding the threshold being selected is determined as the preset probability.
5. The method according to claim 1, characterized in that The method further comprises: In the case where the second optimal solution is not feasible, based on the Pareto dominance principle and the profit loss and default days corresponding to each solution in the second solution space, a preset number of solutions in the second solution space are determined as solutions to be optimized; the profit loss is determined based on the unaccepted orders with default in the solution, and the default days are determined based on the accepted orders with default in the solution; Delete the defaulted orders in each solution to be optimized to obtain the second solution to be optimized; The second solution to be optimized is optimized to obtain a final production scheduling strategy for the multiple orders.
6. The method according to claim 5, characterized in that Optimizing the second solution to be optimized to obtain a final production scheduling strategy for the multiple orders specifically includes: Initialize the fitness values of multiple preset operators in the optimization algorithm; Determining the probability of each operator being selected according to the fitness values of the multiple operators; Randomly selecting an operator based on the probability of each operator being selected to optimize the second solution to be optimized; When the optimized solution does not satisfy the fourth iteration stop condition, updating the fitness value of each operator according to the following second relational expression, and returning to execute the step of determining the probability of each operator being selected according to the fitness values of the multiple operators; When the fourth iteration stop condition is met, determining the optimized solution corresponding to the iteration stop condition as the final production scheduling strategy for the multiple orders; The second relation is: The x(n) =(1-a)O x(n-1) +βΔO x ; ΔO x is the improvement of the solution of the current operator x after the nth optimization, O x(n) is the fitness value of operator x after n optimizations are completed, and α and β are preset constants between 0 and 1.
7. A production scheduling device for an order, characterized in that: The method for executing production scheduling of an order according to any one of claims 1 to 6, wherein the device comprises: The acquisition module is used to obtain the order information of multiple orders; An initialization module, used for initializing the number of ants of the ant colony algorithm according to the order quantity of the multiple orders; A first determination module is used to determine a two-dimensional pheromone matrix according to the order information of the multiple orders, wherein the pheromone Dij in the two-dimensional pheromone matrix is the pheromone between order i and order j, and the pheromone Dij is used to represent the probability of producing order j after order i is produced, and i and j are positive integers; A construction module is used to construct a first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix; when the iteration stop condition of the ant colony algorithm is not met, update the pheromones in the two-dimensional pheromone matrix according to the following first relationship; and return to the step of constructing the first solution space according to the ant colony algorithm, the number of ants and the two-dimensional pheromone matrix; A second determination module is used to determine whether the optimal solution in the solution space is feasible when the iteration stop condition of the ant colony algorithm is met, and the optimal solution is a production sequence with zero default days or the minimum default days; A first optimization module is used to optimize the optimal solution when it is determined that the optimal solution is feasible, so as to obtain a final production scheduling strategy for the multiple orders; The first relation is: Among them, pheromones tij is the pheromone concentration between order i and order j when the number of iterations is t, ρ is the pheromone volatility factor, a is the degree of proximity between order i and order j, and m is a positive integer hyperparameter.
8. An electronic device, characterized in that: The device comprises: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the production scheduling method for orders as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the production scheduling method for orders according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the production scheduling method for orders as described in any one of claims 1-6.
Citation Information
Patent Citations
Job-shop scheduling method based on multi-population evolution mechanism
CN101630380A
Flexible job shop scheduling method based on multi-species coevolution
CN101901425A