Flexible job shop scheduling method and system based on quantum firefly search mechanism

By using the quantum firefly search mechanism and combining the adaptive step size strategy of quantum rotation gate and quantum NOT gate, the objective function of the flexible job shop scheduling problem is optimized, which solves the problems of search complexity and slow convergence speed of the traditional firefly algorithm in flexible job shop scheduling, and realizes a more efficient scheduling solution.

CN115271465BActive Publication Date: 2026-02-24CHONGQING NORMAL UNIVERSITY +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210911937.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2026-02-24
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

Traditional firefly algorithms suffer from high search complexity, slow convergence speed, low accuracy, and susceptibility to getting trapped in local optima when solving flexible job shop scheduling problems, resulting in low scheduling efficiency.

Method used

We employ a quantum firefly search mechanism combined with an adaptive step-size strategy using quantum rotation gates and quantum NOT gates. By using quantum encoding and an adaptive step-size quantum firefly search mechanism, we optimize the objective function of the flexible job shop scheduling problem. We utilize quantum rotation gates and quantum NOT gates to escape local optima and combine them with a stochastic neighborhood search model to improve the search efficiency and accuracy of the algorithm.

Benefits of technology

It improves the computational efficiency and the accuracy of finding the optimal solution in the flexible workshop scheduling problem, reduces the complexity of the algorithm, enhances the algorithm's ability to escape local optima, and improves the efficiency of the scheduling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115271465B_ABST
    Figure CN115271465B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of intelligent scheduling, and provides a flexible job shop scheduling method and system based on a quantum firefly search mechanism, which comprises: establishing a mathematical model for a flexible job shop scheduling problem; taking the overall minimum of a minimum processing time rule, a global workload balance rule and a scheduling component rule as a target, and constructing a firefly objective function for the flexible job shop scheduling problem; using a quantum firefly search mechanism based on a distance and brightness adaptive step length to solve the firefly objective function for the flexible job shop scheduling problem, and obtaining an optimal solution, i.e. an optimal solution to the flexible job shop scheduling problem. The present application solves the technical problems of insufficient consideration of production scheduling allocation and difficulty in flexible job shop scheduling in the prior art, and improves the calculation efficiency and the solution accuracy of the optimal solution to the flexible job shop scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent scheduling technology, specifically relating to a flexible job shop scheduling method and system based on the quantum firefly search mechanism. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] The Flexible Job-shop Scheduling Problem (FJSP) is an extension of the classic job-shop scheduling problem. Its main characteristic is that the processing paths for jobs in FJSP are not unique but flexible. This feature significantly increases the problem's flexibility and complexity, allowing an operation to be processed on a single machine from a set of alternative machines. Compared to the traditional job-shop scheduling problem, FJSP has wider practical applications and is more difficult to solve.

[0004] Most existing literature considers fixed machine availability constraints, meaning the start and end times of maintenance activities are predetermined in the maintenance plan. The Flexible Job Shop Scheduling (FJSP) problem can generally be described as follows: given a set of jobs to be processed and a set of machines, each job contains multiple operations with a specific processing sequence, operations can be performed on any available machine, and the processing time is fixed. The FJSP focuses on the sequence of job operations and machine allocation. Mathematically, this problem is a typical NP-hard problem, with high difficulty and complexity; no single algorithm can comprehensively and effectively solve it to date. In actual production activities, achieving optimal or suboptimal production sequence and machine allocation is a core aspect of improving enterprise economic efficiency. Due to the high complexity and flexibility of the solution in the FJSP, its research has significant academic and application value, providing valuable insights for practical production activities. Currently, intelligent algorithms are favored for solving this problem, such as genetic algorithms, tabu search algorithms, particle swarm optimization, and ant colony optimization. Among these, the firefly algorithm has been widely used in recent years due to its simplicity, few parameters, and ease of implementation.

[0005] In practice, it was found that the traditional Firefly Algorithm (FA) is generally used to solve continuous optimization problems. Although FA has good performance in optimization, each individual firefly in FA is attracted to individuals better than itself in different directions during optimization iterations. Each poor firefly will move in different directions multiple times, which makes the search process of FA cumbersome, slows down the convergence speed of the algorithm, and causes local oscillations. Therefore, FA still has some problems common to all biomimetic optimization algorithms, including high search complexity, low convergence speed, low accuracy, oscillations, and local optima. As a result, when FA is discretized to solve the flexible job shop scheduling problem, the scheduling process is complex and the scheduling efficiency is very low, making it unable to solve the flexible job shop scheduling problem. Summary of the Invention

[0006] To address the aforementioned issues, this invention proposes a flexible job shop scheduling method and system based on the quantum firefly search mechanism. This invention aims to improve the firefly algorithm, enhance its efficiency and accuracy, and thereby improve the algorithm's efficiency and capability in solving the flexible job shop scheduling problem.

[0007] According to some embodiments, the first aspect of the present invention provides a flexible job shop scheduling method based on a quantum firefly search mechanism, employing the following technical solution:

[0008] A flexible job shop scheduling method based on the quantum firefly search mechanism includes:

[0009] A mathematical model was established for the scheduling problem in flexible workshops.

[0010] The Firefly objective function for the flexible job shop scheduling problem is constructed with the overall goal of minimizing the minimum processing time rule, the global workload balancing rule, and the scheduling component rule.

[0011] By utilizing a quantum firefly search mechanism based on adaptive step size of distance and brightness, the firefly objective function of the flexible job shop scheduling problem is solved, and the optimal solution is obtained, which is the optimal solution to the flexible job shop scheduling problem.

[0012] Furthermore, the flexible workshop scheduling problem involves O operations and n workpieces processed by m machines. The mathematical model for this problem is:

[0013] Each operation O uv By any available candidate machine M uv M in z Processing; O uv In M z The operation time on is denoted as p. uvz ; Let z be a machine (z = 1, 2, ..., m; l = 1, 2, ..., L). z The first preventative maintenance task on ); L z The total number of preventative maintenance tasks on machine z, and the number of maintenance tasks. The duration is d zl c uv It is O uv The completion time of the operation.

[0014] Furthermore, the objective function of the flexible job shop scheduling problem is specifically as follows:

[0015] f1 = max c uv

[0016]

[0017]

[0018] The weighted sum of the three objective values ​​mentioned above is taken as the combined objective function, which is the firefly objective function for the flexible job shop scheduling problem:

[0019] F(c) = W1×f1 + W2×f2 + W3×f3

[0020] W1+W2+W3=1,0≤W1,W2,W3≤1

[0021] Where W1 is the weighting coefficient of f1, f1 represents the maximum time (Cm), W2 is the weighting coefficient of f2, f2 is the maximum machine workload (Wmax), and W3 is the weighting coefficient of f3, f3 is the total machine workload (Wt); each operation O uv One of the candidate machines, M z The operation time on is denoted as p. uvz L k The total number of preventative maintenance tasks on machine z. Let z be a machine (k = 1, 2, ..., m; l = 1, 2, ..., L). z The first preventative maintenance task on the device; maintenance task The duration is d zl c uv It is O uv The completion time of the operation; n is the number of workpieces, u is the u-th workpiece, and v is the v-th operation.

[0022] Furthermore, the quantum firefly search mechanism based on adaptive step size according to distance and brightness is used to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, including:

[0023] Step 1: Initialize parameters: total number of fireflies N, total number of calculation steps, maximum number of iterations, step size factor, attraction factor, mutation factor θ0;

[0024] Step 2: Randomly generate a qubit probability amplitude for each individual firefly;

[0025] Step 3: Decode the probability amplitude of the qubit and convert it into a real number process selection code. Based on the machine selection method, select the processing machine for the process probabilistically, calculate the individual brightness through the objective function, and record the current optimal solution.

[0026] Step 4: Randomly generate an angle θ. When θ < 0.1·θ0, perform a quantum NOT gate mutation; when θ < θ0, perform a quantum rotation gate update.

[0027] Step 5: Based on the random neighborhood model, select firefly individuals for comparison. When the brightness of a firefly individual in the iteration is less than that of the comparison firefly individual, update its position.

[0028] Step 6: If the firefly individual in the current iteration is the best individual in this iteration, then perform a random search update of the individual;

[0029] Step 7: Update the step size factor;

[0030] Step 8: Determine if the maximum number of iterations has been reached, and exit the loop if necessary; otherwise, increment the iteration count and return to step 3.

[0031] Step 9: After exiting the loop, convert the individual probability amplitude code back into the real number individual process selection code. Calculate the processing machine for the process using the machine selection method, rank the fireflies, find the best result, and return its corresponding process selection code and machine selection code.

[0032] Furthermore, the random generation of qubit probability amplitudes for each individual firefly includes:

[0033] Each process number and its corresponding executing machine number in the mathematical model of the flexible workshop scheduling problem are represented as a firefly.

[0034] A two-layer coding method combining process coding and machine coding is used to obtain the binary code of each individual firefly;

[0035] Convert the binary code of each individual firefly into the real number code of each individual firefly;

[0036] The qubit probability amplitude of each firefly is obtained based on the real-number encoding of each individual firefly.

[0037] Furthermore, the formula for calculating the position update is:

[0038]

[0039] Among them, X i Let r be the qubit probability amplitude of firefly individual i, t be the number of algorithm iterations, and r be the qubit probability amplitude. ij Let γ be the Cartesian distance between firefly individuals i and j, γ be the light absorption coefficient, and β be the maximum attraction force, i.e., r. ij The attractiveness when it is 0, rand∈[0,1] is a random number, and k is a custom parameter used to limit the magnitude of the effect of the step size, which is set to 0.01 by default here;

[0040] The formula for calculating random search updates is:

[0041] X i (t+1)=X i (t)+α(rand-0.5)

[0042] Where α is the adaptive step size.

[0043] Furthermore, the machine selection method is specifically as follows:

[0044] Add the processing time of each available processing machine in the current process, the completion time of its previous process, and the cost of preventive maintenance tasks, and select the machine with the smallest value to ensure workload balance.

[0045] Probabilistic random selection uses a probabilistic selection method based on machine processing time; that is, the shorter the processing time, the greater the probability that the machine will be selected.

[0046] According to some embodiments, a second aspect of the present invention provides a flexible job shop scheduling system based on a quantum firefly search mechanism, employing the following technical solution:

[0047] A flexible job shop scheduling system based on the quantum firefly search mechanism includes:

[0048] The module for establishing mathematical models of scheduling problems is configured to establish mathematical models for the flexible job shop scheduling problem.

[0049] The objective function construction module is configured to construct the Firefly objective function for the flexible job shop scheduling problem with the overall minimum of the minimum processing time rule, the global workload balancing rule, and the scheduling component rule as the objective.

[0050] The objective function solving module is configured to use a quantum firefly search mechanism based on adaptive step size of distance and brightness to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, i.e. the optimal solution to the flexible job shop scheduling problem.

[0051] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.

[0052] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the flexible job shop scheduling method based on the quantum firefly search mechanism described in the first aspect above.

[0053] According to some embodiments, a fourth aspect of the present invention provides a computer device.

[0054] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the flexible job shop scheduling method based on the quantum firefly search mechanism described in the first aspect above.

[0055] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0056] The purpose of this invention is to improve the technical deficiencies of solutions to the flexible job shop scheduling problem, and to provide a flexible job shop scheduling method and system based on the quantum firefly search mechanism. This solves the technical problems of insufficient consideration of production scheduling allocation in the prior art and the difficulty of flexible job shop scheduling, and improves the computational efficiency and the accuracy of solving the optimal solution for flexible job shop scheduling.

[0057] This invention combines quantum computing with a random neighborhood search model and an adaptive step size. The superposition of quantum multi-qubit states improves the algorithm's efficiency. In the iterative algorithm of the quantum firefly search mechanism based on distance and brightness adaptive step size, quantum rotation gates and quantum NOT gates are introduced. The quantum rotation gate is introduced to ensure utilization of the search space, while the quantum NOT gate is introduced to ensure exploration of the search space. The random neighborhood search model of the quantum firefly search mechanism based on distance and brightness adaptive step size reduces the algorithm's complexity and, to some extent, improves its ability to escape local optima. The adaptive step size improves the algorithm's optimization accuracy and efficiency. Attached Figure Description

[0058] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0059] Figure 1 This is a flowchart of the flexible job shop scheduling method based on the quantum firefly search mechanism described in an embodiment of the present invention;

[0060] Figure 2 This is a comparison diagram of the full attraction model and the random neighborhood search model described in the embodiments of the present invention;

[0061] Figure 3 This is a comparison chart of the results of QSSFA and standard FA based on the Sphere Function test function according to the embodiments of the present invention;

[0062] Figure 4 This is a comparison chart of the results of QSSFA and standard FA based on the Rosenbrock Function test function according to the embodiments of the present invention. Detailed Implementation

[0063] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0064] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0065] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0066] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0067] The Flexible Job Shop Scheduling Problem (FJSP) is described as follows: There are n workpieces being processed on m machines. Each workpiece has k operations. Each operation can be performed on several machines in a specific process order. Each machine can perform several operations on a workpiece. The available machine sets for different operations are different. The processing time required for each operation on different machines is constant.

[0068] The purpose of scheduling is to rationally allocate each process to each machine in order to achieve better overall performance.

[0069] Example 1

[0070] like Figure 1As shown, this embodiment provides a flexible job shop scheduling method based on the quantum firefly search mechanism. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps:

[0071] A mathematical model was established for the scheduling problem in flexible workshops.

[0072] The Firefly objective function for the flexible job shop scheduling problem is constructed with the overall goal of minimizing the minimum processing time rule, the global workload balancing rule, and the scheduling component rule.

[0073] By utilizing a quantum firefly search mechanism based on adaptive step size of distance and brightness, the firefly objective function of the flexible job shop scheduling problem is solved, and the optimal solution is obtained, which is the optimal solution to the flexible job shop scheduling problem.

[0074] Specifically, the flexible workshop scheduling problem involves O processes and n workpieces processed by m machines. The mathematical model for this problem is:

[0075] Each operation O uv By any available candidate machine M uv M in z Processing; O uv In M z The operation time on is denoted as p. uvz ; Let z be a machine (z = 1, 2, ..., m; l = 1, 2, ..., L). z The first preventative maintenance task on ); L z The total number of preventative maintenance tasks on machine z, and the number of maintenance tasks. The duration is d zl c uv It is O uv The completion time of the operation.

[0076] The objective function of the flexible job shop scheduling problem, as described in the "Firefly" example, is as follows:

[0077] f1 = max c uv

[0078]

[0079]

[0080] The weighted sum of the three objective values ​​mentioned above is taken as the combined objective function, which is the firefly objective function for the flexible job shop scheduling problem:

[0081] F(c) = W1×f1 + W2×f2 + W3×f3

[0082] W1+W2+W3=1,0≤W1,W2,W3≤1

[0083] Where W1 is the weighting coefficient of f1, f1 represents the maximum time (Cm), W2 is the weighting coefficient of f2, f2 is the maximum machine workload (Wmax), and W3 is the weighting coefficient of f3, f3 is the total machine workload (Wt); each operation O uv One of the candidate machines, M z The operation time on is denoted as p. uvz L k The total number of preventative maintenance tasks on machine z. Let z be a machine (k = 1, 2, ..., m; l = 1, 2, ..., L). z The first preventative maintenance task on the device; maintenance task The duration is d zl c uv It is O uv The completion time of the operation; n is the number of workpieces, u is the u-th workpiece, and v is the v-th operation.

[0084] The quantum firefly search mechanism, based on adaptive step sizes of distance and brightness, is used to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, including:

[0085] Step 1: Initialize parameters: total number of fireflies N, total number of calculation steps, maximum number of iterations, step size factor, attraction factor, mutation factor θ0;

[0086] Step 2: Randomly generate a qubit probability amplitude for each individual firefly;

[0087] Step 3: Decode the probability amplitude of the qubit and convert it into a real number process selection code. Based on the machine selection method, select the processing machine for the process probabilistically, calculate the individual brightness through the objective function, and record the current optimal solution.

[0088] Step 4: Randomly generate an angle θ. When θ < 0.1·θ0, perform a quantum NOT gate mutation; when θ < θ0, perform a quantum rotation gate update.

[0089] Step 5: Based on the random neighborhood model, select firefly individuals for comparison. When the brightness of a firefly individual in the iteration is less than that of the comparison firefly individual, update its position.

[0090] Step 6: If the firefly individual in the current iteration is the best individual in this iteration, then perform a random search update of the individual;

[0091] Step 7: Update the step size factor;

[0092] Step 8: Determine if the maximum number of iterations has been reached, and exit the loop if necessary; otherwise, increment the iteration count and return to step 3.

[0093] Step 9: After exiting the loop, convert the individual probability amplitude code back into the real number individual process selection code. Calculate the processing machine for the process using the machine selection method, rank the fireflies, find the best result, and return its corresponding process selection code and machine selection code.

[0094] The random generation of qubit probability amplitudes for each individual firefly includes:

[0095] Each process number and its corresponding executing machine number in the mathematical model of the flexible workshop scheduling problem are represented as a firefly.

[0096] A two-layer coding method combining process coding and machine coding is used to obtain the binary code of each individual firefly;

[0097] Convert the binary code of each individual firefly into the real number code of each individual firefly;

[0098] The qubit probability amplitude of each firefly is obtained based on the real-number encoding of each individual firefly.

[0099] Furthermore, the formula for calculating the position update is:

[0100]

[0101] Among them, X i Let r be the qubit probability amplitude of firefly individual i, t be the number of algorithm iterations, and r be the qubit probability amplitude. ij Let γ be the Cartesian distance between firefly individuals i and j, γ be the light absorption coefficient, and β be the maximum attraction force, i.e., r. ij The attractiveness when it is 0, rand∈[0,1] is a random number, and k is a custom parameter used to limit the magnitude of the effect of the step size, which is set to 0.01 by default here;

[0102] The formula for calculating random search updates is:

[0103] X i (t+1)=X i (t)+α(rand-0.5)

[0104] Where α is the adaptive step size.

[0105] The machine selection method is as follows:

[0106] Add the processing time of each available processing machine in the current process, the completion time of its previous process, and the cost of preventive maintenance tasks, and select the machine with the smallest value to ensure workload balance.

[0107] Probabilistic random selection uses a probabilistic selection method based on machine processing time; that is, the shorter the processing time, the greater the probability that the machine will be selected.

[0108] In a specific embodiment, the flexible job shop scheduling method based on the quantum firefly search mechanism includes:

[0109] The Firefly Algorithm (FA) is proposed by simulating the bioluminescent behavior of fireflies. Its core idea is that individual fireflies move towards their brighter companions, making FA simple, flexible, and easy to implement. For ease of description, three idealized assumptions are given:

[0110] All fireflies are unisex, and the attraction between individual fireflies is independent of their sex (each firefly represents a solution, which is irrelevant to the sex in the actual problem).

[0111] Attraction is related to brightness; between any two fireflies, the darker one will move toward the brighter one. Attraction and brightness are inversely proportional to the distance between the two fireflies

[31] . The brightest firefly will randomly choose a direction to move; the darker one moving toward the brighter one can be considered a global search, while the brightest one moving randomly is a local search.

[0112] The brightness of a firefly can be influenced or determined by the objective function. For maximization problems, the brightness can be simply proportional to the value of the objective function (establishing the relationship between the algorithm and the domain problem, and specifying how to represent the brightness by the objective value).

[0113] Brightness and attractiveness

[0114] Two important issues that determine the optimization process of the firefly algorithm are the changes in individual light intensity and the formation of attraction between individuals. For simplicity, we can always assume that the attraction of a firefly is determined by its brightness, which is related to the objective function

[32] .

[0115] The brightness I of a firefly at position x can be set to be proportional to the objective function f(x), i.e., I(x)∝f(x). However, the attraction between fireflies is relative, and this value is inversely proportional to the distance r between firefly i and firefly j. Similar to light intensity, it is affected by air absorption to some extent. These two factors work together, so most fireflies can only be detected by other fireflies within a limited distance.

[0116] The change in light intensity I(r) follows the inverse square law: I(r) = I0 / r 2 To avoid I0 / r 2 When r = 0, dividing by 0 yields a comprehensive approximation that considers the inverse square law and absorption:

[0117]

[0118] Where I0 is the absolute brightness of an individual firefly, γ is the light absorption coefficient, and r is the Euclidean distance between fireflies.

[0119] Another way to achieve a slightly slower, monotonically decreasing rate:

[0120]

[0121] The attractiveness of fireflies is directly proportional to the intensity of light, therefore the attractiveness β:

[0122]

[0123] Where β0 is the maximum attraction when the distance is 0, usually taken as 1; γ and r are as mentioned above.

[0124] Distance and movement

[0125] Any two fireflies i and j at their respective positions x i and x j The distance between them is the Cartesian distance:

[0126]

[0127] Where x ik Let x be the spatial coordinates of the i-th firefly. i The k-th dimension coordinate value.

[0128] For the two-dimensional case

[0129] Firefly i will move towards other fireflies j that are brighter than it:

[0130]

[0131] Where, xi and x j The first term represents the firefly's position; the second term represents the attraction factor, where β0 is the maximum attraction factor, typically set to 1. γ and r are as described above. If r approaches infinity, it means the attraction factor is almost zero in the eyes of other fireflies, making the firefly short-sighted. Essentially, the firefly moves randomly with its eyes closed, resulting in a purely random search. The third term is the random perturbation term, where α is the step size factor. This value cannot be too large, otherwise the algorithm will oscillate and fail to converge, nor can it be too small, otherwise effective local search will be impossible. Typically, α ∈ (0,1), and rand is a uniformly distributed random number between [0,1]. Alternatively, the random term can be set to follow a Gaussian distribution or other distributions.

[0132] This embodiment proposes a novel firefly algorithm, QSSFA. Several key improvements are made to QSSFA. First, a quantum computing mechanism is introduced, encoding population initialization from a quantum perspective. Utilizing quantum properties such as qubits, quantum rotation gates, and quantum superposition states, quantum computing theory outperforms classical algorithms in terms of computational process and execution efficiency compared to traditional optimization algorithms. Second, quantum rotation gates and NOT gates are introduced to implement mutation, addressing the problem of the FA algorithm easily getting trapped in local optima. Third, a novel search method based on adaptive step size between individuals and brightness is adopted. In FA, attractiveness is related to Euclidean distance. This embodiment uses a novel method based on distance and the optimal brightness of the firefly individual to calculate attractiveness, reducing algorithm oscillations and excessively large step sizes. Finally, a neighborhood random search strategy is used, randomly moving firefly individuals. This sacrifices slight oscillations for a significant reduction in the algorithm's search complexity.

[0133] In the algorithm, individual fireflies are represented by the following formula. After generating the initial quantum firefly individuals, each individual needs to be transformed into a feasible solution in the solution space through a linear transformation. Only after the transformation is completed can the probability amplitude of the qubit be mapped into a sequence of steps to calculate the objective function value. Due to the characteristics of qubits, i.e., quantum states... With α 2 The probability collapses to state |0>, with β 2 The probability collapses to state |1>, and α and β satisfy: α 2 +β 2 =1.

[0134] Quantum states can also be represented by probability amplitudes, which can be viewed as two-dimensional complex space vectors. It can also be seen that when α = 1 Represent the range [1,0] using probability amplitude. T When β = 1 Represent [0,1] using probability amplitude.T .

[0135] For multi-bit operations in general computation, there exist 2 n In quantum computing, for multiple qubits, there also exists a 2... n There are 2 possible quantum states, and the state of a qubit is determined according to 2 n The quantum probability amplitude is determined. The expression for multiple qubits can be defined as:

[0136]

[0137] Among them, MQ i Represents the binary representation of i-1, α i This represents the probability amplitude of i-1.

[0138] We employ a two-layer encoding method combining process encoding and machine encoding. The length of the qubit encoding depends on the total number of processes. For example, in the problem of processing n workpieces with O processes by m machines, the corresponding binary encoding length L is determined by the real number encoding length and its corresponding binary bit length L², where the binary encoding length corresponding to each decimal bit is determined by the larger of m and n. The specific formula is as follows:

[0139] L2=[log2max(m,n)+1] (7)

[0140] Since a binary string of length L2 can represent no fewer than max(m,n) decimal numbers, the binary encoding length L can be determined by the following formula:

[0141]

[0142] For example, if two workpieces are processed on two machines, and each workpiece has two processing steps, then the total binary code length calculated using the above formula is 16. Each pair of binary codes forms a real number code. The real number code is then converted into quantum code using the following process:

[0143] Quantum encoding:

[0144]

[0145] Here's an example, after converting to binary encoding:

[0146] 11011010|01101110

[0147] Therefore, the real number encoding is:

[0148] 2211|2121

[0149] In the example above, the left side of the code represents the process code, and the right side represents the machine code. In the process code section, the first occurrence of the process number indicates the first process of the workpiece, and each subsequent occurrence increments the process number by one. That is, the processing sequence and machine selection in the example can be expressed as: O 21 Using machine 2, O 22 Using machine 1, O 11 Using machine 2, O 12 Use machine 1.

[0150] Specifically, quantum encoding is introduced into QSSFA, where optimal individual fireflies are encoded using qubits. Common encoding methods include binary and decimal; in QSSFA, a pair of real numbers represents one qubit, and thus one individual firefly. First, an initial qubit argument is randomly generated for each individual firefly:

[0151]

[0152] Where θ = 2π·rand(), rand() is a random number between 0 and 1, j∈[1,d], and d represents the question dimension. Let Therefore, the probability amplitude of the qubit corresponding to an individual firefly is:

[0153]

[0154]

[0155] From the above formula, we can see that |Q i (t)> can be represented as:

[0156]

[0157] Where i represents the number of fireflies, i = 1, 2, ..., N; d represents the spatial dimension of the candidate solution; and θ is the argument of the qubit.

[0158] After generating the initial quantum firefly individuals, each individual needs to be transformed into a feasible solution in the solution space through a linear transformation. Only after the transformation is completed can the probability amplitude of the qubit be mapped to the solution space of the objective function.

[0159] From the above definition, the quantum encoding of the j-th dimension of the i-th firefly is: When the domain of the function is [LB, RB], the quantum code can be transformed through a linear transformation:

[0160]

[0161]

[0162] In QSSFA, quantum rotation gates are used to address the problem of getting trapped in local optima. Although QSSFA employs an adaptive step-size strategy, the possibility of the algorithm getting trapped in local optima cannot be avoided. Introducing quantum rotation gates to randomly move individual fireflies helps them escape local optima. Simultaneously, a small probability is allowed to cause the firefly population to mutate through quantum NOT gates.

[0163] The definition of a quantum rotating door is as follows:

[0164]

[0165] The process of updating the quantum code of the j-th dimension of the i-th firefly individual is as follows:

[0166]

[0167] Where θ is the quantum rotation angle, defined as θ = sign(α,β)Δθ

[0168]

[0169] In QSSFA, quantum NOT gates are also used to randomly mutate, in order to ensure the search space. For each dimension of each firefly individual, a random value θ is generated. Mutation occurs if and only if θ is less than an initially given default value θ0, for example, if the initial θ0 = 0.02.

[0170] The quantum NOT gate is defined as follows:

[0171]

[0172] The corresponding mutation operation is:

[0173]

[0174] Improved search strategy

[0175] In QSSFA, an adaptive step-size search strategy based on distance and brightness is used. In the original FA, attractiveness is related to Euclidean distance, and the step-size factor is randomly generated. QSSFA employs a novel approach to calculate attractiveness based on distance and an adaptive step-size that is optimal for each individual firefly.

[0176] For the adaptive step size α, the update strategy is as follows:

[0177] α=α·e -t / 4T (twenty one)

[0178] Where t is the current iteration number and T is the maximum number of iterations of the algorithm.

[0179] In the update strategy, boundary control is applied to the value of α to ensure its validity. Furthermore, α is reinitialized after each quantum rotation gate update to ensure the integrity of the optimization process and prevent local ineffective optimization due to excessive iterations and small step sizes.

[0180] In QSSFA, θ is updated as a parameter, and the transformation of θ into the solution space is only performed when calculating the function value, which is then used to calculate the function value as the light of the firefly. Due to the special property of θ, cosθ∈[-1,1], the step size factor α is controlled within [0,2π]. During the iteration process, it is unavoidable that the value of α will gradually approach 0, causing the update to have a smaller effect on optimizing the function value. Therefore, during the iteration process, α is controlled separately. Experimental tests have shown that the value of α is not less than 10% of the current optimal function result. -4 It is a feasible approach.

[0181] Meanwhile, in the update process where fireflies are attracted by light intensity, instead of using α, a new update strategy is employed:

[0182]

[0183] Where t is the number of algorithm iterations, r ij Let r be the Cartesian distance between individual fireflies, and β be the maximum attraction. ij The attractiveness when it is 0, rand∈[0,1] is a random number, and k is a custom parameter used to limit the magnitude of the effect of the step size, which is set to 0.01 by default.

[0184] When an individual reaches a local optimum, a random search method is used. The random search method uses α to limit the step size of the individual. The random search update strategy is as follows:

[0185] X i (t+1)=X i (t)+α(rand-0.5) (23)

[0186] In this case, α adopts the α update strategy described above and is continuously updated during the iteration process.

[0187] Improved stochastic neighborhood attraction model

[0188] Traditional firefly optimization (FA) employs a full attraction model, where each individual firefly is attracted to fireflies superior to itself. Because the optimization process involves nested loops, each firefly in the population N needs to undergo N-1 comparisons. On average, each firefly is attracted N-1 / 2 times, resulting in excessive time complexity and long algorithm runtime. Furthermore, this attraction method leads to an excessive number of moves and directions for each firefly, contributing to slow convergence and oscillations in the algorithm.

[0189] This embodiment proposes a model combining random attraction and neighborhood attraction. In the random neighborhood attraction model, individual fireflies are no longer attracted by all other fireflies during the algorithm process; instead, two attraction modes are employed. First, a firefly is randomly selected, and the best individual in its neighborhood is chosen. The firefly in the iteration is attracted only if this best individual is superior to the firefly in the iteration. Then, the best individual in the firefly's neighborhood is chosen again, and the firefly in the iteration is attracted and moves only if this neighboring individual is superior to the firefly in the iteration. This attraction model requires far fewer comparisons than the full attraction model, and the number of moves required by the firefly is also far less than in the full attraction model. This allows the random neighborhood attraction model to significantly reduce the algorithm's time complexity and the oscillations caused by the random attraction model, theoretically preventing the algorithm from getting trapped in local optima to some extent.

[0190] For the firefly algorithm, its effectiveness is determined by the number and distance of moves and position updates that occur when a firefly is attracted to a better firefly. However, an inadequate update method may lead to problems such as fireflies being attracted to less capable but closer fireflies in the initial stage, and excessively large update steps in the later stages of iteration. These issues can all reduce the overall convergence speed of the algorithm.

[0191] The proposed Quantum Firefly Algorithm with Stochastic Search Strategies combines the advantages of the firefly algorithm and quantum computing. QSSFA makes several optimizations and improvements in search strategy, search space exploration, and development. The main steps of the QSSFA algorithm are described below.

[0192]

[0193]

[0194] Step 1: Combine the parameters involved in the FJSP problem and establish a mathematical model;

[0195] Step 2: Convert the firefly code to correspond to the FJSP problem and establish an initial population; Step 3: Select an evaluation index and calculate the objective function value after encoding and decoding;

[0196] Step 4: Move the fireflies to the better fireflies according to the search strategy;

[0197] Step 6: Probabilistically update the position using a quantum rotating gate;

[0198] Step 5: Perform mutation operations according to different mutation probabilities;

[0199] Step 6: Update the step size factor;

[0200] Step 7: The algorithm terminates when the optimal fitness requirement is met or the number of iterations is reached.

[0201] Validation of effectiveness - Test function

[0202] For a new optimization algorithm, test functions should be used to evaluate its performance. This paper selects 10 test functions and verifies the proposed algorithm based on their different characteristics. Each test function is labeled with its name, mathematical expression, dimension, input domain, global minimum, and two-dimensional graphical representation.

[0203] Sphere Function

[0204]

[0205] In addition to the global optimum, the Sphere Function has d local optima. It is multidimensional, continuous, convex, and unimodal.

[0206] Dimension Solution space range Optimal solution optimal value 20 [-100,100] X=(0,0,…,0) 0

[0207] Griewank Function

[0208]

[0209] The Griewank function has many widely distributed local minima, which are regularly distributed. Its complexity is clearly illustrated in the figure. It is multidimensional, continuous, non-convex, and unimodal.

[0210] Dimension Solution space range Optimal solution optimal value 20 [-600,600] X=(0,0,…,0) 0

[0211] Schwefel 2.22 Function

[0212]

[0213] The Schwefel 2.22 Function, proposed by Schwefel, forms numerous local extrema as the independent variable approaches infinity. The global optimum lies on the boundary of the domain. It exhibits evenly distributed local minima, which are systematically distributed. It is a multidimensional, continuous, smooth, and unimodal function.

[0214] Dimension Solution space range Optimal solution optimal value 20 [-10,10] X=(0,0,…,0) 0

[0215] Schwefel 2.26 Function

[0216]

[0217] The Schwefel function is complex, with many widely distributed local minima. This figure shows the function in two dimensions, clearly demonstrating its complexity. It is multidimensional and multimodal.

[0218]

[0219]

[0220] Rosenbrock Function

[0221]

[0222] The Rosenbrock function, also known as the Valley or Banana function, is a common test problem for gradient-based optimization algorithms. Its global minimum lies within a narrow parabolic valley; however, while the valley is easy to find, convergence to the minimum is difficult. It is multidimensional, continuous, non-convex, and multimodal.

[0223] Dimension Solution space range Optimal solution optimal value 20 [-30,30] X=(1,1,…,1) 0

[0224] Step Function

[0225]

[0226] A step function consists of a series of horizontal line segments with jumps in between. Therefore, it is sometimes called a ladder function. As the function approaches infinity within its domain, it exhibits different step phenomena at given intervals, and generates numerous local extrema between each step, making it highly difficult to find the optimal solution.

[0227] Dimension Solution space range Optimal solution optimal value 20 [-100,100] X=(0,0,…,0) 0

[0228] Sum Squares Function

[0229]

[0230] The Sum Squares Function is a continuous, convex, unimodal function that has no local minima. It can be used to test the convergence ability of an algorithm and is relatively smooth.

[0231] Dimension Solution space range Optimal solution optimal value 20 [-10,10] X=(0,0,…,0) 0

[0232] Booth Function

[0233] f8(x) = (x1 + 2x2 - 7) 2 +(2x1+x2-5) 2 (31)

[0234] The booth function is usually evaluated on the square root X∈[-10,10]. It is two-dimensional, continuous, convex, and unimodal.

[0235] Dimension Solution space range Optimal solution optimal value 2 [-10,10] X=(1,3) 0

[0236] Easom Function

[0237]

[0238] The Easom function has several local minima. It is unimodal, and the global minimum is small relative to the area of ​​the search space. It is two-dimensional, continuous, non-convex, and multimodal.

[0239] Dimension Solution space range Optimal solution optimal value 2 [-100,100] X=(π,π,…,π) -1

[0240] Matyas Function

[0241]

[0242] The Matyas function has no local minima, only a global minimum. It is multidimensional, continuous, non-convex, and unimodal.

[0243] Dimension Solution space range Optimal solution optimal value 2 [-10,10] X=(0,0,…,0) 0

[0244] Experimental Results and Analysis

[0245] The performance of QSSFA was evaluated, and experiments were conducted based on the test functions given in the previous section. These test functions had different parameter settings and different global optima. The multi-dimensional test functions were tested using two methods with D=30 and 3 dimensions. The population size was set to 50 or 100, and the number of iterations was set to 5000 or 10000. Multiple experiments were conducted for each test group to minimize and reduce their variance.

[0246] Test functions 1, 2, 3, 7, 8, and 10 are unimodal functions, 4, 5, and 9 are multimodal functions, 6 is a step function, and 8, 9, and 10 are two-dimensional functions. Unimodal functions have only one global optimum and can be used to test the algorithm's optimization accuracy in the solution space. Multimodal functions have many global optima and can be used to test the algorithm's ability to explore the optimization space. For multimodal functions, the number of local optima increases exponentially with the number of decision variables.

[0247] like Figure 3 and Figure 4 As shown, QSSFA converges faster than the standard FA algorithm in the initial stage. While QSSFA's convergence speed slows slightly in the mid and late stages of convergence, it still maintains faster and better convergence performance compared to FA.

[0248] Attraction, attraction model, and step size factor play crucial roles in the search process of Algorithm Forecasting (FA). They are the most important factors for FA algorithms to find better candidate solutions. The fully attractive model used in standard FA leads to high complexity and oscillations during the search process. To address these issues, the QSSFA algorithm is proposed, which combines quantum computing with a stochastic neighborhood search model and adaptive step size. The superposition of quantum multi-qubit states improves the algorithm's efficiency. Quantum rotation gates and quantum NOT gates are introduced into the QSSFA algorithm iterations. The quantum rotation gate ensures utilization of the search space, while the quantum NOT gate ensures exploration of the search space. The stochastic neighborhood search model of QSSFA reduces the algorithm's complexity and, to some extent, improves its ability to escape local optima. The adaptive step size improves the algorithm's optimization accuracy and efficiency. Experiments conducted on 10 commonly used benchmark functions verify the effectiveness, stability, and competitiveness of the QSSFA algorithm in different dimensions and search spaces.

[0249] Example 2

[0250] This embodiment provides a flexible job shop scheduling and system based on the quantum firefly search mechanism, including:

[0251] The module for establishing mathematical models of scheduling problems is configured to establish mathematical models for the flexible job shop scheduling problem.

[0252] The objective function construction module is configured to construct the Firefly objective function for the flexible job shop scheduling problem with the overall minimum of the minimum processing time rule, the global workload balancing rule, and the scheduling component rule as the objective.

[0253] The objective function solving module is configured to use a quantum firefly search mechanism based on adaptive step size of distance and brightness to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, i.e. the optimal solution to the flexible job shop scheduling problem.

[0254] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.

[0255] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0256] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0257] Example 3

[0258] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the flexible job shop scheduling method based on the quantum firefly search mechanism described in Embodiment 1 above.

[0259] Example 4

[0260] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the flexible job shop scheduling method based on the quantum firefly search mechanism as described in Embodiment 1 above.

[0261] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0262] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0263] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0264] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0265] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0266] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A flexible job shop scheduling method based on the quantum firefly search mechanism, characterized in that, include: A mathematical model was established for the scheduling problem in flexible workshops. The Firefly objective function for the flexible job shop scheduling problem is constructed with the overall goal of minimizing the minimum processing time rule, the global workload balancing rule, and the scheduling component rule. By using a quantum firefly search mechanism based on adaptive step size of distance and brightness, the firefly objective function of the flexible job shop scheduling problem is solved, and the optimal solution is obtained, which is the optimal solution to the flexible job shop scheduling problem. The flexible workshop scheduling problem involves O operations and n workpieces processed by m machines. The mathematical model for this problem is: for each operation... Any available candidate machine In Process it; exist The operation time on is recorded as ; Let l represent the l-th preventive maintenance task on machine z, where z = 1, 2, ..., m; l = 1, 2, ..., m. ; The total number of preventative maintenance tasks on machine z, and the number of maintenance tasks. The duration is ; yes The completion time of the operation; The objective function of the flexible job shop scheduling problem, as described in the "Firefly" example, is as follows: The weighted sum of the three objective values ​​mentioned above is taken as the combined objective function, which is the firefly objective function for the flexible job shop scheduling problem: , in, yes The weighting coefficients, These represent the maximum time, yes The weighting coefficients, This is the maximum machine workload. yes The weighting coefficients, It is the machine's total workload; each operation One of the candidate machines The operation time on is recorded as ; The total number of preventative maintenance tasks on machine z. This indicates the l-th preventative maintenance task on machine z; maintenance task. The duration is ; yes The completion time of the operation; n is the number of workpieces, u is the u-th workpiece, and v is the v-th operation; The quantum firefly search mechanism, based on adaptive step sizes of distance and brightness, is used to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, including: Step 1: Initialize parameters: total number of fireflies N, total number of calculation steps, maximum number of iterations, step size factor, attraction factor, mutation factor. ; Step 2: Randomly generate a qubit probability amplitude for each individual firefly; Step 3: Decode the probability amplitude of the qubit and convert it into a real number process selection code. Based on the machine selection method, select the processing machine for the process probabilistically, calculate the individual brightness through the objective function, and record the current optimal solution. Step 4: Randomly generate angles ,when Perform a quantum NOT gate mutation. Perform a quantum rotating door update; Step 5: Based on the random neighborhood model, select firefly individuals for comparison. When the brightness of a firefly individual in the iteration is less than that of the comparison firefly individual, update its position. Step 6: If the firefly individual in the current iteration is the best individual in this iteration, then perform a random search update of the individual; Step 7: Update the step size factor; Step 8: Determine if the maximum number of iterations has been reached, and exit the loop if necessary; otherwise, increment the iteration count and return to step 3. Step 9: After exiting the loop, convert the individual probability amplitude code back into the real number individual process selection code. Calculate the processing machine for the process using the machine selection method, rank the fireflies, find the best result, and return its corresponding process selection code and machine selection code.

2. The flexible job shop scheduling method based on the quantum firefly search mechanism as described in claim 1, characterized in that, The random generation of qubit probability amplitudes for each individual firefly includes: Each process number and its corresponding executing machine number in the mathematical model of the flexible workshop scheduling problem are represented as a firefly. A two-layer coding method combining process coding and machine coding is used to obtain the binary code of each individual firefly; Convert the binary code of each individual firefly into the real number code of each individual firefly; The qubit probability amplitude of each firefly is obtained based on the real-number encoding of each individual firefly.

3. The flexible job shop scheduling method based on the quantum firefly search mechanism as described in claim 1, characterized in that, The formula for calculating the location update is: in, Individual fireflies i The probability angle of the qubit. It is the number of algorithm iterations. Individual fireflies i and firefly individuals j Cartesian distance between them It is the light absorption coefficient; For maximum attraction Attractiveness when it is 0, rand It is a random number. A custom parameter is used to limit the effect of the step size; the default value here is 0.

01. The formula for calculating random search updates is: in, For adaptive step size.

4. The flexible job shop scheduling method based on the quantum firefly search mechanism as described in claim 1, characterized in that, The machine selection method is as follows: Add the processing time of each available processing machine in the current process, the completion time of its previous process, and the cost of preventive maintenance tasks, and select the machine with the smallest value to ensure workload balance. Probabilistic random selection uses a probabilistic selection method based on machine processing time; that is, the shorter the processing time, the greater the probability that the machine will be selected.

5. A flexible job shop scheduling system based on the quantum firefly search mechanism, characterized in that, include: The module for establishing mathematical models of scheduling problems is configured to establish mathematical models for the flexible job shop scheduling problem. The objective function construction module is configured to construct the Firefly objective function for the flexible job shop scheduling problem with the overall minimum of the minimum processing time rule, the global workload balancing rule, and the scheduling component rule as the objective. The objective function solving module is configured to use a quantum firefly search mechanism based on adaptive step size of distance and brightness to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, that is, the optimal solution to the flexible job shop scheduling problem. The flexible workshop scheduling problem involves O operations and n workpieces processed by m machines. The mathematical model for this problem is: for each operation... Any available candidate machine In Process it; exist The operation time on is recorded as ; This indicates the l-th preventative maintenance task on machine z; Where z = 1, 2, ..., m; l = 1, 2, ... ; The total number of preventative maintenance tasks on machine z, and the number of maintenance tasks. The duration is ; yes The completion time of the operation; The objective function of the flexible job shop scheduling problem, as described in the "Firefly" example, is as follows: The weighted sum of the three objective values ​​mentioned above is taken as the combined objective function, which is the firefly objective function for the flexible job shop scheduling problem: , in, yes The weighting coefficients, These represent the maximum time, yes The weighting coefficients, This is the maximum machine workload. yes The weighting coefficients, It is the machine's total workload; each operation One of the candidate machines The operation time on is recorded as ; The total number of preventative maintenance tasks on machine z. This indicates the l-th preventative maintenance task on machine z; maintenance task. The duration is ; yes The completion time of the operation; n is the number of workpieces, u is the u-th workpiece, and v is the v-th operation; The quantum firefly search mechanism, based on adaptive step sizes of distance and brightness, is used to solve the firefly objective function of the flexible job shop scheduling problem and obtain the optimal solution, including: Step 1: Initialize parameters: total number of fireflies N, total number of calculation steps, maximum number of iterations, step size factor, attraction factor, mutation factor. ; Step 2: Randomly generate a qubit probability amplitude for each individual firefly; Step 3: Decode the probability amplitude of the qubit and convert it into a real number process selection code. Based on the machine selection method, select the processing machine for the process probabilistically, calculate the individual brightness through the objective function, and record the current optimal solution. Step 4: Randomly generate angles ,when Perform a quantum NOT gate mutation. Perform a quantum rotating door update; Step 5: Based on the random neighborhood model, select firefly individuals for comparison. When the brightness of a firefly individual in the iteration is less than that of the comparison firefly individual, update its position. Step 6: If the firefly individual in the current iteration is the best individual in this iteration, then perform a random search update of the individual; Step 7: Update the step size factor; Step 8: Determine if the maximum number of iterations has been reached, and exit the loop if necessary; otherwise, increment the iteration count and return to step 3. Step 9: After exiting the loop, convert the individual probability amplitude code back into the real number individual process selection code. Calculate the processing machine for the process using the machine selection method, rank the fireflies, find the best result, and return its corresponding process selection code and machine selection code.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the flexible job shop scheduling method based on the quantum firefly search mechanism as described in any one of claims 1-4.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the flexible job shop scheduling method based on the quantum firefly search mechanism as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Multi-objective flexible job shop scheduling method based on discrete firefly algorithm

    CN106707990A

  • Quantum firefly search optimization method based on chaos self-adaption

    CN114757321A