Production scheduling optimization method based on ALNS improved simulated annealing

文档序号:8820 发布日期:2021-09-17 浏览:27次 中文

1. A production scheduling optimization method based on ALNS improved simulated annealing is characterized by comprising the following steps:

step S1, constructing an initial coding chain: gathering the sub-processes required by each semi-finished product of the commodity, numbering and arranging each sub-process, wherein each sub-process corresponds to one number, and the construction of an initial coding chain is completed, and the number of each number in the initial coding chain represents at least the number of times that the corresponding sub-process of the initial coding chain needs to work;

step S2, decoding the initial coding chain: traversing the initial coding chain from left to right, judging whether the sub-process corresponding to the currently pointed number meets all processing conditions, if so, adding the sub-process corresponding to the currently pointed number into a result set, updating the resource occupation, then continuing traversing, if not, continuing traversing until the length of the initial coding chain is 0, acquiring the current result set and calculating the total working hour corresponding to the result;

step S3, generating a new coding chain: the method comprises the steps that a plurality of groups of destructive operators and repair operators are arranged, an adaptive large neighborhood search algorithm is adopted, the destructive operators are used for destroying a current coding chain, then the repair operators are used for repairing the destroyed coding chain to generate a new coding chain, and the adaptive large neighborhood search algorithm selects the operators based on weights of the destructive operators and the repair operators during iteration;

step S4, decoding the new coding chain: decoding the new coding chain generated in the step S3, wherein the decoding method is the same as the method for decoding the initial coding chain;

step S5, judging whether the current solution is replaced by the optimal solution and whether the current result set is replaced by the optimal result set by judging whether the current solution is better than the optimal solution and judging whether the poor solution is accepted by the probability P by adopting a Metropolis criterion of a simulated annealing algorithm;

and step S6, judging whether the iteration times are reached, if so, outputting an optimal result set, and otherwise, jumping to the step S3.

2. The ALNS improved simulated annealing-based scheduling optimization method according to claim 1, wherein the step S2 specifically comprises the following steps:

step S21, traversing the initial coding chain from left to right, judging whether the sub-process corresponding to the currently pointed number meets all processing conditions during traversal, if so, adding the sub-process corresponding to the currently pointed number into a result set, deleting the number from the initial coding chain, updating resource occupation, and jumping to step S22, and if not, jumping to step S23;

step S22, judging whether the length of the initial coding chain is 0, if so, acquiring a current result set and calculating the total working hours corresponding to the result, and if not, jumping to step S23;

and S23, judging whether the current position is traversed to the rightmost end of the initial coding chain, if so, setting the current position to jump to the leftmost end of the coding chain, then continuously traversing the initial coding chain from the current position to the right, if not, continuously traversing the initial coding chain from the current position to the right, judging whether the sub-processes corresponding to the currently pointed number meet all processing conditions during traversal, if so, adding the sub-processes corresponding to the currently pointed number to a result set, deleting the number from the initial coding chain, updating the resource occupation, and jumping to the step S22, and if not, repeating the step S23.

3. The method for scheduling optimization based on ALNS improved simulated annealing according to claim 1, wherein the processing conditions in step S2 at least comprise the following three processing conditions:

(1) the finished quantity of the front sub-process is more than or equal to the starting quantity of the rear sub-process;

(2) the current resource residual quantity is more than or equal to the resource demand quantity of the sub-process;

(3) the end time and the start time of the sub-process are on the same day.

4. The method of claim 1, wherein in step S1, the sub-processes include a plurality of assembly processes and a plurality of processing processes, and the assembly processes are located at the leftmost end of the initial coding strand.

5. The ALNS improved simulated annealing-based scheduling optimization method according to claim 4, wherein in step S3, the damage operator is used to destroy the processing procedure in the current coding chain, then the repair operator is used to repair the processing procedure in the destroyed coding chain, and the arrangement of the assembly procedure is updated by interchanging the positions of two procedures randomly for a plurality of times, so as to generate a new coding chain.

6. The ALNS improved simulated annealing-based scheduling optimization method according to claim 1, wherein in step S3, the weights of the damage operator and the repair operator are updated, and the adaptive large neighborhood search algorithm selects an operator based on the weights of the damage operator and the repair operator and the roulette manner when iterating.

7. The ALNS improved simulated annealing-based production scheduling optimization method according to claim 6, wherein in the step S3, the weights of the damage operator and the repair operator are updated by the following formulas:

wherein wdAs operator weight, sdIs the operator score, udAnd p is a weight updating coefficient which is the using times of the operator.

8. The ALNS improved simulated annealing-based production scheduling optimization method according to claim 7, wherein the calculation method of the operator score is to add according to the performance conditions of the destruction operator and the repair operator in each iteration process, and comprises the following adding conditions:

if the damage operator damages the current coding chain or the repair operator repairs the damaged coding chain to obtain a new optimal solution, adding 1.5 points;

and when the current coding chain is damaged by the damage operator or the damaged coding chain is repaired by the repair operator, a new optimal solution is not obtained:

if the poor solution is received by the probability P according to the Metropolis criterion of the simulated annealing algorithm, adding 0.8 point;

and if the inferior solution obtained by adopting the Metropolis criterion of the simulated annealing algorithm is not accepted, adding 0.3 point.

9. The ALNS improved simulated annealing-based scheduling optimization method of claim 1, wherein in step S5, the Metropolis criterion of the simulated annealing algorithm is used to determine whether to accept the inferior solution with the probability P, and the probability P is calculated by the following formula:

P=e(-|bestTime-tempTime|)/Twherein e is a natural base number, bestTime is the total working hours correspondingly consumed by the current optimal result set, tempTime is the total working hours correspondingly consumed by the current result set, and T is the current iteration temperature.

10. The ALNS improved simulated annealing-based scheduling optimization method according to claim 1, wherein the step S5 specifically comprises the following steps:

step S51, judging whether the current solution is superior to the optimal solution, if so, replacing the optimal solution with the current solution and replacing the optimal result set with the current result set, cooling, updating the solution, and then jumping to the step S6, and if not, jumping to the next step;

and S52, judging whether the inferior solution is accepted according to the probability P, if so, replacing the optimal solution with the current solution and replacing the optimal result set with the current result set, cooling, updating the solution, and then jumping to S6, and if not, directly jumping to S6.

Background

The scheduling problem is a problem commonly existing in manufacturing enterprises, is a simplification of an actual production scheduling problem, solves the problem, can utilize existing resources of the enterprises, reasonably makes a factory production plan, optimizes a production process, improves the efficiency of personnel and processes, improves the delivery rate, the utilization rate of equipment and the like, and accordingly improves the customer satisfaction. With the increasing competition of the market, in the enterprise producing according to the order, the guarantee of the delivery period of the final product is one of the core competitiveness of the enterprise, but after the increase of equipment, personnel and orders of a factory, the ordinary manual scheduling presents obvious limitation, so the enterprise needs an intelligent method, can solve the multivariable multi-constraint scheduling problem in a shorter time, and improves the production efficiency.

The existing method for solving the scheduling optimization problem comprises various methods such as a genetic method, a heuristic method, a branch-and-bound method, an integer programming method, a Lagrange relaxation method and the like, and the methods show the defects of low solving speed, serious memory consumption, high operation threshold, complex model, high method implementation cost and the like when the large-scale scheduling optimization problem is solved.

Disclosure of Invention

Aiming at the problems brought forward by the background technology, the invention aims to provide a scheduling optimization method based on ALNS improved simulated annealing, which can quickly search out a production sequence which meets constraint conditions and consumes less total man-hour, has more scientific obtained result and shorter calculation time, effectively improves the production efficiency of enterprises, can effectively guide the enterprises to carry out production planning and task management, and solves the problems of low solving speed, serious memory consumption, high operation threshold, complex model and high implementation cost of the existing scheduling method.

In order to achieve the purpose, the invention adopts the following technical scheme:

a production scheduling optimization method based on ALNS improved simulated annealing comprises the following steps:

step S1, constructing an initial coding chain: gathering the sub-processes required by each semi-finished product of the commodity, numbering and arranging each sub-process, wherein each sub-process corresponds to one number, and the construction of an initial coding chain is completed, and the number of each number in the initial coding chain represents at least the number of times that the corresponding sub-process of the initial coding chain needs to work;

step S2, decoding the initial coding chain: traversing the initial coding chain from left to right, judging whether the sub-process corresponding to the currently pointed number meets all processing conditions, if so, adding the sub-process corresponding to the currently pointed number into a result set, updating the resource occupation, then continuing traversing, if not, continuing traversing until the length of the initial coding chain is 0, acquiring the current result set and calculating the total working hour corresponding to the result;

step S3, generating a new coding chain: the method comprises the steps that a plurality of groups of destructive operators and repair operators are arranged, an adaptive large neighborhood search algorithm is adopted, the destructive operators are used for destroying a current coding chain, then the repair operators are used for repairing the destroyed coding chain to generate a new coding chain, and the adaptive large neighborhood search algorithm selects the operators based on weights of the destructive operators and the repair operators during iteration;

step S4, decoding the new coding chain: decoding the new coding chain generated in the step S3, wherein the decoding method is the same as the method for decoding the initial coding chain;

step S5, judging whether the current solution is replaced by the optimal solution and whether the current result set is replaced by the optimal result set by judging whether the current solution is better than the optimal solution and judging whether the poor solution is accepted by the probability P by adopting a Metropolis criterion of a simulated annealing algorithm;

and step S6, judging whether the iteration times are reached, if so, outputting an optimal result set, and otherwise, jumping to the step S3.

Further, the step S2 specifically includes the following steps:

step S21, traversing the initial coding chain from left to right, judging whether the sub-process corresponding to the currently pointed number meets all processing conditions during traversal, if so, adding the sub-process corresponding to the currently pointed number into a result set, deleting the number from the initial coding chain, updating resource occupation, and jumping to step S22, and if not, jumping to step S23;

step S22, judging whether the length of the initial coding chain is 0, if so, acquiring a current result set and calculating the total working hours corresponding to the result, and if not, jumping to step S23;

and S23, judging whether the current position is traversed to the rightmost end of the initial coding chain, if so, setting the current position to jump to the leftmost end of the coding chain, then continuously traversing the initial coding chain from the current position to the right, if not, continuously traversing the initial coding chain from the current position to the right, judging whether the sub-processes corresponding to the currently pointed number meet all processing conditions during traversal, if so, adding the sub-processes corresponding to the currently pointed number to a result set, deleting the number from the initial coding chain, updating the resource occupation, and jumping to the step S22, and if not, repeating the step S23.

In step S2, the processing conditions include at least the following three processing conditions:

(1) the finished quantity of the front sub-process is more than or equal to the starting quantity of the rear sub-process;

(2) the current resource residual quantity is more than or equal to the resource demand quantity of the sub-process;

(3) the end time and the start time of the sub-process are on the same day.

More specifically, in step S1, the sub-process includes a plurality of assembling processes and a plurality of machining processes, and the assembling process is located at the leftmost end of the initial code chain.

In step S3, the method for randomly interchanging the positions of two process steps is used to update the arrangement of the assembly process step to generate a new code chain.

More specifically, in step S3, the weights of the damage operator and the repair operator are updated, and the adaptive large neighborhood search algorithm selects an operator based on the weights of the damage operator and the repair operator and the roulette manner during iteration.

To be more specific, in step S3, the weights of the destroy operator and the repair operator are updated by the following formulas:

wherein wdAs operator weight, sdIs the operator score, udAnd p is a weight updating coefficient which is the using times of the operator.

Further, the calculation method of the operator score is to add score according to the performance conditions of the destruction operator and the repair operator in each iteration process, and includes the following adding condition:

if the damage operator damages the current coding chain or the repair operator repairs the damaged coding chain to obtain a new optimal solution, adding 1.5 points;

and when the current coding chain is damaged by the damage operator or the damaged coding chain is repaired by the repair operator, a new optimal solution is not obtained:

if the poor solution is received by the probability P according to the Metropolis criterion of the simulated annealing algorithm, adding 0.8 point;

and if the inferior solution obtained by adopting the Metropolis criterion of the simulated annealing algorithm is not accepted, adding 0.3 point.

To be more specific, in step S5, the simulated annealing algorithm Metropolis criterion is used to determine whether to accept an inferior solution with the probability P, and the probability P is calculated by using the following formula:

P=e(-|bestTime-tempTime|)/T

wherein e is a natural base number, bestTime is the total working hours correspondingly consumed by the current optimal result set, tempTime is the total working hours correspondingly consumed by the current result set, and T is the current iteration temperature.

Further, the step S5 specifically includes the following steps:

step S51, judging whether the current solution is superior to the optimal solution, if so, replacing the optimal solution with the current solution and replacing the optimal result set with the current result set, cooling, updating the solution, and then jumping to the step S6, and if not, jumping to the next step;

and S52, judging whether the inferior solution is accepted according to the probability P, if so, replacing the optimal solution with the current solution and replacing the optimal result set with the current result set, cooling, updating the solution, and then jumping to S6, and if not, directly jumping to S6.

Compared with the prior art, the embodiment of the invention has the following beneficial effects:

1. by adopting a self-adaptive large neighborhood search algorithm, namely, after the weights of the destruction operators and the repair operators are adjusted according to the previous performance to obtain new weights, the algorithm selects the destruction operators and the repair operators, so that the probability of selecting the destruction operators and the repair operators is in direct proportion to the weights of the destruction operators and the repair operators, an efficient combination method is used, the optimization searching capability of the algorithm is improved, a better solution is found, and the complete randomness caused by blind random search is avoided;

2. in the searching process, if only the optimal solution is accepted, the optimal solution is easy to fall into the local optimum, and in order to avoid the situation, the method adopts the Metropolis criterion of the simulated annealing algorithm to accept the inferior solution under a certain probability P, so that the capacity of jumping out of the local optimum of the method is enhanced;

3. the invention adopts a heuristic idea, and uses the quality of a small amount of solutions to replace a large amount of time saving, namely, a better solution which is acceptable and has little difference with the optimal solution is obtained in a shorter time. Compared with an integer programming method, the method has the characteristics of high solving speed, high convergence speed, memory saving, low operation threshold and the like, and can be well applied to solving of large-scale production scheduling optimization problems.

4. The invention adopts the idea of division and management of assembly and part processing, can be normally calculated after an assembly process is removed when only the scattered parts are researched, is suitable for both the scattered parts and the scheduling optimization problem with the assembly relation, has better solving effect on the scattered parts and strong universality, can quickly solve an acceptable ideal better solution which is not different from the optimal solution under the large-scale scheduling optimization problem, and has less time than methods such as an integer programming method and the like.

Drawings

FIG. 1 is a flow chart of a method for scheduling optimization for improved simulated annealing based on ALNS in accordance with one embodiment of the present invention;

FIG. 2 is a schematic diagram of the construction of an initial coding chain in step S1 of the ALNS-based production scheduling optimization method for improved simulated annealing according to one embodiment of the present invention;

FIG. 3 is a diagram illustrating decoding of an initial coding chain in step S2 of a scheduling optimization method for improved simulated annealing based on ALNS according to an embodiment of the present invention;

FIG. 4 is a schematic diagram of a method for scheduling optimization based on ALNS improved simulated annealing according to an embodiment of the present invention, in which a destroy operator is used to destroy a current coding chain when a new coding chain is generated in step S3;

FIG. 5 is a schematic diagram of repairing a damaged code chain using a repair operator when a new code chain is generated in step S3 of the method for optimizing production based on ALNS improved simulated annealing according to an embodiment of the present invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.

Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.

As shown in fig. 1, a method for optimizing scheduling based on aln improved simulated annealing includes the following steps:

step S1, constructing an initial coding chain: gathering the sub-processes required by each semi-finished product of the commodity, numbering and arranging each sub-process, wherein each sub-process corresponds to one number, and the construction of an initial coding chain is completed, and the number of each number in the initial coding chain represents at least the number of times that the corresponding sub-process of the initial coding chain needs to work;

step S2, decoding the initial coding chain: traversing the initial coding chain from left to right, judging whether the sub-process corresponding to the currently pointed number meets all processing conditions, if so, adding the sub-process corresponding to the currently pointed number into a result set, updating the resource occupation, then continuing traversing, if not, continuing traversing until the length of the initial coding chain is 0, acquiring the current result set and calculating the total working hour corresponding to the result;

step S3, generating a new coding chain: the method comprises the steps that a plurality of groups of destructive operators and repair operators are arranged, an adaptive large neighborhood search algorithm is adopted, the destructive operators are used for destroying a current coding chain, then the repair operators are used for repairing the destroyed coding chain to generate a new coding chain, and the adaptive large neighborhood search algorithm selects the operators based on weights of the destructive operators and the repair operators during iteration;

step S4, decoding the new coding chain: decoding the new coding chain generated in the step S3, wherein the decoding method is the same as the method for decoding the initial coding chain;

step S5, judging whether the current solution is replaced by the optimal solution and whether the current result set is replaced by the optimal result set by judging whether the current solution is better than the optimal solution and judging whether the poor solution is accepted by the probability P by adopting a Metropolis criterion of a simulated annealing algorithm;

and step S6, judging whether the iteration times are reached, if so, outputting an optimal result set, and otherwise, jumping to the step S3.

As shown in fig. 2, first, a semi-finished product associated with each product is found, then, sub-processes required by each semi-finished product are found, the sub-processes of the semi-finished products of all the products are collected together, numbers (in this embodiment, the numbers are 0 to 85) of all the sub-processes are given, each number corresponds to one sub-process, thus, a sub-process code chain is created, the initial code chain represents all orders to be completed in a workshop, the number of the sub-process corresponding to each number in the code chain represents the number of times that the sub-process needs to work at least, for example, the sub-process corresponding to the number 0 and the number 4 needs to work at least twice to complete all the orders, and the sub-process corresponding to the number 80 needs to work at least once to complete all the orders. The number of times that each sub-process needs to work at least is obtained by recurrently obtaining the number of semi-finished products needing to be processed by the sub-process according to the number of commodities, and then each sub-process is acquiescent to be processed according to the maximum processing number of the sub-process, for example, all orders have 11 certain types of semi-finished products which can be processed by the sub-process corresponding to the number 0, and the sub-process corresponding to the number 0 can process 6 types of semi-finished products at most once, so that all orders need to work for 2 times by the sub-process corresponding to the number 0 at least;

with the code chain in place, the problem becomes how to order the sub-processes to minimize the time for all orders to complete. The invention regards each sub-process as an independent sub-chain, the coding chain is composed of a sub-chain, as shown in fig. 3, through traversing the coding chain from left to right, it is judged whether the sub-process corresponding to the currently pointed chain meets the processing conditions, if all the processing conditions are met, then it is put into a result set, then the sub-process corresponding to the currently pointed chain can be added into the result set, the resource occupation is updated (the resource occupation is updated by assuming that the current resource residual amount is 100, the resource occupation amount of a certain sub-process is 15, after the sub-process is added into the result set, the resource residual amount is updated to 85), then the traversal continues, if all the processing conditions are not met, then the sub-process is not operated, the traversal continues to the following sub-process, the result set can be regarded as a block of a minute, the sub-process in each block represents the minute in which the sub-process begins processing. The length of the result set is variable, and the length of the result set represents the time required for completing all orders, so that the invention takes the time for completing all orders as an objective function and uses an adaptive large-field search algorithm based on the simulated annealing Metropolis criterion to search for the lowest objective function value.

Since one encoding chain corresponds to one result set, one result set corresponds to the total time consumed to complete all orders using the sequence of sub-processes in the result set. In order to search a result set which consumes less total working hours and needs to obtain more possible coding chains, the invention adopts the ALNS-based self-adaptive large neighborhood search idea to destroy the coding chains by a certain number of destruction operators and a certain rule, and then the restoration operators restore the destroyed coding chains again, thereby obtaining new coding chains. After a new coding chain is decoded, whether the current solution is superior to the optimal solution or not and whether the probability P is adopted to receive the inferior solution or not are judged by adopting a simulated annealing algorithm Metropolis criterion, so that whether the current solution is replaced by the optimal solution or not and whether the current result set is replaced by the optimal result set or not are judged.

According to the method, a self-adaptive large neighborhood search algorithm is adopted, namely, after the weights of all destructive operators and repairing operators are adjusted according to the previous performance to obtain new weights, the algorithm selects the destructive operators and the repairing operators, so that the probability of selecting the destructive operators and the repairing operators is in direct proportion to the weight performance of the destructive operators and the repairing operators, an efficient combination method is used, the algorithm optimization searching capacity is improved, a better solution is found, and the complete randomness caused by blind random search is avoided;

furthermore, the simulated annealing algorithm Metropolis criterion is adopted, and in the searching process, if only the optimal solution is received, the optimal solution is easy to fall into the local optimal solution, so that the situation is avoided, the simulated annealing algorithm Metropolis criterion is adopted, the inferior solution is received under a certain probability P, and the capability of jumping out of the local optimal solution of the method is enhanced;

further, the invention adopts a heuristic idea, and uses the quality of a small amount of solutions to exchange for a large amount of time saving, namely, a better solution which is not much different from the optimal solution can be obtained in a shorter time. Compared with an integer programming method, the method has the characteristics of high solving speed, high convergence speed, memory saving, low operation threshold and the like, and can be well applied to solving of large-scale production scheduling optimization problems.

The invention adopts the method of improving simulated annealing based on ALNS, can quickly search out the production sequence which meets the constraint condition and has less total man-hour consumption, compared with the traditional manual production scheduling mode, the obtained result is more scientific, the calculation time is shorter, the production efficiency of enterprises is effectively improved, and the method plays a great guiding role in the production plan scheduling and task management of the enterprises.

Further, the step S2 specifically includes the following steps:

step S21, traversing the initial coding chain from left to right, judging whether the sub-process corresponding to the currently pointed number meets all processing conditions during traversal, if so, adding the sub-process corresponding to the currently pointed number into a result set, deleting the number from the initial coding chain, updating resource occupation, and jumping to step S22, and if not, jumping to step S23;

step S22, judging whether the length of the initial coding chain is 0, if so, acquiring a current result set and calculating the total working hours corresponding to the result, and if not, jumping to step S23;

and S23, judging whether the current position is traversed to the rightmost end of the initial coding chain, if so, setting the current position to jump to the leftmost end of the coding chain, then continuously traversing the initial coding chain from the current position to the right, if not, continuously traversing the initial coding chain from the current position to the right, judging whether the sub-processes corresponding to the currently pointed number meet all processing conditions during traversal, if so, adding the sub-processes corresponding to the currently pointed number to a result set, deleting the number from the initial coding chain, updating the resource occupation, and jumping to the step S22, and if not, repeating the step S23.

In step S2, the traversal is performed in a loop until the length of the code chain is 0 (i.e. all codes are stored in the result set), and the traversal is performed again to the left end of the code chain and then to the right end of the code chain every time, and the process of returning to the left end of the code chain from the right end of the code chain every time is a process of adding one minute, i.e. a process from the last minute to the next minute, if a sub-process does not satisfy any condition after one traversal, the traversal is performed in the next minute (at the time of a minute jump, the resources and the pre-post constraints are updated, for example, some sub-processes in the last minute may occupy the resources, but at the next minute, these sub-processes are just finished, and in the traversal in the next minute, a process that originally does not satisfy any constraint will likely satisfy the resource constraint condition, and thus may be selected into the result set), and finally, a result set of the procedure sequence is obtained, and the decoding method is simple.

In step S2, the processing conditions include at least the following three processing conditions:

(1) the finished quantity of the front sub-process is more than or equal to the starting quantity of the rear sub-process;

(2) the current resource residual quantity is more than or equal to the resource demand quantity of the sub-process;

(3) the end time and the start time of the sub-process are on the same day.

Because some sub-processes can be operated after the previous sub-processes are finished, namely the post sub-processes can only work when the completion number of the front sub-processes is more than or equal to the start number of the post sub-processes, the completion number of the front sub-processes is enough to support the operation of the post sub-processes; limiting the current resource residual quantity to be larger than or equal to the resource demand quantity of the sub-process, and ensuring that the resources at the current moment are enough to support the operation of the sub-process; the end time and the start time of the sub-process are in the same day, so that the working time of the sub-process cannot be delayed, and the decoding effect is ensured.

More specifically, in step S1, the sub-process includes a plurality of assembling processes and a plurality of machining processes, and the assembling process is located at the leftmost end of the initial code chain.

The assembly process is located at the leftmost end of the initial coding chain, and considering that resources of an assembly workshop and a processing workshop are mutually independent, in order to improve efficiency, once the assembly process meeting processing conditions exists, the assembly process is executed at once and is the best choice.

The method for optimizing the production scheduling based on the ALNS improved simulated annealing has strong universality, most of the existing methods only aim at scattered parts for the research of the production scheduling, and the research on the production scheduling with an assembly relation is less.

In step S3, the method for randomly interchanging the positions of two process steps is used to update the arrangement of the assembly process step to generate a new code chain.

As shown in fig. 4 and 5, the destroy operator is used to destroy the code chain, and randomly destroy the removal node (since the assembly process needs to be always at the leftmost end of the code chain, the function of the destroy operator is limited to the machining process), and the repair operator is used to repair the destroyed code chain.

The method for randomly interchanging the positions of the two working procedures for multiple times is as follows: for example, a group of numbers [1,2,3,4] are subjected to random two-number interchange once to obtain [3,2,1,4], and repeated for multiple times is called 'random interchange for multiple times', and the method is adopted to update the arrangement of the assembly process, so that the method is simple to implement and high in operation speed.

More specifically, in step S3, the weights of the damage operator and the repair operator are updated, and the adaptive large neighborhood search algorithm selects an operator based on the weights of the damage operator and the repair operator and the roulette manner during iteration.

In step S3, the weights of the damage operator and the repair operator are dynamically adjusted and selected (adaptive process), the algorithm adjusts and selects the damage operator and the repair operator according to the operator weights and roulette during iteration, and by designing a plurality of sets of the damage operator and the repair operator, the space updating range of the coding chain is expanded, the current coding chain is updated, and the represented damage and repair method correspondingly obtains high scores and higher weights. In each iteration, each damage and repair operator is selected and weight adjusted according to the previous performance, and an efficient combination method is used to improve the optimization capability of the algorithm, so that a better solution is found.

To be more specific, in step S3, the weights of the destroy operator and the repair operator are updated by the following formulas:

wherein wdAs operator weight, sdIs the operator score, udAnd p is a weight updating coefficient which is the using times of the operator.

The weights of the destruction operator and the repair operator are updated according to formula 1, wherein wdAs operator weight, sdIs the operator score, udρ is a weight update coefficient (speed of controlling weight change) which is the number of times the operator is used. The method is as follows: the new operator weight is operator old weight (1-coefficient) + coefficient (accumulated fraction divided accumulated times), the operator weight is hooked with the previous expression, after the new weight is obtained, the algorithm selects the operator based on the idea of roulette, the probability that the operator is selected is in direct proportion to the weight expression, the optimization searching capability of the algorithm is improved, and a better solution is found.

Further, the calculation method of the operator score is to add score according to the performance conditions of the destruction operator and the repair operator in each iteration process, and includes the following adding condition:

if the damage operator damages the current coding chain or the repair operator repairs the damaged coding chain to obtain a new optimal solution, adding 1.5 points;

and when the current coding chain is damaged by the damage operator or the damaged coding chain is repaired by the repair operator, a new optimal solution is not obtained:

if the poor solution is received by the probability P according to the Metropolis criterion of the simulated annealing algorithm, adding 0.8 point;

and if the inferior solution obtained by adopting the Metropolis criterion of the simulated annealing algorithm is not accepted, adding 0.3 point.

At the beginning, all the destructive operators and the repair operators have the same weight and fraction, and the fractions of the destructive operators and the repair operators are given in a stepped manner according to different performance conditions of the operators in each iteration process, the higher the fraction is, the better the performance of the operators is, after new weights are obtained, the operators are selected by the algorithm based on the idea of roulette, so that the probability of the selected operators is in direct proportion to the performance of the weights of the operators, the optimization searching capability of the algorithm is improved, and a better solution is found.

To be more specific, in step S5, the simulated annealing algorithm Metropolis criterion is used to determine whether to accept an inferior solution with the probability P, and the probability P is calculated by using the following formula:

P=e(-|bestTime-tempTime|)/Twherein e is a natural base number, bestTime is the total working hours correspondingly consumed by the current optimal result set, tempTime is the total working hours correspondingly consumed by the current result set, and T is the current iteration temperature.

In the searching process, if only the optimal solution is accepted and is easy to fall into local optimization, in order to avoid the situation, the invention adopts a simulated annealing algorithm Metropolis criterion to accept the inferior solution with a certain probability P, wherein bestTime is the total working hour correspondingly consumed by the current optimal result set, and tempTime is the total working hour correspondingly consumed by the current result set, the adoption of the formula has the advantages that the size of the probability P of accepting the inferior solution can be dynamically adjusted according to the difference between the current solution and the optimal solution and the current iteration temperature T, and when the iteration temperature T is certain, the larger the difference between the current solution and the optimal solution is, the smaller the probability P is; when the difference between the current solution and the optimal solution is fixed, the larger the iteration temperature T is, the larger the probability P is, namely in the early stage of iteration, the method can accept the inferior solution with the higher probability P and accept the current solution with the smaller difference with the optimal solution with the higher probability, so that the probability of jumping out of the local optimum by the method is increased, and the method has better searching capability.

Further, the step S5 specifically includes the following steps:

step S51, judging whether the current solution is superior to the optimal solution, if so, replacing the optimal solution with the current solution and replacing the optimal result set with the current result set, cooling, updating the solution, and then jumping to the step S6, and if not, jumping to the next step;

and S52, judging whether the inferior solution is accepted according to the probability P, if so, replacing the optimal solution with the current solution and replacing the optimal result set with the current result set, cooling, updating the solution, and then jumping to S6, and if not, directly jumping to S6.

The method comprises the steps of judging whether the current solution is superior to the optimal solution or not and judging whether the inferior solution is received according to the probability P or not by adopting the Metropolis criterion of the simulated annealing algorithm, so as to judge whether the current solution is replaced by the optimal solution or not and whether the current result set is replaced by the optimal result set or not.

While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:基于服务水平的城市防疫封锁线优化设计软件

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!