Flexible job shop production scheduling method and device

Through the target iteration algorithm, the flexible work workshop production scheduling is optimized, which solves the problem of machine selection and sorting in FJSP, and improves equipment utilization and shortens workpiece processing time.

CN115032959BActive Publication Date: 2025-09-02BOE TECHNOLOGY GROUP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210906147.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-09-02
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

Flexible Workshop Scheduling Problem (FJSP) is more difficult than traditional JSP because it not only involves process sorting, but also requires determining which machine to use for each process to handle it. The existing technology is difficult to effectively optimize production completion time.

Method used

Target iterative algorithms such as particle swarm algorithm and genetic algorithm are used to determine the target production scheduling plan through initializing populations, iterative updates and adaptive value optimization, and guide the factory to formulate production plans.

Benefits of technology

It improves the utilization rate of production equipment, shortens the processing time of workpieces, and maximizes the meeting of production delivery plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115032959B_ABST
    Figure CN115032959B_ABST
Patent Text Reader

Abstract

The present disclosure provides a flexible job shop production scheduling method and device, electronic equipment, and computer-readable storage medium. The method includes: generating an initialized population based on information about workpieces to be produced, the population including multiple production scheduling schemes, and the production scheduling schemes representing a production order of the workpieces to be produced; iteratively updating the population based on a preset target iteration algorithm, and determining a target production scheduling scheme based on the iterative process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of industrial manufacturing technology, and in particular to a flexible job shop production scheduling method and device, electronic equipment, and computer-readable storage medium. Background Art

[0002] One of the most challenging problems in industrial manufacturing process planning and management is the job-shop scheduling problem (JSP). In this problem, a fleet of machines processes a set of workpieces, each of which undergoes a series of sequentially constrained steps. Each step requires only one machine, which must be constantly available and capable of processing one operation at a time without interruption. The decision involves sequencing the steps on the machines to optimize a given performance metric. A typical JSP performance metric is makespan, or the time required to complete all the work.

[0003] The Flexible Job-Shop Scheduling Problem (FJSP) is an extension of the classic JSP, in which each job is allowed to be processed on any of a set of available machines. FJSP is more difficult than the classic JSP because it introduces another decision in addition to sequencing: job routing. Determining the job routing means deciding which machine to use for each job. Summary of the Invention

[0004] The present disclosure provides a flexible job shop production scheduling method and device, electronic equipment, and computer-readable storage medium.

[0005] According to a first aspect of the present disclosure, the present disclosure provides a flexible job shop production scheduling method, the flexible job shop production scheduling method comprising:

[0006] generating an initialized population according to information of workpieces to be produced, wherein the population includes a plurality of production scheduling schemes, and the production scheduling schemes represent a production sequence of the workpieces to be produced;

[0007] The population is iteratively updated based on a preset target iteration algorithm, and a target production scheduling scheme is determined according to the iterative process.

[0008] In some embodiments, before iteratively updating the population based on the preset target iterative algorithm, the production scheduling method further includes: obtaining, for each of the production scheduling plans in the population, a fitness value corresponding to the production scheduling plan, wherein the fitness value represents the production completion time corresponding to the production scheduling plan;

[0009] The iterative updating of the population based on the preset target iteration algorithm and determining the target production scheduling scheme according to the iteration process include:

[0010] Based on the target iteration algorithm, iteratively updating the population according to the fitness value;

[0011] The target production scheduling plan is determined based on the optimal solution obtained during the iterative process.

[0012] In some embodiments, after each iterative update, the production scheduling method further includes:

[0013] Determine whether the current iteration round exceeds the iteration round threshold;

[0014] When the current iteration round does not exceed the iteration round threshold, returning to the step of obtaining the fitness value corresponding to each production scheduling plan in the population;

[0015] When the current iteration round exceeds the iteration round threshold, the process jumps to executing the step of determining the target production scheduling solution according to the optimal solution obtained in the iteration process.

[0016] In some embodiments, the target iteration algorithm includes a first particle swarm optimization algorithm, the workpiece information includes the type of workpiece to be produced, the number of workpieces of each workpiece type, the total number of processes for each workpiece type, the number of stage processes corresponding to each production stage, and the batch size of batch production; generating an initialized population based on the workpiece information to be produced includes:

[0017] determining a type code for each workpiece according to a ratio of the number of workpieces of each workpiece to the batch size to obtain a type code sequence;

[0018] Expanding each category code in the category code sequence according to the number of production stages of each workpiece to obtain a first expanded category code sequence; each element in the first expanded category code sequence represents a corresponding category of workpiece and a corresponding production stage, where the number of production stages is the ratio of the total number of processes to the number of stage processes;

[0019] Adjusting the order of elements in the first extended code sequence to generate multiple second extended code sequences with different orderings of elements, where each population particle corresponds to one second extended code sequence;

[0020] For each swarm particle of the swarm, generating a weight code sequence and a speed list corresponding to the swarm particle, wherein the weight code sequence includes weight codes that correspond one-to-one with the elements of the corresponding second extended code sequence, and the speed list includes speeds that correspond one-to-one with the elements of the corresponding second extended code sequence;

[0021] Each element in the second extended code sequence corresponding to the population particle is coded and extended according to the number of workpieces and the number of stage processes of each workpiece to obtain a third extended code sequence corresponding to the population particle; each element in the third extended code sequence represents the workpiece number of a workpiece and a stage process in the corresponding production stage, and the third extended code sequence represents a production scheduling plan.

[0022] In some embodiments, the iteratively updating the population according to the fitness value based on the target iteration algorithm includes:

[0023] Determining a current global optimal solution of the population according to the fitness value corresponding to each of the population particles, wherein the current global optimal solution of the population is the current global optimal population particle;

[0024] For each swarm particle, update the weight coding sequence corresponding to the swarm particle according to the weight coding sequence corresponding to the current global optimal solution of the swarm and the weight coding sequence corresponding to the swarm particle;

[0025] Adjusting the order of corresponding elements in the second extended coding sequence corresponding to the population particles according to the updated weight coding sequence corresponding to the population particles;

[0026] According to the adjusted second extended code sequence corresponding to the population particles, the order of corresponding elements in the third extended code sequence corresponding to the population particles is adjusted to update the corresponding production scheduling plan.

[0027] In some embodiments, the target iteration algorithm includes a genetic algorithm, the workpiece information includes the type of workpiece to be produced, the number of each workpiece, and the batch size of mass production; generating an initialized population based on the workpiece information to be produced includes:

[0028] Perform chromosome encoding according to the type of workpiece to be produced to obtain multiple types of chromosome encoding sequences;

[0029] Each type of chromosome coding sequence is decoded according to the number of workpieces of each type of workpiece to obtain an individual chromosome decoding sequence corresponding to each type of chromosome coding sequence. Each element in the individual chromosome decoding sequence represents the workpiece number of each workpiece of the corresponding workpiece type, and each individual chromosome decoding sequence represents a production scheduling plan.

[0030] In some embodiments, the iteratively updating the population according to the fitness value based on the target iteration algorithm includes:

[0031] For each individual chromosome decoding sequence in the population, regenerating the corresponding species chromosome coding sequence according to the reverse order of decoding the individual chromosome decoding sequence;

[0032] Based on the fitness value corresponding to each of the type chromosome coding sequences in the population, performing a genetic operation on the type chromosome coding sequences in the population to update the type chromosome coding sequences in the population;

[0033] The updated chromosome coding sequence of each type in the population is decoded to obtain an individual chromosome decoding sequence corresponding to the updated chromosome coding sequence of each type.

[0034] In some embodiments, the target iteration algorithm includes a second particle swarm algorithm, the workpiece information includes the number of workpieces to be produced and the number of processes for each workpiece; generating an initialized population based on the workpiece information to be produced includes:

[0035] Generate multiple production scheduling plans based on the number of workpieces to be produced and the number of processes for each workpiece. Each production scheduling plan corresponds to a population particle.

[0036] Randomly initialize the inertia weight, position and velocity parameters corresponding to each swarm particle.

[0037] In some embodiments, the iteratively updating the population according to the fitness value based on the target iteration algorithm includes:

[0038] Dividing the plurality of population particles in the population into a plurality of groups of population particles according to the order of the corresponding fitness values ​​from small to large, each group of population particles including a main population particle and at least one slave population particle;

[0039] According to the fitness value corresponding to each swarm particle in each group of swarm particles, the optimal solution within each group of swarm particles is determined. The optimal solution within the group is the swarm particle corresponding to the minimum fitness value of all swarm particles in the group. The position of the main swarm particle is the position of the swarm particle corresponding to the optimal solution within the group.

[0040] According to the fitness value corresponding to the optimal solution within each group of swarm particles, the current global optimal solution of the swarm is determined, and the current global optimal solution is the optimal solution within the group corresponding to the minimum fitness value;

[0041] For each group of swarm particles, the position and velocity of each swarm particle in each group of swarm particles are updated according to the optimal solution within the group and the current global optimal solution of the swarm.

[0042] In some embodiments, after iteratively updating the population according to the fitness value based on the target iterative algorithm, the method further includes:

[0043] determining inert population particles in the population according to a historical velocity and a historical position of each population particle in the population;

[0044] The inert population particles are removed from the population, and a corresponding number of new population particles are added to the population.

[0045] In some embodiments, determining the inert population particles in the population based on the historical velocity and historical position of each population particle in the population includes:

[0046] When the changes in multiple historical velocities of the population particles are less than a first threshold, and the changes in multiple historical positions of the population particles are less than a second threshold, the population particles are determined to be the inert population particles.

[0047] According to a second aspect of the present disclosure, the present disclosure provides a flexible job shop production scheduling device, the flexible job shop production scheduling device comprising:

[0048] an initialization unit, configured to generate an initialized population according to information of workpieces to be produced, wherein the population includes a plurality of production scheduling schemes, and the production scheduling schemes represent a production order of the workpieces to be produced;

[0049] The updating iteration unit is used to iteratively update the population based on a preset target iteration algorithm, and determine a target production scheduling plan according to the iteration process.

[0050] In some embodiments, the production scheduling device further includes: an acquisition unit;

[0051] The acquiring unit is configured to acquire, for each of the production scheduling plans in the population, a fitness value corresponding to the production scheduling plan, wherein the fitness value represents a production completion time corresponding to the production scheduling plan;

[0052] The update iteration unit includes: an update subunit, which is used to iteratively update the population according to the fitness value based on the target iteration algorithm; and a target determination subunit, which is used to determine a target production scheduling plan according to the optimal solution obtained during the iteration process.

[0053] According to a third aspect of the present disclosure, the present disclosure provides an electronic device, the electronic device comprising:

[0054] at least one processor; and

[0055] a memory communicatively connected to the at least one processor; wherein,

[0056] The memory stores one or more computer programs that can be executed by the at least one processor. The one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the above-mentioned production scheduling method.

[0057] According to a fourth aspect of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned production scheduling method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:

[0059] Figure 1 A flow chart of a flexible job shop production scheduling method provided by an embodiment of the present disclosure;

[0060] Figure 2 A flowchart of another flexible job shop production scheduling method provided by an embodiment of the present disclosure;

[0061] Figure 3 for Figure 2 A flowchart of a specific implementation of step S11;

[0062] Figure 4 for Figure 2 A flowchart of a specific implementation of step S13;

[0063] Figure 5 for Figure 2 A flow chart of another specific implementation of step S11;

[0064] Figure 6 for Figure 2 A flow chart of another specific implementation of step S13;

[0065] Figure 7 for Figure 2 A flow chart of another specific implementation of step S11;

[0066] Figure 8 for Figure 2 A flow chart of another specific implementation of step S13;

[0067] Figure 9A schematic diagram of changes in production completion time of a production scheduling solution during an iterative update process using a target iteration algorithm in an embodiment of the present disclosure;

[0068] Figure 10 A schematic structural diagram of a flexible job shop production scheduling device provided by an embodiment of the present disclosure;

[0069] Figure 11 A schematic diagram of the structure of another flexible job shop production scheduling device provided by an embodiment of the present disclosure;

[0070] Figure 12 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0071] To enable those skilled in the art to better understand the technical solutions of the present disclosure, exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0072] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0073] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0074] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. Similar words such as "connected" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0075] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.

[0076] Figure 1 A flow chart of a flexible job shop production scheduling method provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the production scheduling method includes: steps S01 to S02.

[0077] Step S01: generating an initialized population based on information of workpieces to be produced, wherein the population includes multiple production scheduling schemes, each of which represents a production order of the workpieces to be produced;

[0078] Step S02: Iteratively update the population based on a preset target iteration algorithm, and determine the target production scheduling plan according to the iteration process.

[0079] According to the production scheduling method provided by the embodiment of the present disclosure, the production scheduling schemes in the population are iterated and the optimal solution is solved based on the target iteration algorithm to obtain a target production scheduling scheme. The target production scheduling scheme can be used to guide the factory to formulate a production plan, which can not only improve the utilization rate of production equipment, but also effectively complete the processing tasks of the corresponding workpieces in the shortest time, thereby maximizing the satisfaction of the workpiece production delivery plan.

[0080] Figure 2 A flow chart of another flexible job shop production scheduling method provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the production scheduling method includes:

[0081] Step S11 : generating an initialized population according to information of workpieces to be produced, wherein the population includes a plurality of production scheduling schemes, and the production scheduling scheme represents a production order of the workpieces to be produced.

[0082] Step S12: For each production scheduling plan in the population, obtain a fitness value corresponding to the production scheduling plan, where the fitness value represents the production completion time corresponding to the production scheduling plan.

[0083] Among them, production completion time refers to the time consumed from the start of production to the completion of production when the workpiece to be produced is produced and processed using production equipment according to the production scheduling plan.

[0084] like Figure 2 As shown, the above-mentioned step of iteratively updating the population based on a preset target iteration algorithm and determining the target production scheduling plan according to the iteration process may further include: step S13 and step S15.

[0085] Step S13: Based on the target iteration algorithm, the population is iteratively updated according to the fitness value.

[0086] Step S15: Determine the target production scheduling plan based on the optimal solution obtained in the iterative process.

[0087] In some embodiments, as Figure 2 As shown, after each iterative update, that is, after step S13, the production scheduling method further includes: step S14.

[0088] Step S14: Determine whether the current iteration round exceeds the iteration round threshold. If so, jump to step S15, otherwise return to step S12.

[0089] If the current iteration round does not exceed the iteration round threshold, the updated population is returned to the step of obtaining the fitness value corresponding to each production scheduling solution in the population. If the current iteration round exceeds the iteration round threshold, the process jumps to the step of determining the target production scheduling solution based on the optimal solution obtained during the iteration. The iteration round threshold can be set as needed, for example, it can be set to 100.

[0090] According to the production scheduling method provided by the embodiment of the present disclosure, the fitness value of each production scheduling scheme in the population is obtained to iteratively update the population. During the iterative process, the optimal solution in the iterative process is determined based on the fitness value to determine the optimal target production scheduling scheme in the population. The target production scheduling scheme can be used to guide the factory to formulate production plans, which can not only improve the utilization rate of production equipment, but also effectively complete the processing tasks of the corresponding workpieces in the shortest time, thereby maximizing the satisfaction of the workpiece production delivery plan.

[0091] In some embodiments, the target iteration algorithm includes a first particle swarm algorithm, and the first particle swarm algorithm is used for production scheduling. The information of the workpieces to be produced includes the type of workpieces to be produced, the number of workpieces of each workpiece, the total number of processes for each workpiece, the number of stage processes corresponding to each production stage, and the batch size of batch production. Figure 3 for Figure 2 A flow chart of a specific implementation of step S11 is shown in FIG. Figure 3 As shown, in some embodiments, in step S11, generating an initialized population according to information of workpieces to be produced may further include: steps S111a to S115a.

[0092] Step S111a: Determine the type code of each workpiece according to the ratio of the number of workpieces of each workpiece to the batch size to obtain a type code sequence.

[0093] The number of type codes corresponding to each workpiece is determined according to the ratio of the number of workpieces of each type of workpiece to the batch size, and the type code of each workpiece is determined according to the number of type codes corresponding to each workpiece, thereby obtaining a type code sequence, the type code sequence including the type code corresponding to each workpiece, in which the type code corresponding to each workpiece is consecutively arranged in ascending order, and the minimum code in the type code of the latter type of workpiece follows the maximum code in the type code of the previous type of workpiece.

[0094] For each type of workpiece, when the ratio of the number of workpieces of this type to the batch size is an integer, the number of type codes corresponding to this type of workpiece is the ratio of the number of workpieces of this type that need to be produced to the batch size; when the ratio of the number of workpieces of this type to the batch size is a non-integer, the number of type codes corresponding to this type of workpiece is the number of workpieces of this type that need to be produced divided by the batch size (batch), rounded up to the integer, plus 1.

[0095] Suppose that three categories of workpieces A, B, and C need to be produced, and the number of workpieces required to be produced for the three categories are X, Y, and Z respectively. The total number of processes required to produce each workpiece of category A is P, the total number of processes required to produce each workpiece of category B is Q, and the total number of processes required to produce each workpiece of category C is N. The three categories of workpieces A, B, and C all satisfy that each T process is a production stage, that is, the number of stage processes corresponding to each production stage is T, the number of production stages for each workpiece of each type of workpiece is the ratio of the corresponding total number of processes to the number of stage processes, and the batch size (batch) of mass production is M.

[0096] For Class A workpieces, the number of type codes for Class A workpieces is: X / / M+1, that is, the number of Class A workpieces that need to be produced is divided by the batch size (batch) and rounded up, plus 1. For example, X=50, M=30, then the number of type codes for Class A workpieces is 50 / / 30+1=2, then the type code for Class A workpieces can be configured as [0,1], where 0 represents the first batch of Class A workpieces, 1 represents the second batch of Class A workpieces, and the number of workpieces in each batch is M=30.

[0097] Based on the same coding method as that for Class A workpieces, the type coding of Class B and Class C workpieces is performed. For example, if the number of Class B workpieces is Y = 30 and M = 30, then the type coding number of Class B workpieces is Y / M = 30 / 30 = 1, and the corresponding type coding can be configured as [2]. If the number of Class C workpieces is Z = 30 and M = 30, then the type coding number of Class C workpieces is Z / M = 30 / 30 = 1, and the corresponding type coding can be configured as [3]. Finally, based on the type coding of Class A workpieces, the type coding of Class B workpieces, and the type coding of Class C workpieces, the type coding sequence is [0, 1, 2, 3].

[0098] Generate a category code sequence according to the above rules and record the correspondence between each element and the workpiece type and quantity. Also, record the starting and ending points of the workpiece number corresponding to each code based on the actual situation. For example, in the category code sequence [0,1,2,3], element 0 represents category A workpieces numbered 0-29, element 1 represents category A workpieces numbered 30-49, element 2 represents category B workpieces numbered 0-29, element 3 represents category B workpieces numbered 0-29, and so on.

[0099] Step S112a: Expand each category code in the category code sequence according to the number of production stages of each workpiece to obtain a first expanded category code sequence, wherein each element in the first expanded category code sequence represents a corresponding category of workpiece and a corresponding production stage.

[0100] In some embodiments, a maximum number of production stages is determined based on the number of production stages for each workpiece type; the type code sequence is repeated the maximum number of production stages to obtain a new type code sequence; and each element in the new type code sequence is expanded into a binary array in the order in which the same elements appear, to obtain a first expanded code sequence. In the first expanded code sequence, each element is a binary array, where the first number in each binary array represents the corresponding workpiece type, and the second number represents the corresponding production stage.

[0101] Taking the workpiece information for workpieces A, B, and C as an example, divide the maximum of the workpiece quantities P, Q, and N by the number of stage processes T to obtain the maximum number of production stages. If the maximum of P, Q, and N is not a multiple of T, round up the ratio of that maximum to T to obtain the maximum number of production stages. For example, if P / Q / N = 5 / 4 / 3 and T = 3, the maximum number of production stages is 5 / / 3 + 1 = 2. Repeat the category code sequence generated in the previous step twice to obtain a new category code sequence. For example, if the type code sequence obtained in the previous step is [0, 1, 2, 3], repeat it twice to obtain a new type code sequence: [0, 1, 2, 3, 0, 1, 2, 3]. According to the order in which the same elements appear in the new type code sequence, each element is expanded into a binary array to obtain the first extended code sequence. For example, the first "0" is expanded to (0, 1), the second "0" is expanded to (0, 2), the first "1" is expanded to (1, 1), and so on. The first extended code sequence is obtained: [(0 , 1), (1, 1), (2, 1), (3, 1), (0, 2), (1, 2), (2, 2), (3, 2)], where (0, 1) represents the first production stage of the first batch of workpieces of type A workpieces, (1, 1) represents the first production stage of the second batch of workpieces of type A workpieces, (2, 1) represents the first production stage of the first batch of workpieces of type B workpieces, (0, 2) represents the second production stage of the first batch of workpieces of type A workpieces, and so on.

[0102] When the coding is expanded based on the maximum number of production stages, for the type of workpiece whose number of production stages is less than the maximum number of production stages, the number of production stages reflected in the coding sequence of this type of workpiece may be greater than its actual number of production stages. Therefore, in subsequent production processing, the production time of the redundant production stages in the coding of this type of workpiece can be set to 0.

[0103] In some embodiments, based on the number of production stages for each workpiece, each type code corresponding to each workpiece in the type code sequence is repeated the number of production stages for the corresponding workpiece type to obtain a new type code sequence; a first extended code sequence is obtained; and each element in the new type code sequence is expanded into a binary array in the order in which the same elements appear, to obtain the first extended code sequence. In the first extended code sequence, each element is a binary array, where the first number in each binary array represents the corresponding workpiece type, and the second number represents the corresponding production stage.

[0104] Taking the workpiece information of the three types of workpieces A, B, and C as an example, assuming that: P / Q / N = 5 / 4 / 3, the number of production stages for type A workpieces is 5 / / 3+1=2, the number of production stages for type B workpieces is 4 / / 3+1=2, and the number of production stages for type C workpieces is 3 / 3=1. The type code sequence obtained in the previous step is [0, 1, 2, 3], where 0 and 1 are the type codes corresponding to type A workpieces, 2 is the type code corresponding to type B workpieces, and 3 is the type code corresponding to type C workpieces. Then, in the type code sequence [0, 1, 2, 3], "0" and "1" are repeated twice respectively, "2" is repeated twice, and "3" remains as 1, to obtain a new type code sequence: [0, 1, 0, 1, 2, 2, 3]. According to the order in which the same elements appear in the new type code sequence, each element is expanded into a binary array to obtain the first extended code sequence. For example, the first "0" is expanded to (0, 1), the second "0" is expanded to (0, 2), the first "1" is expanded to (1, 1), and so on, to obtain the first extended code sequence: [(0, 1), (1, 1), (0, 2), (1, 2), (2, 1), (2, 2), (3, 1)]. Among them, (0, 1) represents the first production stage of the first batch of type A workpieces, (1, 1) represents the first production stage of the second batch of type A workpieces, (0, 2) represents the second production stage of the first batch of type A workpieces, (2, 1) represents the first production stage of the first batch of type B workpieces, and so on.

[0105] Step S113a: Adjust the order of elements in the first extended code sequence to generate multiple second extended code sequences with different element orders, and each population particle corresponds to one second extended code sequence.

[0106] In step S113a, multiple first extended code sequences are copied, and the order of elements in each first extended code sequence is adjusted to obtain multiple second extended code sequences, where the order of elements in the multiple second extended code sequences is different from each other.

[0107] To ensure the orderly production of workpieces of the same type and batch, the elements corresponding to the same type and batch are sorted in the order of their production stages in the second extended code sequence. Other elements can exist between any two adjacent elements of the same type and batch. These other elements can be from different batches of the same type or from other types of workpieces. For example, the element (0, 1) must be sorted before the element (0, 2), and the element (1, 1) can be sorted between the elements (0, 1) and (0, 2).

[0108] Exemplarily, the first extended code sequence is: [(0, 1), (1, 1), (2, 1), (3, 1), (0, 2), (1, 2), (2, 2), (3, 2)], and by adjusting the order of the elements according to the above rule, multiple second extended code sequences are obtained, and the multiple second extended code sequences are: [(0, 1), (1, 1), (2, 1), (3, 1), (0, 2), (1, 2), (2, 2), (3, 2)], [(0,1), (1,1), (0,2), (1,2), (2,1), (2,2), (3,1), (3,2)], [(1,1), (0,1), (1,2), (0,2), (2,1), (3,1), (2,2), (3,2)], [(0,1), (2,1), (2,2), (1,1), (0,2), (1,2), (3,1), (3,2)].

[0109] Step S114a: For each population particle in the population, generate a weight code sequence and a speed list corresponding to the population particle, where the weight code sequence includes weight codes that correspond one-to-one to the elements of the corresponding second extended code sequence, and the speed list includes speeds that correspond one-to-one to the elements of the corresponding second extended code sequence.

[0110] In some embodiments, the initial weight coding sequence and speed list can be randomly generated, and the length of the weight coding sequence and the speed list are both the length of the second extended coding sequence in the corresponding population particles.

[0111] Exemplarily, the initial weight coding sequence can be an arithmetic sequence with 0 as the starting element, a length equal to the length of the corresponding second extended coding sequence, and a difference of 1 between adjacent elements, for example [0, 1, 2, 3, 4, 5, 6, 7], where each element represents the weight coding of the corresponding element in the second extended coding sequence.

[0112] The initial speed list has the same length as the corresponding second extended code sequence, where each element is a random value between the negative maximum speed -v_max and the positive maximum speed v_max. For example, if the maximum speed v_max is set to 3, the initial speed list can be configured as [-1, 0, 1, 2, 2.5, -0.1, ..., -2, 3], where each element represents the speed of the corresponding element in the second extended code sequence.

[0113] Step S115a: Code and expand each element in the second extended code sequence corresponding to the population particle according to the number of workpieces and the number of stage processes of each workpiece to obtain a third extended code sequence corresponding to the population particle; each element in the third extended code sequence represents the workpiece number of a workpiece and a stage process in the corresponding production stage, and the third extended code sequence represents a production scheduling plan.

[0114] For example, assume that there are two types of workpieces, one type of workpiece requires 2 workpieces to be produced, the other type of workpiece requires 3 workpieces to be produced, the batch size is 3, the number of production stages for both types of workpieces is 2, and the number of stage processes for each production stage is 3. A second extended code sequence obtained according to the above encoding method is [(0, 1), (1, 1), (0, 2), (1, 2)]. In this second extended code sequence, (0, 1) represents the first production stage of the first type of workpiece, (0, 2) represents the second production stage of the first type of workpiece, (1, 1) represents the first production stage of the second type of workpiece, and (1, 2) represents the second production stage of the second type of workpiece. According to the number of workpieces required to be produced (2) and the number of stage processes (3), the elements (0, 1) and (0, 2) in the second extended code sequence are respectively extended. According to the number of workpieces required to be produced (3) and the number of stage processes (3), the elements (1, 1) and (1, 2) in the second extended code sequence are respectively extended.

[0115] For the first type of workpiece, first number the workpieces to be produced for the first type of workpiece, such as 0 and 1, which represent the 0th workpiece and the 1st workpiece respectively; number the stage processes of the first production stage of the first type of workpiece, such as 1, 2, 3, which represent the first stage process, the second stage process and the third stage process of the first production stage respectively; number the stage processes of the second production stage of the first type of workpiece, such as 3, 4, 5, which represent the first stage process, the second stage process and the third stage process of the second production stage respectively; based on The workpiece numbers and stage process numbers of the workpieces to be produced among the above-mentioned first type of workpieces are used to expand the corresponding elements in the second extended coding sequence, such as expanding the element (0, 1) to [(0, 1), (0, 2), (0, 3), (1, 1), (1, 2), (1, 3)], and expanding the element (0, 2) to [(0, 3), (0, 4), (0, 5), (1, 3), (1, 4), (1, 5)], where the first number in the binary array of each element after expansion represents the workpiece number and the second number represents the stage process number.

[0116] For the second type of workpieces, first number the workpieces required to be produced for the second type of workpieces, such as 2, 3, and 4, which represent the first, second, and third workpieces respectively; number the stage processes of the first production stage of the second type of workpieces, such as 1, 2, and 3, which represent the first stage process, the second stage process, and the third stage process respectively; number the stage processes of the second production stage of the second type of workpieces, such as 3, 4, and 5, which represent the first stage process, the second stage process, and the third stage process respectively; based on the second type of workpieces required to be produced, The workpiece number and stage process number of the workpiece are used to expand the corresponding elements in the second extended coding sequence. For example, the element (1, 1) is expanded to [(2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3), (4, 1), (4, 2), (4, 3)], and the element (1, 2) is expanded to [(2, 3), (2, 4), (2, 5), (3, 3), (3, 4), (3, 5), (4, 3), (4, 4), (4, 5)], where the first number in the binary array of each element after expansion represents the workpiece number and the second number represents the stage process number.

[0117] In the third extended code sequence, elements corresponding to the same workpiece and the same production stage are sorted in order of stage process. Each third extended code sequence represents a production scheduling plan, and the order of elements in the third extended code sequence represents the production order of the corresponding workpiece.

[0118] In some embodiments, the workpieces and processes to be produced are encoded using the encoding method of steps S111a to S115a above, and finally the third extended coding sequence obtained based on the encoding is used as a production scheduling plan for production and processing. This can effectively ensure the production of a batch of workpieces of the same type, and the production equipment does not need to be switched, thus avoiding the cross-production of different types of workpieces, ensuring the saturation of batch production and production equipment use, effectively avoiding mixed production and idle production equipment, improving equipment utilization, and shortening the maximum completion time.

[0119] Figure 4 for Figure 2 In the flowchart of a specific implementation of step S13, in some embodiments, when the workpieces and processes to be produced are encoded based on the encoding method of the above steps S111a to S115a, each population particle is updated and evolved according to the first particle swarm algorithm, such as Figure 4 As shown, in step S13, based on the target iteration algorithm, the population is iteratively updated according to the fitness value, which may further include: steps S131a to S134a.

[0120] S131a. Determine the current global optimal solution of the population according to the fitness value corresponding to each population particle. The current global optimal solution of the population is the current global optimal population particle.

[0121] In the current iteration round, the current global optimal solution of the population is determined according to the minimum value of the fitness values ​​corresponding to multiple population particles in the population. The current global optimal solution of the population is the current global optimal population particle, that is, the population particle corresponding to the minimum value of the fitness values ​​corresponding to multiple population particles.

[0122] In some embodiments, for each swarm particle, a current individual optimal solution of the swarm particle is determined based on a minimum value of the fitness value of the swarm particle in historical iteration rounds and the fitness value in the current round.

[0123] S132a. For each swarm particle, update the weight coding sequence corresponding to the swarm particle according to the weight coding sequence corresponding to the current global optimal solution of the swarm and the weight coding sequence corresponding to the swarm particle.

[0124] Subtract the weight codes corresponding to the same extended code sequence elements in the weight code sequence corresponding to the current global optimal solution from the weight code sequence corresponding to the swarm particles to obtain new weight codes. The new weight codes are sorted in ascending order to obtain a new weight code sequence.

[0125] For example, the second extended code sequence of the current population particle is [(0, 1), (0, 2), (1, 1)], and its weight code sequence is [1, 2, 3]. The second extended code sequence of the current global optimal population particle is [(1, 1), (0, 1), (0, 2)], and its weight code sequence is [1, 2, 3]. It can be seen that the extended code sequence element (0, 1) corresponds to a weight code of 1 in the current population particle and a weight code of 2 in the optimal population particle; the extended code sequence element (0, 2) corresponds to a weight code of 2 in the current population particle and a weight code of 3 in the optimal population particle; the extended code sequence element (1, 1) corresponds to a weight code of 3 in the current population particle and a weight code of 1 in the optimal population particle. The weight code of the optimal population particle is subtracted from the weight code of the current population particle in a manner corresponding to the same extended code sequence element. The result of subtracting the weight codes corresponding to the same extended code sequence element is [2-1, 3-2, 1-3] = [1, 1, -2]. The result of sorting in ascending order is [-2, 1, 1], that is, the new weight code sequence is [-2, 1, 1]. In the new weight code sequence, the extended code sequence element corresponding to "-2" is (1, 1), the extended code sequence element corresponding to the first "1" is (0, 1), and the extended code sequence element corresponding to the second "1" is (0, 2).

[0126] S133a. According to the updated weighted coding sequence corresponding to the population particles, the order of corresponding elements in the second extended coding sequence corresponding to the population particles is adjusted.

[0127] Based on the order of the weight codes in the new weight code sequence, the order of the corresponding elements in the second extended code sequence corresponding to the population particles is adjusted to obtain a new second extended code sequence corresponding to the population particles.

[0128] For example, the second extended code sequence of the current swarm particles is [(0, 1), (0, 2), (1, 1)], the original weight code sequence is [1, 2, 3], the second extended code sequence of the current global optimal swarm particles is [(1, 1), (0, 1), (0, 2)], and its weight code sequence is [1, 2, 3]. The new weight code sequence calculated according to step S142a is [-2, 1, 1]. In the new weight code sequence, the extended code sequence element corresponding to "-2" is (1, 1), the extended code sequence element corresponding to the first "1" is (0, 1), and the extended code sequence element corresponding to the second "1" is (0, 2). Based on the order of the weight codes in the new weight code sequence, the order of the corresponding elements in the second extended code sequence corresponding to the swarm particles is adjusted to obtain a new second extended code sequence: [(1, 1), (0, 1), (0, 2)]. It can be seen that the swarm particles are moving toward the direction of the optimal swarm particles.

[0129] In some embodiments, for workpieces of the same type, they need to be produced sequentially according to the order of production stages and cannot be produced in reverse order. Therefore, in the adjusted second extended code sequence, for elements corresponding to workpieces of the same type, when there is a situation where an element corresponding to a later production stage is located before an element corresponding to a previous production stage, the order of the elements that would result in the reverse order of the production stages is adjusted so that the elements corresponding to the same type of workpieces are sorted in the order of production stages. For example, the adjusted second extended code sequence is [(0,2), (1,1), (0,1), (1,2)], where (0,2) is located before (0,1), which would result in the reverse order of production stages. Therefore, the adjusted second extended code sequence is further adjusted to [(0,0), (1,0), (0,1), (1,1)].

[0130] In some embodiments, it is also necessary to update the population particle speed according to the current individual optimal solution of the population particle and the current global optimal solution of the population, so as to update the speed list corresponding to the corresponding second extended code sequence.

[0131] S134a. According to the adjusted second extended code sequence corresponding to the population particles, adjust the order of corresponding elements in the third extended code sequence corresponding to the population particles to update the corresponding production scheduling plan.

[0132] According to the description of step S115a above, the elements in the third code sequence are extended codes of the corresponding elements in the second extended code sequence. Therefore, each element in the second extended code sequence has a corresponding relationship with an element in the corresponding third code sequence. Therefore, when the order of the elements in the second extended code sequence is updated, the order of the corresponding elements in the corresponding third extended code sequence also needs to be adjusted. Based on the adjusted order of the elements in the second extended code sequence corresponding to the population particles, the order of the corresponding elements in the third extended code sequence corresponding to the population particles is adjusted to update the corresponding production scheduling plan.

[0133] After the population is updated, if the current iteration round does not exceed the iteration round threshold, the next iteration round is entered and the process returns to step S12.

[0134] In some embodiments, the target iteration algorithm includes a genetic algorithm, the genetic algorithm is used for production scheduling, and the workpiece information includes the type of workpieces to be produced, the number of each workpiece, and the batch size of batch production. Figure 5 for Figure 2 A flow chart of another specific implementation of step S11 is shown in FIG. Figure 5 As shown, in some embodiments, in step S11, generating an initialized population according to information of workpieces to be produced may further include: steps S111b to S112b.

[0135] Step S111b: perform chromosome encoding according to the type of workpiece to be produced to obtain multiple types of chromosome encoding sequences.

[0136] For example, if four types of workpieces A, B, C, and D need to be produced this time, the length of the type chromosome code is 4, and the four workpieces are chromosome-encoded, such as A: 0, B: 1, C: 2, and D: 3. Based on this, multiple type chromosome coding sequences with different element orderings can be obtained, such as [0, 1, 2, 3], [3, 0, 1, 2], etc. The ordering of elements in different type chromosome coding sequences is different, that is, there is a different ordering of the coding elements corresponding to at least one type of workpiece. In the type chromosome coding sequence, each element represents the chromosome code of a type of workpiece.

[0137] Step S112b: decode the chromosome coding sequence of each type according to the number of workpieces of each type to obtain the individual chromosome decoding sequence corresponding to the chromosome coding sequence of each type, each element in the individual chromosome decoding sequence represents the workpiece number of each workpiece of the corresponding workpiece type, and each individual chromosome decoding sequence represents a production scheduling plan.

[0138] Suppose that four types of workpieces, A, B, C, and D, require production of 2, 3, 4, and 2 workpieces, respectively. For example, the workpiece numbers of the two workpieces of type A can be configured as 0 and 1, the workpiece numbers of the three workpieces of type B can be configured as 2, 3, and 4, the workpiece numbers of the four workpieces of type C can be configured as 5, 6, 7, and 8, and the workpiece numbers of the two workpieces of type D can be configured as 9 and 10. Decoding the type chromosome code [0, 1, 2, 3] yields the corresponding individual chromosome code sequence: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. Decoding the type chromosome code [3, 0, 2, 1] yields the corresponding individual chromosome code sequence: [9, 10, 0, 1, 5, 6, 7, 8, 2, 3, 4]. In the individual chromosome code sequence, each element represents the workpiece number of a workpiece of the corresponding type. Each individual chromosome decoding sequence represents a production scheduling plan, and the order of the elements in the individual chromosome decoding sequence represents the production order of the corresponding workpieces.

[0139] Through the genetic algorithm encoding and decoding method described in steps S111b to S112b, workpieces of the same type are batch-encoded and decoded to obtain a type chromosome encoding sequence and an individual chromosome encoding sequence. Each element in the type chromosome encoding sequence represents each batch of workpieces of the same type in mass production. Subsequent genetic operations such as selection, crossover, and mutation in the genetic algorithm are performed on the type chromosome encoding sequence, ensuring that all batches of workpieces of the same type undergo the same operations, ensuring consistency. The individual chromosome encoding sequence is decoded from the type chromosome encoding sequence using the number and number of workpieces of each type. The decoded individual chromosome encoding sequence is used to allocate and produce subsequent production equipment. After production, the completion time of the last workpiece produced in the batch of workpieces of the same type is used as the completion time of the batch of workpieces of the same type. Genetic operations are then performed on the type encoding sequence based on the completion time of each batch of workpieces of each type, and then production is resumed, using the genetic algorithm to obtain the optimal solution. In this way, it not only meets the needs of minimizing production time but also meets the needs of batch production of the same workpiece, avoids cross-production of the same workpiece, and can effectively ensure the production of a batch of workpieces of the same type. The production equipment does not need to be switched, ensuring the saturation of batch production and production equipment use, effectively avoiding mixed production and idle production equipment, improving equipment utilization, and shortening the maximum completion time.

[0140] Figure 6 for Figure 2 In another specific embodiment of step S13, in some embodiments, when the genetic algorithm is decoded based on the encoding method of steps S111b to S112, as shown in FIG. Figure 6 As shown, in step S13, based on the target iteration algorithm, the population is iteratively updated according to the fitness value, which may further include: steps S131b to S133b.

[0141] Step S131b: for each individual chromosome decoding sequence in the population, regenerate the corresponding species chromosome encoding sequence according to the reverse order of decoding.

[0142] For example, if the individual chromosome coding sequence is: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], the sequence is processed in the reverse order of decoding in step S112a to obtain the corresponding type chromosome coding sequence: [0, 1, 2, 3].

[0143] Step S132b: Based on the fitness value corresponding to each type chromosome coding sequence in the population, perform genetic operations on the type chromosome coding sequences in the population to update the type chromosome coding sequences in the population.

[0144] Among them, genetic operations include selection, crossover, and mutation.

[0145] In genetic algorithms, the selection operation refers to selecting excellent individuals from the current population with a certain probability to form a new population in order to reproduce individuals in the next generation population. The probability of an individual being selected is related to its fitness value. The higher the individual's fitness value, the greater the probability of being selected.

[0146] The crossover operation refers to randomly selecting two individuals from the population, and through the exchange combination of the two chromosome codes, the excellent characteristics of the parent string are inherited to the daughter string, thereby generating new excellent individuals.

[0147] The mutation operation refers to replacing the gene values ​​at certain loci in the chromosome coding sequence of a species with other alleles of the locus, thereby forming a new individual.

[0148] After the current population undergoes selection, crossover, and mutation operations, the next generation population is obtained.

[0149] Step S133b: Decode the chromosome coding sequence of each type in the updated population to obtain the individual chromosome decoding sequence corresponding to the updated chromosome coding sequence of each type.

[0150] For the description of step S133b, please refer to the description of step S112b above, which will not be repeated here.

[0151] In some embodiments, the target iteration algorithm includes a second particle swarm algorithm, which is used for production scheduling. The information of the workpieces to be produced includes the number of workpieces to be produced and the number of processes for each workpiece. The FJSP problem can be described as: arranging n workpieces for production and processing on m production equipment, each workpiece contains s sequentially executed processes, and the processing time of each process of each workpiece on the production equipment is known. A production scheduling plan is formulated for these workpieces, and the goal is to optimize the maximum completion time, that is, to shorten the total processing time of all processes to complete all workpieces.

[0152] Before initializing the population, construct the production scheduling constraints:

[0153] Constraint 1: Each process is processed on designated production equipment and can only be started after the previous process is completed.

[0154] Constraint 2: At a certain moment, one production device can only process one workpiece.

[0155] Constraint 3: Each workpiece can only be processed once on one production device.

[0156] Constraint 4: The process sequence and processing time of each workpiece are known and do not change with the change of processing sequence.

[0157] Figure 7 for Figure 2 A flow chart of another specific implementation of step S11 is shown in FIG. Figure 7 As shown, in some embodiments, in step S11, generating an initialized population according to information of workpieces to be produced may further include: steps S111c to S112c.

[0158] Step S111c: Generate multiple production scheduling plans based on the number of workpieces to be produced and the number of processes for each workpiece, and each production scheduling plan corresponds to a population particle.

[0159] The population is randomly initialized, and multiple production scheduling plans are generated based on the number of workpieces to be produced and the number of processes for each workpiece. Each production scheduling plan corresponds to a population particle. For example, there are five workpieces A, B, C, D, and E, each with three processes. Each production scheduling plan represents the processing order of each process for these five workpieces. For example, a production scheduling plan is BADCEABDCEBADEC, where the number of times each workpiece appears indicates the process number. For example, the first appearance of B indicates the first process of workpiece B, and the second appearance indicates the second process of workpiece B.

[0160] Before initializing the population, you can set the iteration round threshold and the number of population particles in each iteration. For example, set the iteration round threshold to 100 and the number of population particles in each iteration to 50.

[0161] Step S112c: Randomly initialize the inertia weight, position and velocity parameters corresponding to each population particle.

[0162] Figure 8 for Figure 2 In another specific embodiment of step S13, in some embodiments, when the particle swarm algorithm is used to initialize the population based on the above steps S111c to S112c, see Figure 8 In step S13, iteratively updating the population based on the fitness value may further include: steps S131c to S134c.

[0163] Step S131c: Divide the plurality of population particles in the population into a plurality of groups of population particles according to the order of the corresponding fitness values ​​from small to large, each group of population particles including a master population particle and at least one slave population particle.

[0164] For example, the population has 50 population particles. According to the fitness value corresponding to each population particle in the current iteration round, the 50 population particles are divided into 5 groups in ascending order. Each group contains 10 population particles. In each group, one population particle is randomly selected as the master population particle, and the other population particles are slave population particles. The master population particle of the i-th group is identified as master population particle i, where i = 1, 2, ..., 10.

[0165] Step S132c: Determine the optimal solution within each group of swarm particles based on the fitness value corresponding to each swarm particle in each group of swarm particles. The optimal solution within the group is the swarm particle corresponding to the minimum fitness value of all swarm particles in the group. The position of the main swarm particle is the position of the swarm particle corresponding to the optimal solution within the group.

[0166] Step S133c: Determine the current global optimal solution of the population according to the fitness value corresponding to the optimal solution within each group of population particles. The current global optimal solution is the optimal solution within the group corresponding to the minimum fitness value.

[0167] Step S134c: for each group of swarm particles, update the position and velocity of each swarm particle in each group of swarm particles according to the optimal solution within the group and the current global optimal solution of the swarm.

[0168] Among them, the position and velocity of the particle are multidimensional vectors, and the value of each dimension is updated according to the position update formula and the velocity update formula.

[0169] The speed update formula is:

[0170]

[0171] The position update formula is:

[0172]

[0173] Among them, V k id represents the d-dimensional component of the velocity of the main population particle i in the k-th iteration round, x k id represents the d-dimensional component of the position of particle i in the i-th group of main population in the k-th iteration round; c1 and c2 are acceleration constants used to adjust the maximum learning step size; r1 and r2 are two random functions with a value range of [0,1], used to increase the randomness of the search; w represents the inertia weight, which is a non-negative number used to adjust the search range of the solution space; pbest id gbest represents the best position that particle i of the main population of group i has ever experienced, that is, the position of the best solution among the current optimal solution in group i and the historical optimal solution in group i; idIt represents the best position that the population has ever experienced, that is, the position of the current global optimal solution of the population.

[0174] In some embodiments, during the iterative update process of the population, the population particles are divided into multiple groups, and each group selects one main population particle, and the others are slave population particles. Even if the main population particles of one group fall into a local optimal solution, the main population particles of other groups can continue to search, thereby effectively avoiding the inability to effectively obtain the global optimal solution due to the algorithm falling into the local optimal solution, and effectively improving the phenomenon of the algorithm falling into the local optimal solution.

[0175] In some embodiments, when the population is iteratively updated based on the update method of steps S131c to S134c above, after the population is iteratively updated according to the fitness value based on the target iteration algorithm, the production scheduling method also includes: determining the inert population particles in the population based on the historical speed and historical position of each population particle in the population; removing the inert population particles from the population, and adding a corresponding number of new population particles to the population.

[0176] Since the inert population particles have little effect on the convergence of the algorithm and occupy computing resources, they need to be removed. After removal, the same number of new population particles are added. The initialization method of the new population particles can refer to the above step S111c and will not be repeated here.

[0177] Specifically, based on the historical velocity and historical position of each particle in the population, an inert population particle is determined. This includes determining that a population particle is an inert population particle when the change in multiple historical velocities of the population particle is less than a first threshold, and the change in multiple historical positions of the population particle is less than a second threshold. The first and second thresholds can be set as needed and are not specifically limited in this disclosure.

[0178] When the changes in multiple historical velocities of the population particles are greater than or equal to a first threshold, or the changes in multiple historical positions of the population particles are greater than or equal to a second threshold, it is determined that the population particles are not inert population particles.

[0179] In some embodiments, the algorithm convergence speed can be effectively accelerated by removing inert population particles from the population.

[0180] In some embodiments, in step S12, for each production scheduling plan in the population, obtaining the fitness value corresponding to the production scheduling plan may further include: selecting corresponding production equipment to perform workpiece production and processing according to the production scheduling plan, and obtaining the production completion time; based on a preset fitness function, obtaining the fitness value corresponding to the production scheduling plan according to the production completion time.

[0181] Among them, a preset fitness function can be determined according to the particle swarm algorithm or genetic algorithm actually adopted, and the fitness value corresponding to the production scheduling plan can be obtained according to the fitness function.

[0182] In some embodiments, selecting corresponding production equipment to perform workpiece production and processing according to the production scheduling plan may further include: selecting corresponding production equipment for each workpiece to be produced in the production scheduling plan to perform workpiece processing and production based on the last completion time of each production equipment in the production equipment set; obtaining equipment maintenance information, and when it is determined according to the equipment maintenance information that the selected production equipment is in a maintenance state, adjusting the last completion time of the production equipment in the production equipment set that is in a maintenance state to the maintenance end time, and returning to the step of selecting corresponding production equipment for each workpiece to be produced in the production scheduling plan to perform workpiece processing and production based on the last completion time of each production equipment in the production equipment set.

[0183] Based on the last completion time of each production equipment in the production equipment set and the principle of shortest time allocation, the production equipment with the longest last completion time from the start of the current processing time is found. This equipment is the earliest idle production equipment in the production equipment set and is selected to process the workpiece. For example, if workpiece 0 should be produced at this time, but there are two available production equipment, the production equipment with the longest last completion time from the start of the current processing time is selected for production.

[0184] If the selected production equipment is determined to be undergoing maintenance based on the equipment status information, the last completion time of the selected production equipment is set as the maintenance end time. The process then returns to the step of selecting the corresponding production equipment for each workpiece to be produced in the production scheduling plan based on the last completion time of each production equipment in the production equipment set. The production equipment is then reselected for production based on the last completion time of each production equipment in the updated production equipment set. If the selected production equipment is not undergoing maintenance during the production period, production is performed directly using that production equipment.

[0185] After the production and processing based on the production scheduling plan is completed, the production and processing information and equipment status information of the production scheduling plan are recorded and updated.

[0186] In some embodiments, when selecting production equipment for production processing, a judgment is made as to whether it is in maintenance time, so as to determine all production equipment under maintenance during the production period, and adjust the last completion time of these production equipment to the end time of their maintenance. In this way, according to the principle of shortest time allocation, the selection of production equipment will no longer select production equipment in maintenance status. The judgment of equipment maintenance status and the selection of production equipment are performed through equipment status information, so that the entire production scheduling is more in line with the real workshop scheduling scenario and more practical.

[0187] In some embodiments, in actual shop floor scheduling, workpiece production may involve multiple steps and exhibit a certain cyclical nature. When selecting production equipment, the same equipment can be reused for multiple steps of a workpiece's production. For example, if each type of workpiece to be produced requires three steps per production stage, each stage corresponds to three steps. Assuming that the production of a given type of workpiece requires six steps, steps 1, 2, and 3 can be produced using the same equipment as steps 4, 5, and 6.

[0188] In the embodiment of the present disclosure, when the current iteration round exceeds the iteration round threshold or the position of the global optimal solution meets the minimum limit, the algorithm iteration is stopped.

[0189] In the embodiment of the present disclosure, in step S15, the target optimal solution is determined based on the minimum fitness value corresponding to the global optimal solution generated in each iterative round. The target optimal solution is the global optimal solution corresponding to the minimum fitness value, and the production scheduling plan corresponding to the target optimal solution is used as the target production scheduling plan.

[0190] At this point, the target production schedule is output, and the production and processing information based on the target production schedule is recorded. This production and processing information includes the production equipment, start time, and end time corresponding to each process for each workpiece. This target production schedule and the corresponding production and processing information can be used to guide the factory in formulating production plans, not only improving production equipment utilization but also effectively completing the corresponding workpiece processing tasks in the shortest time, maximizing the satisfaction of the workpiece production delivery schedule.

[0191] Table 1 shows the production order in an exemplary initialized production scheduling scheme, Table 2 shows the production time of each stage process of each workpiece in an exemplary production scheduling scheme, and Table 3 shows an exemplary equipment maintenance status record of different types of production equipment. Figure 9 This is a schematic diagram of the change in production completion time of a production scheduling solution during the iterative update process of the target iteration algorithm in an embodiment of the present disclosure. In actual application scenarios, such as Figure 9As shown, the horizontal axis represents the iteration round, and the vertical axis represents the production completion time of the production scheduling plan. By comparison, under the same production plan, the original production scheduling plan requires three days for production scheduling. The target iteration algorithm of the present invention is used to iteratively update the production scheduling plan, and based on the equipment status shown in Table 3, suitable production equipment is selected to produce according to the production scheduling plan. After the algorithm is iteratively updated, the production scheduling time is greatly shortened to 20100 seconds, or 5.6 hours. That is, the production scheduling method of the embodiment of the present invention can effectively shorten the production completion time required for the production scheduling plan and effectively improve production efficiency.

[0192] Table 1

[0193]

[0194]

[0195] Table 2

[0196]

[0197] Table 3

[0198]

[0199]

[0200] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0201] Figure 10 A structural diagram of a flexible job shop production scheduling device provided by an embodiment of the present disclosure is shown in FIG. Figure 10 As shown, the production scheduling device 200 includes: an initialization unit 201 and an update iteration unit 202.

[0202] The initialization unit 201 is used to generate an initialized population according to information of the workpieces to be produced. The population includes multiple production scheduling schemes, and the production scheduling scheme represents a production order of the workpieces to be produced.

[0203] The updating and iterating unit 202 is configured to iteratively update the population based on a preset target iteration algorithm and determine a target production scheduling solution according to the iteration process.

[0204] Figure 11 This is a structural diagram of another flexible job shop production scheduling device provided by an embodiment of the present disclosure, such as Figure 11As shown, the production scheduling device 200 further includes: an acquisition unit 203.

[0205] The acquisition unit 203 is used to acquire, for each production scheduling plan in the population, a fitness value corresponding to the production scheduling plan, where the fitness value represents the production completion time corresponding to the production scheduling plan.

[0206] The update iteration unit 202 includes an update subunit 2021 and a target determination subunit 2022. The update subunit 2021 is used to iteratively update the population according to the fitness value based on the target iteration algorithm; the target determination subunit 2022 is used to determine the target production scheduling solution based on the optimal solution obtained during the iteration process.

[0207] In some embodiments, as Figure 11 As shown, the update iteration unit 202 further includes a judgment subunit 2023. The judgment subunit 2023 is configured to: after the update subunit 2021 iteratively updates the population, determine whether the current iteration round exceeds the iteration round threshold; if the current iteration round does not exceed the iteration round threshold, trigger the acquisition unit 203 to execute the step of acquiring the fitness value corresponding to each production scheduling plan in the population; and if the current iteration round exceeds the iteration round threshold, trigger the target determination subunit 2022 to execute the step of determining the target production scheduling plan based on the optimal solution obtained during the iteration process.

[0208] The flexible job shop production scheduling device 200 provided in the embodiment of the present disclosure is used to implement the production scheduling method provided in any of the above embodiments. For specific related descriptions, please refer to the description of the production scheduling method in any of the above embodiments, which will not be repeated here.

[0209] Figure 12 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0210] Reference Figure 12 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 301; at least one memory 302, and one or more I / O interfaces 303, connected between the processor 301 and the memory 302; wherein the memory 302 stores one or more computer programs that can be executed by the at least one processor 301, and the one or more computer programs are executed by the at least one processor 301 to enable the at least one processor 301 to execute the above-mentioned production scheduling method.

[0211] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned production scheduling method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0212] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned production scheduling method.

[0213] It will be understood by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium).

[0214] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically contains computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0215] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0216] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0217] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0218] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0219] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0220] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0221] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0222] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A flexible job shop production scheduling method, characterized in that: include: An initialized population is generated according to information of workpieces to be produced, the population including a plurality of production scheduling schemes, the production scheduling scheme representing a production order of the workpieces to be produced; each population particle of the population corresponds to a third extended code sequence, the third extended code sequence representing a production scheduling scheme, each element in the third extended code sequence representing a workpiece number of a workpiece and a stage process in a corresponding production stage, the third extended code sequence is obtained by encoding and extending each element in a second extended code sequence, each element in the second extended code sequence representing a corresponding workpiece type and a corresponding production stage, the second extended code sequence is correspondingly configured with a weighted code sequence, the weighted code sequence including weighted codes that correspond one-to-one to the elements of the corresponding second extended code sequence; Iteratively updating the population based on a preset target iteration algorithm, and determining a target production scheduling plan according to the iterative process; The target iteration algorithm includes a first particle swarm algorithm, and the iterative updating of the population based on the preset target iteration algorithm includes: Determining a current global optimal solution of the population according to the fitness value corresponding to each of the population particles, wherein the current global optimal solution of the population is the current global optimal population particle, and the fitness value represents the production completion time corresponding to the production scheduling solution corresponding to the population particle; The weighted coding sequence of each of the swarm particles is updated according to the current global optimal solution, and the sorting of corresponding elements in the second extended coding sequence corresponding to each of the swarm particles is adjusted, as well as the sorting of corresponding elements in the third extended coding sequence corresponding to the swarm particles is adjusted to update the corresponding production scheduling plan.

2. The production scheduling method according to claim 1, characterized in that: Before iteratively updating the population based on the preset target iterative algorithm, the method further includes: obtaining, for each of the production scheduling plans in the population, a fitness value corresponding to the production scheduling plan, wherein the fitness value represents the production completion time corresponding to the production scheduling plan; The target production scheduling plan is determined according to an iterative process, including: The target production scheduling plan is determined based on the optimal solution obtained during the iteration process.

3. The production scheduling method according to claim 2, characterized in that: After each iterative update, the method further comprises: Determine whether the current iteration round exceeds the iteration round threshold; When the current iteration round does not exceed the iteration round threshold, returning to the step of obtaining the fitness value corresponding to each production scheduling plan in the population; When the current iteration round exceeds the iteration round threshold, the process jumps to executing the step of determining the target production scheduling solution according to the optimal solution obtained in the iteration process.

4. The production scheduling method according to claim 2, characterized in that: The workpiece information includes the type of workpiece to be produced, the number of workpieces of each workpiece, the total number of processes for each workpiece, the number of stage processes corresponding to each production stage, and the batch size of batch production; The generating of an initialized population according to information of workpieces to be produced includes: determining a type code for each workpiece according to a ratio of the number of workpieces of each workpiece to the batch size to obtain a type code sequence; Expanding each category code in the category code sequence according to the number of production stages of each workpiece to obtain a first expanded category code sequence; each element in the first expanded category code sequence represents a corresponding category of workpiece and a corresponding production stage, where the number of production stages is the ratio of the total number of processes to the number of stage processes; Adjusting the order of elements in the first extended code sequence to generate multiple second extended code sequences with different orderings of elements, where each population particle corresponds to one second extended code sequence; For each population particle of the population, generating a weight code sequence and a speed list corresponding to the population particle, wherein the speed list includes speeds that correspond one-to-one to the elements of the corresponding second extended code sequence in sequence; Each element in the second extended code sequence corresponding to the population particles is coded and extended according to the number of workpieces and the number of stage processes of each workpiece to obtain a third extended code sequence corresponding to the population particles.

5. The production scheduling method according to claim 4, characterized in that: The updating of the weighted coding sequence of each of the swarm particles according to the current global optimal solution, adjusting the order of corresponding elements in the second extended coding sequence corresponding to each of the swarm particles, and adjusting the order of corresponding elements in the third extended coding sequence corresponding to the swarm particles to update the corresponding production scheduling plan includes: For each swarm particle, update the weight coding sequence corresponding to the swarm particle according to the weight coding sequence corresponding to the current global optimal solution of the swarm and the weight coding sequence corresponding to the swarm particle; Adjusting the order of corresponding elements in the second extended coding sequence corresponding to the population particles according to the updated weight coding sequence corresponding to the population particles; According to the adjusted second extended code sequence corresponding to the population particles, the order of corresponding elements in the third extended code sequence corresponding to the population particles is adjusted to update the corresponding production scheduling plan.

6. A flexible job shop production scheduling device, characterized in that: include: An initialization unit is used to generate an initialized population based on information about workpieces to be produced, wherein the population includes multiple production scheduling schemes, and the production scheduling schemes represent a production order of the workpieces to be produced; each population particle of the population corresponds to a third extended code sequence, and the third extended code sequence represents one of the production scheduling schemes; each element in the third extended code sequence represents a workpiece number of a workpiece and a stage process in a corresponding production stage; the third extended code sequence is obtained by encoding and extending each element in a second extended code sequence, and each element in the second extended code sequence represents a corresponding workpiece type and a corresponding production stage; the second extended code sequence is correspondingly configured with a weight code sequence, and the weight code sequence includes weight codes that correspond one-to-one to the elements of the corresponding second extended code sequence; An updating and iterating unit, configured to iteratively update the population based on a preset target iterative algorithm, and determine a target production scheduling plan according to the iterative process; The target iteration algorithm includes a first particle swarm algorithm, and the update iteration unit includes an update subunit, which is used to: determine the current global optimal solution of the population based on the fitness value corresponding to each of the population particles, where the current global optimal solution of the population is the current global optimal population particle, and the fitness value represents the production completion time corresponding to the production scheduling plan corresponding to the population particle; update the weight coding sequence of each population particle based on the current global optimal solution, adjust the order of corresponding elements in the second extended coding sequence corresponding to each population particle, and adjust the order of corresponding elements in the third extended coding sequence corresponding to the population particle, so as to update the corresponding production scheduling plan.

7. The production scheduling device according to claim 6, characterized in that: The production scheduling device further includes: an acquisition unit; The acquiring unit is configured to acquire, for each production scheduling scheme in the population, a fitness value corresponding to the production scheduling scheme, wherein the fitness value represents a production completion time corresponding to the production scheduling scheme; The update iteration unit further includes: The target determination subunit is used to determine the target production scheduling plan based on the optimal solution obtained in the iterative process.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor. The one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the production scheduling method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the production scheduling method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for solving flexible job shop scheduling based on particle swarm algorithm of longicorn beard search

    CN111311077A

  • Dynamic information accumulation-based lion group optimal flexible scheduling method and system

    CN113408951A

  • Flexible job shop scheduling method based on improved particle swarm genetic hybrid algorithm

    CN114493337A