Workshop job scheduling method and system based on trust technology and fast flexible full embedding
By constructing a graph attention network and utilizing trust technology and a fast and flexible fully pure embedding algorithm, the workshop job scheduling is optimized, solving the problems of strong parameter dependence and multiple solutions in the existing technology, and realizing the generation of efficient and high-quality scheduling schemes.
Patent Information
- Application Number
- CN202310492433.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-04-28
AI Technical Summary
Existing technologies cannot efficiently obtain high-quality scheduling solutions in workshop operation scheduling. In particular, neural network-based algorithms depend on parameter values and cannot guarantee a globally optimal solution. The improved marine predator algorithm has the problem of multiple optimal solutions.
We employ a trust-based and fast, flexible, fully pure embedding approach. By constructing a graph attention network and training it using the trust technique, we obtain a locally optimal solution set. Then, we optimize the graph attention network parameters and improve the quality of the scheduling scheme through optimal linear combination using the fast, flexible, fully pure embedding algorithm.
It effectively avoids local optima, efficiently searches for high-quality or globally optimal parameters, improves the performance of graph attention networks, and can efficiently obtain high-quality scheduling solutions for workshop scheduling problems.
Smart Images

Figure CN116382215B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of job shop scheduling, and more particularly, to a job shop scheduling method and system based on trust technology and fast flexible full embedding. BACKGROUND
[0002] Job shop scheduling is a classic optimization problem, which has application scenarios in various fields, such as supply chain and logistics, marketing activities, management technology, etc. The model of this problem is an optimization scheduling model of multiple task sequences, the operation order of the task is fixed, and a single task needs to occupy the resource within the specified processing time, and the optimization goal is to give a reasonable and time-consuming shortest resource scheduling scheme. Job shop scheduling is a typical NP-hard problem, which usually has multiple local optimal solutions, and the current precise global optimization algorithm is slow in calculation for large-scale problems, which seriously affects the economy and safety of enterprise production. Therefore, researchers have proposed many neural network-based algorithms that can quickly find the local optimal solution of such problems. Among them, the Job-shop Schedule Problem Deep Neural Network (JSP-DNN) algorithm based on supervised learning adopts a three-layer neural network architecture, which can quickly predict the approximate solution of such problems. However, this method has very big limitations: 1) The quality of the solution obtained by this algorithm depends largely on the selection of parameter values, and the training method of this network (Adam algorithm) can usually only find a set of local optimal parameters, and cannot guarantee to find higher quality or globally optimal parameters; 2) A set of parameters of this algorithm model can only solve problems of a certain size, and if other size problems need to be solved, a new set of parameters needs to be trained.
[0003] The prior art discloses a method for solving job shop scheduling based on an improved marine predator algorithm, comprising the following steps: S1: obtaining the initialization conditions of job shop scheduling; S2: determining the corresponding minimum processing time and the corresponding optimal scheduling solution based on the initialization conditions and the improved marine predator algorithm; S3: generating a corresponding scheduling scheme Gantt chart based on the minimum processing time and the optimal scheduling solution. However, this method has multiple optimal solutions, and the neural network-based algorithm has limitations, the quality of the solution depends on the value of the parameters, and it cannot guarantee to find higher quality parameters. SUMMARY
[0004] To overcome the defect that the prior art cannot efficiently obtain a high-quality scheduling scheme when solving the job shop scheduling problem, the present application provides a job shop scheduling method and system based on trust technology and fast flexible full embedding, which can efficiently obtain a high-quality scheduling scheme for the job shop scheduling problem.
[0005] To solve the above technical problems, the technical solutions of the present application are as follows:
[0006] The application discloses a workshop operation scheduling method based on trust technology and fast flexible full embedding, comprising:
[0007] S1: obtaining production data of jobs, tasks and machines in a production workshop, setting an objective function and constraint conditions of a workshop operation scheduling problem, and converting the jobs, tasks and machines into a disjunctive graph model;
[0008] S2: constructing a graph attention network based on the disjunctive graph model;
[0009] S3: training the graph attention network by using the trust technology to obtain a local optimal solution set of parameters of the graph attention network;
[0010] S4: performing optimal linear combination solution on the local optimal solution set of the parameters of the graph attention network by using the trust technology and a fast flexible full embedding algorithm to obtain optimal parameters of the graph attention network;
[0011] S5: obtaining an optimized graph attention network according to the optimal parameters of the graph attention network; obtaining a starting time prediction value of each task by using the optimized graph attention network, and scheduling unscheduled workshop operations based on the prediction value.
[0012] Preferably, in the step S1, the specific method for obtaining the production data of the jobs, tasks and machines in the production workshop and setting the objective function and constraint conditions of the workshop operation scheduling problem is as follows:
[0013] The production workshop contains a plurality of jobs in a period of time, and each job contains a plurality of tasks; the tasks are processed by a plurality of machines in the production workshop;
[0014] The objective function and constraint conditions of the workshop operation scheduling problem are as follows:
[0015] P(d)=argmin s u (1)
[0016]
[0017]
[0018]
[0019]
[0020] In the formula, d represents a processing time set of all tasks, s represents a processing start time set of all tasks, and u represents a maximum completion time of all tasks; j and j' represent the jth and j'th jobs, j and j' = 1,..., J, j ≠ j', and J represents the maximum number of job items; t and t' represent the tth and t'th tasks, t and t' = 1,..., T, t ≠ t', and T represents the maximum number of tasks included in each job; s j represents the start time of each task in the jth job, d j represents the processing time of all tasks in the jth job; s j,t+1 represents the start time of the t+1th task in the jth job, s j,t represents the start time of the tth task in the jth job, d j,t represents the processing time of the tth task in the jth job; s j',t' represents the start time of the t'th task in the j'th job, d j',t' represents the processing time of the t'th task in the j'th job, and v represents a logical OR; m j,t represents a machine processing the tth task in the jth job, m j',t' represents a machine processing the t'th task in the j'th job. u represents an integer.
[0021] The constraint condition (2a) indicates that u must be the maximum completion time, the constraint condition (2b) indicates that all tasks need to be processed in a set order, the constraint condition (2c) indicates that a machine can only process one task at a time, and the constraint condition (2d) indicates that the start time of all tasks is an integer.
[0022] Preferably, in the step S1, the specific method of converting the jobs, tasks and machines into a disjunctive graph model is as follows:
[0023] All tasks of a production workshop within a period of time are taken as graph nodes, the graph nodes of tasks belonging to the same job are connected by directed arcs, the graph nodes of tasks processed by the same machine are connected by disjunctive arcs, each disjunctive arc is regarded as a pair of arcs with opposite directions, and a disjunctive graph model G = (O, C, D) is converted, where O represents a node set of all tasks, C represents a directed arc set connecting adjacent task nodes of the same job, and D represents a disjunctive arc set connecting adjacent task nodes of the same machine.
[0024] Preferably, the specific method of the step S2 is as follows:
[0025] For the disjunctive graph model G = (O, C, D), a graph attention network is input, a feature vector corresponding to each task graph node is calculated, and the attention coefficient of each graph node and its adjacent graph nodes is calculated.
[0026]
[0027] where e ij denotes the attention coefficient between the i-th graph node and the j-th neighboring graph node, W denotes the weight matrix, denotes the feature vector of the i-th graph node, denotes the feature vector of the j-th neighboring graph node, || denotes vector concatenation, a denotes the parameter vector, a T denotes the transpose of a, ReLU(*) is the activation function;
[0028] The attention coefficient of each graph node and all its neighboring graph nodes is normalized:
[0029]
[0030] where a ij denotes the normalized attention coefficient between the i-th graph node and the j-th neighboring graph node, N i denotes the set of neighboring graph nodes of the i-th graph node, e ir denotes the attention coefficient between the i-th graph node and the r-th neighboring graph node;
[0031] The feature vector of the graph node is updated:
[0032]
[0033] where denotes the updated feature vector of the i-th graph node, σ(·) denotes the nonlinear activation function;
[0034] The above steps are repeated Z times for each graph node, and the mean of the updated feature vectors of the graph nodes obtained by Z independent self-attention calculation processes is calculated:
[0035]
[0036] where denotes the mean of the updated feature vectors of the i-th graph node, denotes the normalized attention coefficient between the i-th graph node and the j-th neighboring graph node in the z-th self-attention calculation process, Wz denotes the weight vector of the z-th self-attention calculation process, z = 1, …, Z;
[0037] The mean of the updated feature vectors of the graph nodes is input into a multi-layer perceptron to obtain the start time prediction value of the task corresponding to the graph node:
[0038]
[0039] where denotes the predicted start time of the i-th task, MLP(·) denotes a multi-layer perceptron, and denotes the parameters of the multi-layer perceptron;
[0040] The above steps are repeated for all graph nodes to obtain the predicted start time of each task.
[0041] The original data of jobs, tasks, and machines of the job shop scheduling problem are converted into features that can better express the essence of the job shop scheduling problem, which is conducive to improving the accuracy of the graph attention network and enabling the graph attention network to solve job shop scheduling problems of various scales with a set of parameters.
[0042] Preferably, the specific method of step S3 is:
[0043] S3.1: Calculate the reference solution of the job shop scheduling problem, i.e., the reference value of the start time of each task, using existing algorithms;
[0044] S3.2: Take the job shop scheduling problem as training set data, and let the set of predicted start times of all tasks be Let where w denotes the graph attention network parameters to be optimized, and the loss function is set as:
[0045]
[0046] where denotes the loss function value, s' denotes the set of reference values of the start times of all tasks, and s' denotes the set of predicted start times of all tasks. p denotes the p-th component of s', denotes the p-th component of , and |·| denotes the L1 distance operation; λ b denotes the first violation coefficient, denotes the degree of violation of the predicted start time of the task to the constraint condition (2b); λ c denotes the second violation coefficient, denotes the degree of violation of the predicted start time of the task to the constraint condition (2c);
[0047] S3.3: Randomly initialize the graph attention network parameters to be optimized as
[0048] S3.4: Use the stochastic gradient descent method to solve , obtain the initial local optimal solution w0, and randomly generate an initial search direction d0;
[0049] S3.5: Starting from w0, move along the search direction d k to obtain:
[0050] w 0k= w0+ p1(k)d k
[0051] wherein, denotes the point reached by the kth search, p1is a moving step, p1(k) denotes the kth moving step, p1e(0, p max ], p max is the maximum moving step, p1monotonically increases from 0 to p max ; d k denotes the kth search direction, k = 0,..., k max ;
[0052] S3.6: determining whether the loss function is stably decreased, i.e., whether an escape point is reached; if not, performing step S3.7; otherwise, performing step S3.9;
[0053] S3.7: updating the search direction:
[0054]
[0055] wherein, d k+1 denotes the updated search direction, p2denotes an updating step, p2(k) denotes the kth search step, denotes the gradient of the loss function on the search direction d k ;
[0056] S3.8: determining whether the updated search direction d k+1 is greater than If not, moving along the updated search direction, and repeating steps S3.5-S3.6; otherwise, generating a new initial search direction, and repeating steps S3.4-S3.6;
[0057] S3.9: using the stochastic gradient descent method to calculate a new local optimal solution on the local optimal convergence domain corresponding to the escape point;
[0058] S3.10: determining whether a preset training time is reached; if not, taking the new local optimal solution as an initial local optimal solution, and repeating steps S3.5-S3.9; otherwise, taking all the local optimal solutions to form a local optimal solution set of the graph attention network parameters, the local optimal solution set of the graph attention network parameters being W = {w0,..., w n}, w n denotes the nth local optimal solution.
[0059] The trust technology is used for training the graph attention network, a plurality of sets of local optimal parameters are found along a dynamic search path from a local optimal solution, local optimal solutions can be effectively avoided, parameter space is searched for the graph attention network, high-quality or global optimal parameters are searched, and performance of the graph attention network is effectively improved. When a plurality of local optimal parameters are searched, a convergence domain of the local optimal solution is found, and the local optimal solution is obtained through a local solver; because it is difficult to find the convergence domain along a fixed search direction, the initial search direction is randomly selected, the search direction is updated according to the gradient of the loss function, and the local optimal solution can be efficiently searched.
[0060] Preferably, in the step S3.2, the calculation method of the violation degree of the start time prediction value of the task to the constraint condition is:
[0061] The calculation method of the violation degree of the start time prediction value of the task to the constraint condition (2b) is:
[0062]
[0063] In the formula, denotes the start time prediction value of the tth task in the jth job, denotes the start time prediction value of the (t+1)th task in the jth job;
[0064] The calculation method of the violation degree of the start time prediction value of the task to the constraint condition (2c) is:
[0065]
[0066]
[0067]
[0068] In the formula, denotes the first violation degree term, denotes the second violation degree term, denotes the first violation degree function, denotes the second violation degree function, denotes the start time prediction value of the t'th task in the j'th job.
[0069] Preferably, the specific method of the step S4 is:
[0070] S4.1: a quadratic optimization problem is established for the local optimal solution set of the graph attention network parameter:
[0071]
[0072] In the formula, v denotes a linear combination coefficient vector, v=(v1, …, vn T n denotes the nth linear coefficient vector; e = (1, …, 1) T denotes a column vector with all elements being 1; C denotes a correlation matrix, and the element of the correlation matrix C is:
[0073]
[0074] wherein C ij denotes the element in the ith row and jth column of the correlation matrix C; f i (x q ) denotes the graph attention network output of the qth training set sample under the local optimal parameter w i ; f j (x q ) denotes the graph attention network output of the qth training set sample under the local optimal parameter w j ; t(x q ) denotes the label value of the qth training set sample;
[0075] S4.2: solving the quadratic optimization problem by using the logarithmic barrier function, constructing the logarithmic barrier function:
[0076]
[0077] wherein λ denotes a first constant, μ denotes a second constant, v i denotes the ith linear coefficient vector;
[0078] The KKT condition is:
[0079]
[0080]
[0081] The real solution of (4a)-(4b) is usually a local optimal solution of the quadratic optimization problem (3), so that the subsequent quadratic optimization problem (3) can be solved by solving the equation group (4a)-(4b) to obtain a local optimal solution of the quadratic optimization problem (3);
[0082] wherein V = diag(v1, …, v n ), denotes a diagonal matrix with diagonal elements being v1, …, v n , and multiplying V on both sides of (4a) to obtain:
[0083]
[0084] that is, the algebraic equation group:
[0085]
[0086] where C 1j denotes the element in the first row and the jth column of the correlation matrix C, v j denotes the jth linear coefficient vector, C nj denotes the element in the nth row and the jth column of the correlation matrix C.
[0087] S4.3: Rewrite formula (6) as x = (x1, x2, …, x n+1 ) T , x1, x2, …, x n+1 correspond to v1, v2, …, v n , λ, respectively, then h(x) = [h1(x), h2(x), …, h n+1 (x)] T , introduce a continuous parameter t, and construct a homotopy function:
[0088] H(x, t) = (1-t)g(x) + th(x) (7)
[0089] where,
[0090]
[0091] In the formula, H(x, t) represents the homotopy function, h(x) represents the first rewritten function, and g(x) represents the second rewritten function.
[0092] S4.4: Solve the local optimal solution of the algebraic equation set using the fast flexible holomorphic embedding algorithm
[0093] S4.5: Construct a nonlinear dynamic system related to formula (5):
[0094]
[0095] Each local optimal solution of the quadratic optimization problem corresponds to a stable equilibrium point of the nonlinear dynamic system.
[0096] S4.6: Select L orthogonal search directions Starting from the local optimal solution of the algebraic equation set , move along the orthogonal search direction to search for the escape point of the nonlinear dynamic system , and then move to
[0097]
[0098] In the formula, x' represents a point in the new stable domain, located in the stable domain of the stable equilibrium point, , and the stable domain of the stable equilibrium point The escape points found are l = 1, ..., L, where L represents the total number of orthogonal search directions selected;
[0099] Using x′ as the initial point, a fast and flexible holomorphic embedding algorithm is used to find the local optimum.
[0100] Choose a direction After performing the search, the local optimal solutions obtained from each search are combined into an optimal solution set V. γ ;
[0101] S4.7: From the optimal solution set V γ Select the optimal solution to the quadratic optimization problem:
[0102] v * =argmin v {E(v)|v∈V γ}
[0103] In the formula, v * This represents the optimal solution to a quadratic optimization problem, i.e., the optimal linear coefficient vector.
[0104] S4.8: Calculate the optimal parameters of the graph attention network based on the optimal linear coefficient vector and the local optimal solution set of the graph attention network parameters.
[0105] Preferably, the specific method of step S4.4 is as follows:
[0106] S4.4.1: For a system of algebraic equations, let P be the maximum order of the sum of the power series parts. max Let ε be the allowable error threshold for both sides of the equation, and let α be the maximum arc length for each expansion. max Let t = 0, then H(x, t) = g(x), and we can find the initial set of real points X0 = (x1(0), x2(0), ..., x n+1 The values of (0), t(0));
[0107] S4.4.2: Introducing parameter γ, selecting the arc length parameterized equation, and then solving the simultaneous equations, we obtain the embedded system:
[0108]
[0109] H(x(γ), t(γ))=0
[0110] In the formula, x k Let x0 represent the k-th element in the initial set of real points, where k = 1, 2, ..., n+1;
[0111] S4.4.3: for x k (γ), t(γ) sets the power series with γ as the parameter:
[0112]
[0113]
[0114] wherein, denotes x k the coefficient of the term of degree p in the power series expansion of γ; p denotes the degree;
[0115] S4.4.4: Substitute the power series into the embedding system, to obtain a system of equations with the coefficients of the power series expansion as unknowns:
[0116]
[0117]
[0118] wherein μ denotes a second constant;
[0119] S4.4.5: Compare the coefficients of the same degree of γ: when p = 0, there is:
[0120]
[0121]
[0122] when p = 1, there is:
[0123]
[0124]
[0125] Since is known, let then the above equation is rewritten as:
[0126]
[0127] wherein y denotes the vector to be solved, y i is the i-th element in y, A denotes an (n+1) x (n+2) order matrix, and B denotes a column vector;
[0128] Solve equation (9) to obtain the value of ;
[0129] when p max ≥ p ≥ 2, the system of equations satisfied is a linear system of equations, which can be solved by using classical methods;
[0130] S4.4.6: According to the power series of x k (γ), t(γ), construct a rational approximation function;
[0131] S4.4.7: Substitute the value of the rational approximation function at γ = γ0 into the algebraic equation set, compare whether the difference between the left and right sides of the algebraic equation set is less than the preset allowable error threshold ε; if yes, expand γ0 until the difference is not less than the preset allowable error threshold ε; if no, reduce γ0 until the difference is less than the preset allowable error threshold ε; when μ→0, the local optimal solution of the algebraic equation set is obtained
[0132] For the local optimal solution, different local optimal solutions are appropriately combined, and the generalization performance of the single local optimal solution is better; the application obtains the optimal linear combination of the local optimal solution set by establishing a quadratic optimization problem, using trust technology and an interior point method to solve, thereby obtaining higher quality parameters and further improving the performance of the graph attention network; when the interior point method is used to solve the quadratic optimization problem, an algebraic equation set needs to be solved, the convergence speed of the conventional block method is slow, and divergence may occur, and the application uses a fast flexible pure embedding algorithm to efficiently solve the algebraic equation set.
[0133] Preferably, in the step S5, the specific method for scheduling the unscheduled workshop jobs by using the optimized graph attention network is:
[0134] S5.1: input all the unscheduled workshop jobs into the optimized graph attention network;
[0135] S5.2: select a task sequence on the unscheduled workshop job j;
[0136] S5.3: predict the start time of the earliest starting unscheduled task:
[0137]
[0138] In the formula, denotes the predicted start time of the t+1th task in the jth unscheduled job, denotes the predicted start time of the tth task in the jth unscheduled job, denotes the processing time of the tth task in the jth unscheduled job;
[0139] S5.4: predict the start time of the subsequent task of the machine processing the earliest starting unscheduled task:
[0140]
[0141] In the formula, denotes the predicted start time of the t'th task in the j'th unscheduled job;
[0142] S5.5: repeat steps S5.3-S5.4 until the start time of all tasks on the unscheduled workshop job j has been predicted, and the tasks are scheduled according to the corresponding start time prediction value;
[0143] S5.6: repeat steps S5.2-S5.5 until all unscheduled workshop jobs have been scheduled.
[0144] The application also provides a workshop job scheduling system based on trust technology and fast flexible full embedding, comprising:
[0145] A data acquisition and conversion module is configured to acquire production data of jobs, tasks and machines in a production workshop, set an objective function and constraint conditions of a workshop job scheduling problem, and convert the jobs, tasks and machines into a disjunctive graph model;
[0146] A network construction module is configured to construct a graph attention network based on the disjunctive graph model;
[0147] A network training module is configured to train the graph attention network by using trust technology, and obtain a local optimal solution set of parameters of the graph attention network;
[0148] A parameter optimization module is configured to perform optimal linear combination solution on the local optimal solution set of parameters of the graph attention network by using trust technology and a fast flexible full embedding algorithm, and obtain optimal parameters of the graph attention network;
[0149] A workshop task scheduling module is configured to obtain an optimized graph attention network according to the optimal parameters of the graph attention network, obtain a start time prediction value of each task by using the optimized graph attention network, and schedule unscheduled workshop jobs based on the prediction value.
[0150] Compared with the prior art, the technical scheme of the application has the following beneficial effects:
[0151] The application firstly acquires production data of jobs, tasks and machines in a production workshop, sets an objective function and constraint conditions of a workshop job scheduling problem, and converts the jobs, tasks and machines into a disjunctive graph model; then constructs a graph attention network based on the disjunctive graph model; when the production data is converted into the disjunctive graph and input into the graph attention network for processing, the characteristics reflecting the nature of the workshop scheduling problem can be obtained, which is beneficial to improve the precision of training the graph attention network; then the graph attention network is trained by using the trust technology to obtain a local optimal solution set of the graph attention network parameters, which can effectively avoid falling into a local optimal solution, efficiently search for high-quality or global optimal parameters, and improve the effect of the graph attention network; finally, since a proper combination of different local optimal solutions has better generalization performance than a single local optimal solution, the application uses the trust technology and the fast flexible holomorphic embedding algorithm to efficiently perform optimal linear combination solving on the local optimal solution set of the graph attention network parameters, obtain higher-quality optimal parameters, and further improve the performance of the graph attention network; the optimal parameters are assigned to the graph attention network, and the starting time prediction value of each task is obtained by using the optimized graph attention network to schedule the unscheduled workshop jobs. The application can efficiently obtain a high-quality scheduling scheme of the workshop scheduling problem. BRIEF DESCRIPTION OF DRAWINGS
[0152] Figure 1 Flowchart of the workshop job scheduling method based on the trust technology and the fast flexible holomorphic embedding of embodiment 1.
[0153] Figure 2 Disjunctive graph schematic diagram of the workshop scheduling problem of three jobs and three machines described in embodiment 2.
[0154] Figure 3 Flowchart of obtaining the local optimal solution set of the graph attention network parameters described in embodiment 2.
[0155] Figure 4 Flowchart of obtaining the optimal parameters of the graph attention network described in embodiment 2.
[0156] Figure 5 Flowchart of solving real solutions of the algebraic equation set by using the fast flexible holomorphic embedding algorithm described in embodiment 2.
[0157] Figure 6 Flowchart of scheduling the unscheduled workshop jobs by using the optimized graph attention network described in embodiment 2.
[0158] Figure 7 Structural schematic diagram of the workshop job scheduling system based on the trust technology and the fast flexible holomorphic embedding described in embodiment 3. DETAILED DESCRIPTION
[0159] The accompanying drawings are only used for illustrative purposes and cannot be understood as a limitation of the patent;
[0160] In order to better illustrate the present embodiment, some components in the drawings may be omitted, enlarged or reduced, and do not represent the actual size of the product;
[0161] It is understandable for those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.
[0162] The technical solutions of the present application will be further described below in combination with the drawings and embodiments.
[0163] Embodiment 1
[0164] The present embodiment discloses a job shop scheduling method based on trust technology and fast flexible full embedding, as shown in Figure 1 , comprising:
[0165] S1: obtaining production data of jobs, tasks and machines in a production workshop, setting an objective function and constraint conditions of a job shop scheduling problem, and converting the jobs, tasks and machines into a disjunctive graph model;
[0166] S2: constructing a graph attention network based on the disjunctive graph model;
[0167] S3: training the graph attention network using trust technology to obtain a local optimal solution set of the graph attention network parameters;
[0168] S4: using trust technology and fast flexible full embedding algorithm to solve the optimal linear combination of the local optimal solution set of the graph attention network parameters, and obtaining the optimal parameters of the graph attention network;
[0169] S5: obtaining the optimized graph attention network according to the optimal parameters of the graph attention network; using the optimized graph attention network to obtain the starting time prediction value of each task, and scheduling the unscheduled job shop based on the prediction value.
[0170] In the implementation process, the embodiment first acquires production data of jobs, tasks and machines in a production workshop, sets an objective function and constraint conditions of a workshop job scheduling problem, and converts the jobs, tasks and machines into a disjunctive graph model; then a graph attention network is constructed based on the disjunctive graph model; when the production data is converted into the disjunctive graph and input into the graph attention network for processing, the characteristics reflecting the nature of the workshop scheduling problem can be obtained, which is beneficial to improve the precision of training the graph attention network; the graph attention network is trained by using the trust technology to obtain a local optimal solution set of the graph attention network parameters, which can effectively avoid falling into a local optimal solution, efficiently search for high-quality or global optimal parameters, and improve the effect of the graph attention network; finally, since a proper combination of different local optimal solutions has better generalization performance than a single local optimal solution, the trust technology and the fast flexible holomorphic embedding algorithm are used to efficiently perform optimal linear combination solving on the local optimal solution set of the graph attention network parameters, so as to obtain higher-quality optimal parameters and further improve the performance of the graph attention network; the optimal parameters are assigned to the graph attention network, and the starting time prediction value of each task is obtained by using the optimized graph attention network to schedule the unscheduled workshop jobs. The high-quality scheduling scheme of the workshop scheduling problem can be efficiently obtained.
[0171] Embodiment 2
[0172] The embodiment discloses a workshop job scheduling method based on trust technology and fast flexible holomorphic embedding, comprising:
[0173] S1: acquiring production data of jobs, tasks and machines in a production workshop, setting an objective function and constraint conditions of a workshop job scheduling problem, and converting the jobs, tasks and machines into a disjunctive graph model;
[0174] The production workshop contains a plurality of jobs in a period of time, and each job contains a plurality of tasks; the tasks are processed by a plurality of machines in the production workshop;
[0175] The objective function and constraint conditions of the workshop job scheduling problem are:
[0176] P(d)=argmin s u (1)
[0177]
[0178]
[0179]
[0180]
[0181] wherein d represents a set of processing time of all tasks, s represents a set of processing start time of all tasks, u represents a maximum completion time of all tasks; j, j' represent the j, j' item job, j, j' = 1,..., J, j ≠ j', J represents the maximum job item number; t, t' represent the t, t' item task, t, t' = 1,..., T, t ≠ t', T represents the maximum task item number contained in each job item; represents the start time of each task in the j item job, represents the processing time of all tasks in the j item job; represents the start time of the t+1 item task in the j item job, represents the start time of the t item task in the j item job, represents the processing time of the t item task in the j item job; represents the start time of the t' item task in the j' item job, represents the processing time of the t' item task in the j' item job, ∨ represents logical or, represents the machine processing the t item task in the j item job, represents the machine processing the t' item task in the j' item job; represents an integer.
[0182] The constraint condition (2a) represents that u must be the maximum completion time, the constraint condition (2b) represents that all tasks need to be processed in a set order, the constraint condition (2c) represents that a machine can only process one task at a time, and the constraint condition (2d) represents that the start time of all tasks is an integer.
[0183] All tasks in a production workshop within a period of time are taken as graph nodes, the graph nodes of tasks belonging to the same job item are connected by directed arcs, the graph nodes of tasks processed by the same machine are connected by disjunctive arcs, each disjunctive arc is regarded as a pair of arcs with opposite directions, and the conversion is transformed into a disjunctive graph model G = (O, C, D), wherein O represents a node set of all tasks, C represents a set of directed arcs connecting adjacent task nodes of the same job item, and D represents a set of disjunctive arcs connecting adjacent task nodes of the same machine.
[0184] As Figure 2As shown, it is a disjunctive graph schematic diagram of a workshop scheduling problem of 3 jobs and 3 machines; each circle represents a graph node of each task; a solid arrow represents a directed arc, and the connected graph nodes correspond to tasks belonging to a job; a dashed arrow represents a disjunctive arc, and the graph nodes connected at both ends of the dashed arrow correspond to tasks processed by the same machine; as shown in the figure, the first task, the second task, and the third task belong to a job, the fourth task, the fifth task, and the sixth task belong to a job, and the seventh task, the eighth task, and the ninth task belong to a job; the first task, the fourth task, and the eighth task are processed by the same machine, the second task, the sixth task, and the seventh task are processed by the same machine, and the third task, the fifth task, and the ninth task are processed by the same machine.
[0185] S2: based on the disjunctive graph model, a graph attention network is constructed; specifically:
[0186] For the disjunctive graph model G=(O, C, D), the input of the constructed graph attention network is a feature vector corresponding to each task graph node, and the attention coefficient of each graph node and its adjacent graph node is calculated:
[0187]
[0188] In the formula, e ij represents the attention coefficient between the i-th graph node and the j-th adjacent graph node, W represents a weight matrix, represents the feature vector of the i-th graph node, represents the feature vector of the j-th adjacent graph node, || represents vector splicing, a represents a parameter vector, and a T represents the transpose of a; ReLU(*) is an activation function, specifically:
[0189]
[0190] The attention coefficients of each graph node and all its adjacent graph nodes are normalized:
[0191]
[0192] In the formula, α ij represents the normalized attention coefficient between the i-th graph node and the j-th adjacent graph node, N i represents the set of adjacent graph nodes of the i-th graph node, e ir represents the attention coefficient between the i-th graph node and the r-th adjacent graph node.
[0193] The feature vector of the graph node is updated:
[0194]
[0195] In the formula, denotes the updated feature vector of the i-th graph node, and σ(·) denotes a nonlinear activation function;
[0196] Repeat the above steps Z times for each graph node, and obtain the mean of the updated feature vectors of the graph nodes obtained by Z independent self-attention calculation processes:
[0197]
[0198] wherein, denotes the mean of the updated feature vectors of the i-th graph node, denotes the normalized attention coefficient between the i-th graph node and the j-th adjacent graph node in the z-th self-attention calculation process, and W z denotes the weight vector of the z-th self-attention calculation process, z = 1, …, Z;
[0199] Input the mean of the updated feature vectors of the graph nodes into a multi-layer perceptron to obtain the start time prediction value of the task corresponding to the graph node:
[0200]
[0201] wherein, denotes the start time prediction value of the task corresponding to the i-th graph node, MLP(·) denotes a multi-layer perceptron, and θ denotes a multi-layer perceptron parameter;
[0202] Repeat the above steps for all graph nodes to obtain the start time prediction value of each task.
[0203] The original data such as jobs, tasks, and machines of the job shop scheduling problem are converted into features that can better express the essence of the job shop scheduling problem, which is conducive to improving the accuracy of the graph attention network and can enable the graph attention network to solve job shop scheduling problems of various scales with one set of parameters.
[0204] S3: Train the graph attention network using trust technology to obtain a local optimal solution set of the graph attention network parameters; as shown in Figure 3 , specifically:
[0205] S3.1: Calculate a reference solution of the job shop scheduling problem, i.e., a start time reference value of each task, using an existing algorithm;
[0206] S3.2: Take the job shop scheduling problem as training set data, and denote the set of start time prediction values of all tasks as Let wherein, w denotes a graph attention network parameter to be optimized; and a loss function is set as:
[0207]
[0208] In the formula, represents the loss function value, s' represents the starting time reference value set of all tasks, s' p represents the pth component of s', represents the pth component of s', represents the pth component of s', |·| represents the L1 distance operation; λ b represents the first violation coefficient, represents the violation degree of the starting time prediction value of the task to the constraint condition (2b); λ c represents the second violation coefficient, represents the violation degree of the starting time prediction value of the task to the constraint condition (2c);
[0209] The calculation method of the violation degree of the starting time prediction value of the task to the constraint condition (2b) is:
[0210]
[0211] In the formula, represents the starting time prediction value of the tth task in the jth job, represents the starting time prediction value of the t+1th task in the jth job;
[0212] The calculation method of the violation degree of the starting time prediction value of the task to the constraint condition (2c) is:
[0213]
[0214]
[0215]
[0216] In the formula, represents the first violation degree term, represents the second violation degree term, represents the first violation degree function, represents the second violation degree function, represents the starting time prediction value of the t'th task in the j'th job;
[0217] S3.3: Randomly initialize the graph attention network parameters to be optimized as
[0218] S3.4: Solve the initial local optimal solution w0 by using the stochastic gradient descent method on , and randomly generate an initial search direction d0;
[0219] S3.5: Starting from w0, move along the search direction d k , and obtain:
[0220]
[0221] wherein, denotes the point reached by the kth search, ρ1is a moving step, ρ1(k) denotes the kth moving step, ρ1∈(0, ρ max ], ρ max is a maximum moving step, ρ1monotonically increases from 0 to ρ max ; d k denotes the kth search direction, k = 0, …, k max ;
[0222] S3.6: determining whether the loss function is stably decreased, i.e., whether an escape point is reached; if not, performing step S3.7; otherwise, performing step S3.9;
[0223] S3.7: updating the search direction:
[0224]
[0225] wherein, d k+1 denotes the updated search direction, ρ2denotes an updating step, ρ2(k) denotes the kth search step, denotes the gradient of the loss function on the search direction d k ;
[0226] S3.8: determining whether the updated search direction d k+1 is greater than if not, moving along the updated search direction, and repeating steps S3.5-S3.6; otherwise, generating a new initial search direction, and repeating steps S3.4-S3.6;
[0227] S3.9: using the stochastic gradient descent method to calculate a new local optimal solution on the local optimal convergence domain corresponding to the escape point;
[0228] S3.10: determining whether a preset training time is reached; if not, taking the new local optimal solution as an initial local optimal solution, and repeating steps S3.5-S3.9; otherwise, taking all the local optimal solutions to form a local optimal solution set of the graph attention network parameters, the local optimal solution set of the graph attention network parameters being W = {w0, …, w n}, w n denotes the nth local optimal solution.
[0229] By training a graph attention network using trust techniques, starting from a local optimum, multiple sets of locally optimal parameters are found along a dynamic search path. This effectively avoids getting trapped in local optima and searches for high-quality or globally optimal parameters in the parameter space, significantly improving the performance of the graph attention network. When searching for multiple locally optimal parameters, it is necessary to find the convergence region of the local optimum and then obtain the local optimum through a local solver. Since it is difficult to find these convergence regions along a fixed search direction, this embodiment randomly selects the initial search direction and updates the search direction according to the gradient of the loss function, which can efficiently search for local optima.
[0230] S4: Utilizing trust techniques and a fast, flexible, fully pure embedding algorithm, the optimal linear combination of the local optimal solution set of the graph attention network parameters is used to obtain the optimal parameters of the graph attention network; for example... Figure 4 As shown, specifically:
[0231] S4.1: Establish a quadratic optimization problem for the local optimal solution set of graph attention network parameters:
[0232]
[0233] In the formula, v represents the linear combination coefficient vector, v = (v1, ..., v2) / ( ... n ) T v n Let e represent the nth linear coefficient vector; e = (1, ..., 1) T , represents a column vector with all elements being 1; C represents the correlation matrix, and for Q training set samples, the elements of the correlation matrix C are:
[0234]
[0235] In the formula, C ij f represents the element in the i-th row and j-th column of the correlation matrix C; i (x q ) indicates that the q-th training set sample is in a local optimum of parameters w i The following graph shows the output of the attention network, f. j (x q ) indicates that the q-th training set sample is in a local optimum of parameters w j The following graph shows the output of the attention network, t(x). q ) represents the label value of the q-th training set sample;
[0236] S4.2: Solving the quadratic optimization problem using the logarithmic barrier function, constructing the logarithmic barrier function:
[0237]
[0238] In the formula, λ represents the first constant, μ represents the second constant, and vi represents the i-th linear coefficient vector;
[0239] The KKT conditions are:
[0240]
[0241]
[0242] where V = diag(v1, …, vn) is a diagonal matrix with diagonal elements v1, …, vn, and let both sides of (4a) be multiplied by V, we get: n n
[0243]
[0244] i.e., the algebraic equations:
[0245]
[0246] where Cij represents the element in the i-th row and j-th column of the correlation matrix C, vj represents the j-th linear coefficient vector, and Cij represents the element in the n-th row and j-th column of the correlation matrix C. 1j j nj
[0247] S4.3: Rewrite equation (6) as x = (x1, x2, …, xn)T, x1, x2, …, xn correspond to v1, v2, …, vn respectively, λ, then h(x) = [h1(x), h2(x), …, hn(x)]T, and introduce a continuous parameter t to construct a homotopy function: n+1 T n+1 n n+1 T H(x, t) = (1-t).g(x) + th(x) (7)
[0248] where
[0249]
[0250]
[0251] where H(x, t) represents the homotopy function, h(x) represents the first rewritten function, and g(x) represents the second rewritten function.
[0252] S4.4: Use the fast flexible holomorphic embedding algorithm to solve the local optimal solution of the algebraic equations As shown in the following: Figure 5
[0253] S4.4.1: For a system of algebraic equations, let p be the maximum order of the sum of the power series parts. max Let ε be the allowable error threshold for both sides of the equation, and let a be the maximum arc length for each expansion. max Let t = 0, then H(x, t) = g(x), and we can find the initial set of real points X0 = (x1(0), x2(0), ..., x n+1 The values of (0), t(0));
[0254] S4.4.2: Introducing parameter γ, selecting the arc length parameterized equation, and then solving the simultaneous equations, we obtain the embedded system:
[0255]
[0256] H(x(γ), t(γ))=0
[0257] In the formula, x k Let X0 represent the k-th element in the initial set of real points, where k = 1, 2, ..., n+1;
[0258] S4.4.3: for x k (γ), t(γ) sets the power series with γ as the parameter:
[0259]
[0260]
[0261] In the formula, x represents k The coefficients of the p-th term in the power series expansion of γ; p denotes the order.
[0262] S4.4.4: Substituting the power series into the embedded system yields a system of equations with the coefficients of the power series expansion as unknowns:
[0263]
[0264]
[0265] In the formula, μ represents the second constant;
[0266] S4.4.5: Compare the coefficients of γ to the same power:
[0267] When p = 0, we have:
[0268] k = 1, ..., n+1
[0269]
[0270] When p = 1, we have:
[0271]
[0272]
[0273] Since Let The above equation is rewritten as:
[0274]
[0275] where y represents the vector to be solved, y i is the i-th element in y, A represents an (n+1) x (n+2) matrix, and B represents a column vector;
[0276] Solving equation (9) obtains the value of ;
[0277] When p max ≥ p ≥ 2, the equation group satisfied is a linear equation group, which can be solved by using a classical method;
[0278] S4.4.6: According to the power series of x k (γ), t(γ), a rational approximation function is constructed;
[0279] S4.4.7: The value of the rational approximation function at γ = γ0 is substituted into the algebraic equation group, and it is compared whether the difference between the left and right sides of the algebraic equation group is less than the preset allowable error threshold ε; if yes, γ0 is expanded until the difference is not less than the preset allowable error threshold ε; if no, γ0 is reduced until the difference is less than the preset allowable error threshold ε; when μ → 0, a local optimal solution of the algebraic equation group is obtained
[0280] S4.5: A nonlinear dynamic system related to formula (5) is constructed:
[0281]
[0282] Each local optimal solution of the quadratic optimization problem corresponds to a stable equilibrium point of the nonlinear dynamic system;
[0283] S4.6: L orthogonal search directions are selected from the local optimal solution of the algebraic equation group, and the escape point of the nonlinear dynamic system is searched along the orthogonal search direction ; Afterwards, it is moved to
[0284]
[0285] In the formula, x' represents a point in a new stable region, located in the stable region of the stable equilibrium point, represents the search direction along the orthogonal search direction The escape point searched, l = 1, …, L, L represents the total number of selected orthogonal search directions;
[0286] Taking x' as the initial point, a new local optimal solution is obtained by using the fast flexible holomorphic embedding algorithm
[0287] Select a direction After searching, the local optimal solution obtained each time is combined to form the optimal solution set V γ ;
[0288] S4.7: Select the optimal solution of the quadratic optimization problem from the optimal solution set V γ :
[0289] v * = argmin v {E(v)|v∈V γ}
[0290] In the formula, v * represents the optimal solution of the quadratic optimization problem, that is, the optimal linear coefficient vector;
[0291] S4.8: Calculate the optimal parameters of the graph attention network according to the optimal linear coefficient vector and the local optimal solution set of the graph attention network parameters.
[0292] For local optimal solutions, appropriate combination of different local optimal solutions has better generalization performance than single local optimal solution; the application obtains the optimal linear combination of the local optimal solution set by establishing a quadratic optimization problem and solving it by using trust technology and interior point method, so as to obtain higher quality parameters and further improve the performance of the graph attention network; when solving the quadratic optimization problem by using the interior point method, algebraic equations need to be solved, and the conventional band method has slow convergence speed and may diverge, and the fast flexible holomorphic embedding algorithm is used to efficiently solve the algebraic equations.
[0293] S5: Obtain the optimized graph attention network according to the optimal parameters of the graph attention network; use the optimized graph attention network to schedule the unscheduled workshop jobs; as shown in the following formula: Figure 6 :
[0294] S5.1: Input all unscheduled workshop jobs into the optimized graph attention network;
[0295] S5.2: Select the task sequence on the unscheduled workshop job j;
[0296] S5.3: Predict the start time of the earliest starting unscheduled task:
[0297]
[0298] In the formula, This represents the predicted start time of the (t+1)th task in the unscheduled j-th job. This represents the predicted start time of the t-th task in the unscheduled j-th job. This represents the processing time of the t-th task in the unscheduled j-th job;
[0299] S5.4: Predict the start time of subsequent tasks on the machine that processes the earliest started unscheduled task:
[0300]
[0301] In the formula, This represents the predicted start time of the t′ task in the j′-th unscheduled job.
[0302] S5.5: Repeat steps S5.3-S5.4 until the start time of all tasks on the unscheduled shop floor job j has been predicted, and schedule them according to the corresponding predicted start time values.
[0303] S5.6: Repeat steps S5.2-S5.5 until all unscheduled shop floor jobs have been scheduled.
[0304] Example 3
[0305] This embodiment provides a workshop operation scheduling system based on trust technology and characterized by rapid, flexible, and fully embedded features, such as... Figure 7 As shown, it includes:
[0306] The data acquisition and transformation module is used to acquire production data of operations, tasks and machines in the production workshop, set the objective function and constraints of the workshop operation scheduling problem, and transform operations, tasks and machines into disjunctive graph models.
[0307] The network construction module is used to construct a graph attention network based on the disjunctive graph model;
[0308] The network training module is used to train a graph attention network using trust techniques to obtain a local optimal set of graph attention network parameters;
[0309] The parameter optimization module utilizes trust technology and a fast, flexible, fully pure embedding algorithm to solve for the optimal linear combination of the local optimal solution set of the graph attention network parameters, thereby obtaining the optimal parameters of the graph attention network.
[0310] The workshop task scheduling module is configured to obtain an optimized graph attention network according to the optimal parameters of the graph attention network, and obtain a starting time prediction value of each task by using the optimized graph attention network, and schedule unscheduled workshop jobs based on the prediction value.
[0311] The same or similar reference signs correspond to the same or similar components;
[0312] The terms describing the positional relationship in the drawings are only used for illustrative description, and should not be construed as a limitation on the patent;
[0313] Obviously, the above embodiments of the present application are only examples for clearly illustrating the present application, and are not intended to limit the implementation manners of the present application. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, it is not necessary and also impossible to enumerate all the implementation manners. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the claims of the present application.
Claims
1. A job shop scheduling method based on trust technology and fast flexible all-pure embedding, characterized in that, Comprise: S1: obtain production data of jobs, tasks and machines in a production workshop, set the objective function and constraint conditions of the workshop job scheduling problem, and convert the jobs, tasks and machines into a disjunctive graph model; S2: based on the disjunctive graph model, a graph attention network is constructed; S3: the graph attention network is trained using trust technology to obtain a local optimal solution set of the graph attention network parameters; S4: using trust technology and fast flexible holomorphic embedding algorithm, the local optimal solution set of the graph attention network parameters is solved by optimal linear combination to obtain the optimal parameters of the graph attention network; S5: according to the optimal parameters of the graph attention network, the optimized graph attention network is obtained; the starting time prediction value of each task is obtained by using the optimized graph attention network, and the unscheduled workshop jobs are scheduled based on the prediction value, the specific method is: S5.1: input all unscheduled workshop jobs into the optimized graph attention network; S5.2: select the task sequence on the unscheduled workshop job j; S5.3: predict the starting time of the earliest starting unscheduled task: In the formula, denotes a predicted value of the start time of the (t+1)th task in the jth job that is not scheduled, denotes a predicted value of the start time of the tth task in the jth job that is not scheduled, denotes a processing time of the tth task in the jth job that is not scheduled; S5.4: predict the starting time of the machine subsequent task of processing the earliest starting unscheduled task: In the formula, denotes the predicted start time of the t'th task in the j'th unscheduled job. S5.5: repeat steps S5.3-S5.4 until the starting time of all tasks on the unscheduled workshop job j has been predicted, and schedule according to the corresponding starting time prediction value; S5.6: repeat steps S5.2-S5.5 until all unscheduled workshop jobs have been scheduled.
2. The job shop scheduling method based on trust technology and fast flexible all-pure embedding according to claim 1, characterized in that, In the step S1, the specific method for obtaining the production data of jobs, tasks and machines in the production workshop, setting the objective function and constraint conditions of the workshop job scheduling problem is: The production workshop contains several jobs in a period of time, each job contains several tasks; The tasks are processed by several machines in the production workshop; Then the objective function and constraint conditions of the workshop job scheduling problem are: P(d) = argmin s u (1) In the formula, d represents a set of processing times of all tasks, s represents a set of processing start times of all tasks, and u represents a maximum completion time of all tasks; j and j' represent jth and j'th jobs, j, j' = 1,..., J, j ≠ j', and J represents a maximum number of job items; t and t' represent tth and t'th tasks, t, t' = 1,..., T, t ≠ t', and T represents a maximum number of tasks included in each job; s(j, t) represents a start time of each task in the jth job, d(j, t) represents a processing time of all tasks in the jth job; s(j, t+1) represents a start time of the (t+1)th task in the jth job, s(j, t) represents a start time of the tth task in the jth job, d(j, t) represents a processing time of the tth task in the jth job; s(j', t') represents a start time of the t'th task in the j'th job, d(j', t') represents a processing time of the t'th task in the j'th job, and ∨ represents a logical OR; m(j, t) represents a machine processing the tth task in the jth job, m(j', t') represents a machine processing the t'th task in the j'th job; I represents an integer.
3. The job shop scheduling method based on trust technology and fast flexible all-pure embedding according to claim 2, characterized in that, In the step S1, the specific method for converting the jobs, tasks and machines into a disjunctive graph model is: All tasks in the production workshop in a period of time are regarded as graph nodes, the graph nodes of tasks belonging to the same job are connected by directed arcs, and the graph nodes of tasks processed by the same machine are connected by disjunctive arcs, each disjunctive arc is regarded as a pair of arcs with opposite directions, and is converted into a disjunctive graph model G=(O,C,D), wherein O represents the node set of all tasks, C represents the set of directed arcs connecting adjacent task nodes of the same job, and D represents the set of disjunctive arcs connecting adjacent task nodes of the same machine.
4. The job shop scheduling method based on trust technology and fast flexible all-pure embedding according to claim 3, characterized in that, The specific method of step S2 is: For the disjunctive graph model G=(O,C,D), input the constructed graph attention network, for each task graph node, a feature vector is obtained, and the attention coefficient of each graph node and its adjacent graph node is calculated: where e ij denotes the attention coefficient between the i-th graph node and the j-th adjacent graph node, W denotes the weight matrix, denotes the feature vector of the i-th graph node, denotes the feature vector of the j-th adjacent graph node, || denotes vector concatenation, a denotes the parameter vector, a T denotes the transpose of a, and ReLU(*) is an activation function. The attention coefficients of each graph node and all its adjacent graph nodes are normalized: In the formula, α ij denotes the normalized attention coefficient between the i-th graph node and the j-th adjacent graph node, N i denotes the set of adjacent graph nodes of the i-th graph node, e ir denotes the attention coefficient between the i-th graph node and the r-th adjacent graph node; Update the feature vector of the graph node: wherein denotes the updated feature vector of the ith graph node, and σ(·) denotes a non-linear activation function. Repeat the above steps Z times for each graph node, and take the average of the updated feature vectors of the graph nodes obtained by Z times of independent self-attention calculation process: In the formula, denotes the updated feature vector mean of the i-th graph node, denotes the normalized attention coefficient between the i-th graph node and the j-th adjacent graph node in the z-th self-attention calculation process, W z denotes the weight vector of the z-th self-attention calculation process, z = 1, …, Z; Input the feature vector mean of the updated graph node into the multilayer perceptron to obtain a start time prediction value of the task corresponding to the graph node: In the formula, denotes the start time prediction value of the task corresponding to the i-th graph node, MLP(·) denotes a multi-layer perceptron, and θ denotes a multi-layer perceptron parameter. Repeat the above steps for all graph nodes to obtain a start time prediction value of each task.
5. The job shop scheduling method based on trust technology and fast flexible all-pure embedding according to claim 4, characterized in that, The specific method of the step S3 is: S3.1: calculate a reference solution of the job shop scheduling problem by using an existing algorithm, i.e., a start time reference value of each task; S3.2: Take the job-shop problem as the training set data, and set the starting time prediction value set of all tasks as Let where w represents the graph attention network parameters to be optimized; and set the loss function as: wherein denotes the loss function value, s' denotes the set of starting time reference values for all tasks, s' p denotes the p-th component of s', denotes the p-th component of s', |·| denotes the L1 distance operation; λ b denotes the first violation coefficient, denotes the degree of violation of the constraint (2b) by the starting time prediction values of the tasks; λ c denotes the second violation coefficient, denotes the degree of violation of the constraint (2c) by the starting time prediction values of the tasks; S3.3: Randomly initialize the graph attention network parameters to be optimized as S3.4: Using stochastic gradient descent to... Solve to obtain the initial local optimum w0, and randomly generate the initial search direction d0; S3.5: Starting from w0, follow the search direction d k Moving, we obtain: wherein denotes the point reached by the kth search, ρ1is the step size, ρ1(k) denotes the kth step size, ρ1∈(0, ρ max ], ρ max is the maximum step size, ρ1monotonically increases from 0 to ρ max ; d k denotes the direction of the kth search, k = 0,..., k max ; S3.6: determine whether the loss function is stably decreased, i.e., whether an escape point is reached; if not, perform step S3.7; otherwise, perform step S3.9; S3.7: update the search direction: In the formula, d k+1 represents the updated search direction, p2 represents the update step, p2(k) represents the kth search step, represents the gradient of the loss function on the search direction d k ; S3.8: determine the updated search direction d k+1 whether greater than If not, move along the updated search direction, repeat steps S3.5-S3.6; otherwise, generate a new initial search direction, repeat steps S3.4-S3.6; S3.9: calculate a new local optimal solution on the local optimal convergence domain corresponding to the escape point by using a stochastic gradient descent method; S3.10: determining whether a preset training time is reached; if not, taking the new local optimal solution as an initial local optimal solution, and repeating steps S3.5-S3.9; otherwise, outputting a local optimal solution set of the graph attention network parameters W = {w0,..., wn} by combining all the local optimal solutions, wherein wn represents the nth local optimal solution. n},w n n represents the nth local optimal solution.
6. The job shop scheduling method based on trust technology and fast flexible all-pure embedding according to claim 5, characterized in that, In the step S3.2, the calculation method of the violation degree of the start time prediction value of the task to the constraint condition is: The calculation method of the violation degree of the start time prediction value of the task to the constraint condition (2b) is: In the formula, denotes the predicted start time of the tth task in the jth job, denotes the predicted start time of the t+1th task in the jth job; The calculation method of the violation degree of the start time prediction value of the task to the constraint condition (2c) is: In the formula, represents the first violation degree term, represents the second violation degree term, represents the first violation degree function, represents the second violation degree function, represents the start time prediction value of the t'th task in the j'th item work.
7. The method according to claim 5, wherein, The specific method of the step S4 is: S4.1: establish a quadratic optimization problem for the local optimal solution set of the graph attention network parameters: where E(v) denotes an error function of v, v denotes a linear combination coefficient vector, v = (v1,..., vn) n ) T , v n denotes the nth linear coefficient vector; e = (1,..., 1) T denotes a column vector with elements all being 1; C denotes a correlation matrix, and an element of the correlation matrix i is: wherein C ij represents the element in the i-th row and j-th column of the correlation matrix C; f i (x q ) represents the graph attention network output of the q-th training set sample under the local optimal parameter w i , f j (x q ) represents the graph attention network output of the q-th training set sample under the local optimal parameter w j , and t(x q ) represents the label value of the q-th training set sample. S4.2: solve the quadratic optimization problem by using a logarithmic barrier function to construct a logarithmic barrier function: In the formula, λ represents a first constant, μ represents a second constant, v i represents the i-th linear coefficient vector; The KKT condition is: In the formula, V = diag(v1,…,v) n ), indicating that the diagonal elements are v1,…,v n Given a diagonal matrix (4a), multiply both sides of it by V to obtain: i.e., an algebraic equation group: where C 1j denotes the element in the first row and jth column of the correlation matrix C, v j denotes the jth linear coefficient vector, C nj denotes the element in the nth row and jth column of the correlation matrix C; S4.3: Rewrite formula (6) as x = (x1, x2, …, x n+1 ) T , x1, x2, …, x n+1 correspond to v1, v2, …, v n , λ respectively, then h(x) = [h1(x), h2(x), …, h n+1 (x)] T , introduce continuous parameter t, and construct homotopy function: H(x, t) = (1-t)g(x) + th(x) (7) wherein, In the formula, H(x, t) represents a homotopy function, h(x) represents a first rewritten function, and g(x) represents a second rewritten function; S4.4: Solving local optimal solution of algebraic equations by fast flexible holomorphic embedding algorithm S4.5: construct a nonlinear dynamic system related to formula (5): Each local optimal solution of the quadratic optimization problem corresponds to a stable equilibrium point of the nonlinear dynamic system; S4.6: Select L orthogonal search directions from the local optimal solution of the algebraic system of equations along the orthogonal search directions move, search for the escape point of the nonlinear dynamical system then move to where x' represents a point in the new stable region, located in the stable region of the stable equilibrium point, represents the search direction along the orthogonal search direction represents the search direction along the orthogonal search direction represents the search direction along the orthogonal search direction Using the fast flexible holomorphic embedding algorithm with x' as the initial point, a new local optimal solution is found selecting a direction a After the search, the local optimal solution obtained each time is grouped into an optimal solution set V γ ; S4.7: Selecting the optimal solution of the quadratic optimization problem from the optimal solution set V γ S4.7: Selecting the optimal solution of the quadratic optimization problem from the optimal solution set V v * = argmin v {E(v) | v e V γ} where v * represents the optimal solution of the quadratic optimization problem, i.e., the optimal linear coefficient vector; S4.8: calculate the optimal parameters of the graph attention network according to the optimal linear coefficient vector and the local optimal solution set of the graph attention network parameters.
8. The method according to claim 7, wherein, The specific method of the step S4.4 is: S4.4.1: For algebraic equations, set the maximum order p of the power series part sum max , set the allowable error threshold of both sides of the equation as ε, and the maximum arc length of each expansion as α max ; let t = 0, then H(x, t) = g(x), the initial real point set X0= (x1(0), x2(0), …, x n+1 (0), t(0)) can be solved. S4.4.2: introduce a parameter γ and select an arc length parameterization equation to obtain an embedding system: H(x(γ), t(γ)) = 0 wherein x k denotes the kth element in the initial real point set X0, k = 1, 2, …, n + 1; S4.4.3: x for y k (γ), t(γ) are power series parametrized by y: wherein represents x k Coefficient of the term of order p in the power series expansion of γ; p represents the order; S4.4.4: substitute the power series into the embedding system to obtain an equation group with the coefficients of the power series expansion as unknown numbers: In the formula, μ represents a second constant; S4.4.5: compare the coefficients of γ of the same degree: When p = 0, there is: When p = 1, there is: Because It is known that letting The above equation is then rewritten as: In the formula, y represents a vector to be solved, y i is the i-th element in y, A represents an (n+1) x (n+2) order matrix, and B represents a column vector. Solving for equation (9) gives the value of ; When p max ≥ p ≥ 2, The satisfied equation group is linear equation group, and can be solved by using classical method. S4.4.6: According to the above x k a power series of (γ), t(γ) to construct a rational approximation function; S4.4.7: substitute the value of the rational approximation function at γ = γ0 into the algebraic equation group, and compare whether the difference between the left and right sides of the algebraic equation group is less than a preset allowable error threshold ε; if yes, expand γ0 until the difference is not less than the preset allowable error threshold ε; if no, reduce γ0 until the difference is less than the preset allowable error threshold ε; When μ - 0, the local optimal solution of the algebraic equations is obtained 9. A job shop scheduling system based on trust technology and fast flexible all-homogeneous embedding, characterized by, including: A data acquisition and conversion module configured to acquire production data of jobs, tasks and machines in a production workshop, set an objective function and constraint conditions of a job shop scheduling problem, and convert the jobs, tasks and machines into a disjunctive graph model; A network construction module configured to construct a graph attention network based on the disjunctive graph model; and A parameter optimization module configured to optimize parameters of the graph attention network. a network training module configured to train the graph attention network using a trust technique to obtain a local optimal solution set of parameters of the graph attention network; a parameter optimization module configured to perform optimal linear combination on the local optimal solution set of parameters of the graph attention network using the trust technique and a fast flexible holomorphic embedding algorithm to obtain optimal parameters of the graph attention network; a workshop task scheduling module configured to obtain an optimized graph attention network according to the optimal parameters of the graph attention network; obtain a starting time prediction value of each task using the optimized graph attention network, and schedule unscheduled workshop jobs based on the prediction value, including: inputting all unscheduled workshop jobs into the optimized graph attention network; selecting a task sequence on an unscheduled workshop job j; predicting a starting time of an earliest starting unscheduled task: In the formula, denotes a predicted value of the start time of the (t+1)th task in the jth job that is not scheduled, denotes a predicted value of the start time of the tth task in the jth job that is not scheduled, denotes a processing time of the tth task in the jth job that is not scheduled; predicting a starting time of a machine subsequent task of the earliest starting unscheduled task: In the formula, denotes the predicted start time of the t'th task in the j'th unscheduled job. returning the predicted starting time of the earliest starting unscheduled task until the starting times of all tasks on the unscheduled workshop job j have been predicted, and scheduling according to the corresponding starting time prediction value; returning the selected task sequence on the unscheduled workshop job j until all unscheduled workshop jobs have been scheduled.
Citation Information
Patent Citations
Rapid and flexible full-pure embedded economic strategy adjustment method and device
CN113487196A
Rapid and flexible full-pure embedded power system optimal power flow evaluation method
CN113489014A