Scheduling method based on large language model and improved simulated annealing algorithm
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-29
Smart Images

Figure CN121526267B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of textile manufacturing technology, specifically to a scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm. Background Technology
[0002] Textile production is essentially a complex and dynamic process in which warp and weft yarns interweave on a loom according to specific patterns. Warp yarns, as the longitudinal foundation of weaving, are typically pre-wound onto a warp beam and move continuously at high speed along the longitudinal direction of the machine during weaving. Weft yarns, on the other hand, periodically interweave between the warp yarns to form the transverse structure of the fabric. The warp beam capacity not only determines the achievable weaving length for a single production batch but also constitutes a crucial production unit connecting raw material input and fabric output. Each warp beam can be processed on any of several available machines, and the processing time may vary.
[0003] In textile weaving scheduling, the key to improving weaving efficiency is to rationally allocate weaving beams to multiple machines while meeting process constraints in order to minimize the maximum completion time.
[0004] However, traditional scheduling algorithms (such as genetic algorithms and simulated annealing) have the following limitations in textile production scheduling: they are highly sensitive to initial solutions and easily converge to local optima, which may prevent the maximum completion time of the generated scheduling scheme from being effectively optimized, resulting in a relatively long maximum completion time. Using large language models to generate scheduling schemes suffers from uncertainties in the generated results (illusions) and excessively long API call times per iteration, making the generated scheduling schemes unpredictable and relatively slow in generation.
[0005] In view of this, the applicant has conducted in-depth research on the above-mentioned issues, which led to this case. Summary of the Invention
[0006] The purpose of this invention is to provide a scheduling method that generates a scheduling scheme with a relatively short maximum completion time, a relatively fast generation speed, and an executable scheduling scheme.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] The scheduling method based on the fusion of large language models and improved simulated annealing algorithm includes the following steps:
[0009] S100: Obtain production data from the textile weaving production management system;
[0010] S200: Describe the textile weaving scheduling problem using natural language, set constraints, and construct a scheduling problem model with the objective function of minimizing the maximum completion time.
[0011] Set up an iterative process and repeat the iterative process, using the set of optimal solutions before the Kth iteration as the set of historical optimal solutions. Based on the production data and the problem description, an initial solution is generated in a randomized manner, forming a set of historical best solutions before the first iteration. ;
[0012] The simulated annealing algorithm is improved by introducing a rate of change for generating solutions. And based on this, the rate of change of the generated solution Determine the initial temperature and the number of inner iterations An improved simulated annealing algorithm was constructed.
[0013] Each iteration of the process includes the following steps:
[0014] S201: Determine the parity of the iteration round K and the solution method. If K is even, the improved simulated annealing algorithm is used to solve the problem and generate a scheduling scheme to be verified. Otherwise, the large language model is used to solve the problem and generate a scheduling scheme to be verified.
[0015] S202: Use a verification agent to verify the feasibility of the scheduling scheme to be verified; if the scheduling scheme to be verified passes the verification, proceed to step S203; otherwise, return to step S201.
[0016] S203: Determine the optimal solution for the current iteration round from the scheduling schemes to be verified that have been verified by the verification agent. The scheduling scheme to be verified, which has been verified by the verification agent, is combined with the set of historical best solutions. The results are then merged and filtered based on an elite retention strategy to form the first... The set of historical best solutions before each iteration And store the data;
[0017] S204: Determine whether K has reached a preset value. If not, proceed to the next iteration; otherwise, stop the iteration and, based on the objective function, select the best historical solution set. The final optimal solution is determined, and the optimal scheduling scheme is output.
[0018] Preferably, before executing the iterative process, an expert rule knowledge base, output requirements, and a selection mechanism are pre-configured;
[0019] In step S201, the specific method for solving and generating the scheduling scheme to be verified using the large language model is as follows:
[0020] The production data, the expert rule knowledge base, the output requirements, the optimization mechanism, and the historical best solution set are combined. The input is fed into the large language model, which then solves the problem and generates the scheduling scheme to be verified.
[0021] The specific method for solving and generating the scheduling scheme to be verified using the improved simulated annealing algorithm is as follows:
[0022] When K equals 2, the optimal solution will be determined in the first round. The input is fed into the improved simulated annealing algorithm, which solves the algorithm and generates the scheduling scheme to be verified.
[0023] When K is an even number greater than 2, the first... The optimal solution determined in the round And in the The optimal solution determined in the round The input is fed into the improved simulated annealing algorithm, which solves the problem and generates the scheduling scheme to be verified.
[0024] Preferably, in step S100, the production data includes machine information, warp beam information, and processing time information of the warp beam on the machine; the machine information includes machine number and opening / closing information uniquely corresponding to the machine number, and the warp beam information includes warp beam number.
[0025] The expert rule knowledge base includes the following:
[0026] (1) The start / stop information corresponding to the machine number in the scheduling scheme must be in the enabled state;
[0027] (2) Within the same time dimension, the machine corresponding to the same machine number can only carry out the processing task of the warp beam corresponding to one warp beam number;
[0028] (3) The scheduling plan includes all weaving beam numbers;
[0029] (4) The machine number and weaving beam number in the scheduling scheme must be obtained from step S100;
[0030] (5) The output of the scheduling scheme must conform to the pre-set format.
[0031] Preferably, step S201 specifically includes:
[0032] S2011: The process of generating a new scheduling scheme using the large language model includes:
[0033] The large language model uses a set of historical best solutions. A new scheduling scheme is generated for the core reference, which is the scheduling scheme to be verified generated in this round;
[0034] S2012: The process by which the improved simulated annealing algorithm generates a new scheduling scheme includes:
[0035] Calculate the rate of change of the generated solution Based on the rate of change of the generated solution Determine the initial temperature and the number of inner layer iterations ; with the first Optimal solution generated in round Using the initial values as the basis, the initial values are iteratively optimized using perturbation operations and the Metropolis criterion. The inner iterative solution results are output, generating a new scheduling scheme, which is the scheduling scheme to be verified generated in this round. The rate of change of the generated solution is calculated using the following formula. ,
[0036] In the formula, For the first The optimal solution generated in the round. For the first The optimal solution generated in the round;
[0037] The initial temperature is calculated using the following formula. and the number of inner iterations :
[0038] , .
[0039] Preferably, step S203 includes the following steps:
[0040] S2031: Store the scheduling scheme to be verified that has been verified by the verification agent in the current iteration round;
[0041] S2032: Based on the objective function, determine the optimal solution for the current iteration round from the scheduling schemes to be verified that have been verified by the verification agent. ;
[0042] S2033: Combine the scheduling scheme to be verified, which has been verified by the verification agent in this iteration, with the set of historical best solutions. Merge and update the sorting to form the [number]th [order]. The set of historical best solutions before each iteration .
[0043] Preferably, before executing step S201, a decision-making agent is constructed, and step S201 is executed in the decision-making agent;
[0044] There are at least two decision-making agents, and each decision-making agent independently executes step S201 and generates the scheduling scheme to be verified.
[0045] Preferably, the problem is described as: Different warp beams were arranged in the workshop. The weaving process can be carried out on any one of the individual looms, where each warp beam is independent and there is no interdependence between them. It is a positive integer. It is a positive integer;
[0046] The constraints are set as follows:
[0047] (1) All warp beams to be scheduled must be assigned to machine tools for processing. This constraint is expressed by the following formula.
[0048] ,
[0049] In the formula, ;
[0050] (2) At the same time, only one warp beam can be processed on the same machine. This constraint is expressed by the following formula.
[0051] ;
[0052] The objective function is set as follows:
[0053] ,
[0054] In the formula, The maximum completion time for all machines. ; , For machine platform Maximum completion time For weaving beam At the machine Operation time.
[0055] Preferably, step S202 includes the following steps:
[0056] Based on the expert rule knowledge base, the verification agent sets multiple verification rules and determines whether the scheduling scheme to be verified passes the feasibility verification. If the scheduling scheme to be verified meets all the verification rules, it is determined to pass the verification and proceeds to step S203; if the scheduling scheme to be verified does not meet any of the verification rules, it is determined to fail the verification, the reason for failing the verification is returned, recorded, and the process returns to step S201.
[0057] Preferably, in step S202, the verification rules include machine availability status verification rules, full processing verification rules for warp beams, validity verification rules for machine information and warp beam information, uniqueness verification rules for machine occupancy at the same time, and format compliance verification rules for the scheduling scheme to be verified.
[0058] The beneficial effects of adopting the above technical solution are as follows: By alternately calling the large language model and the improved simulated annealing algorithm to generate a scheduling scheme, the natural language processing and reasoning generalization capabilities of the large language model are used to quickly generate a preliminary optimized scheduling scheme, effectively reducing the sensitivity of the improved simulated annealing algorithm to the initial solution. At the same time, this preliminary optimized scheduling scheme provides an optimization starting point for the improved simulated annealing algorithm, which not only strengthens the global optimization capability to avoid getting trapped in local optima, but also shortens the overall solution cycle, making the maximum completion time of the generated scheduling scheme relatively short. Compared with simply using the large language model to solve the problem, the scheduling method of this invention can generate scheduling schemes relatively quickly. The feasibility of the scheduling scheme is verified by using a verification agent, which can ensure that the scheduling scheme is executable. Attached Figure Description
[0059] Figure 1 The flowchart shows the scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm according to the present invention.
[0060] Figure 2 This is a flowchart illustrating the solution process of the large language model of this invention for the textile weaving scheduling problem.
[0061] Figure 3 This is a schematic diagram of the input template interface of the present invention;
[0062] Figure 4 This is a flowchart illustrating the solution of the improved simulated annealing algorithm of the present invention for the textile weaving scheduling problem;
[0063] Figure 5 This is the Gantt chart corresponding to the optimal scheduling scheme finally determined in this embodiment. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0065] like Figures 1-5 As shown, this embodiment provides a scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm. The scheduling system it relies on includes a decision agent, a verification agent, and an expert rule knowledge base. The scheduling method includes the following steps:
[0066] S100: Obtain production data from the textile weaving production management system. This production data includes machine information, warp beam information, and the processing time of the warp beam on the machine. Machine information includes the machine number and the unique opening / closing information corresponding to that machine number. Warp beam information includes the warp beam number. It should be noted that the textile weaving production management system is a production data management platform in the prior art, and its core function is the collection, storage, and querying of production data.
[0067] Constructing a set of machines from machine information :
[0068] ,
[0069] In the formula, The total number of machines. Representative number is The machines, among which .
[0070] Constructing a weave beam set from weave beam information :
[0071] ,
[0072] In the formula, The total number of warp beams, Representative number is The warp beam, among which .
[0073] A time matrix is constructed from the processing time information of the warp beam on the machine. :
[0074] ,
[0075] in, For weaving beam At the machine Operation time.
[0076] This embodiment provides a specific implementation case: the production data obtained from the textile weaving production management system is shown in Table 1.
[0077] Table 1 Production Data Table
[0078]
[0079] S200: Describe the textile weaving scheduling problem using natural language, set constraints, and construct a scheduling problem model with the objective function of minimizing the maximum completion time.
[0080] An iterative process is defined and repeatedly executed, wherein the first iteration of the iterative process is called the first iteration; the set of optimal solutions before the Kth iteration is called the set of historical optimal solutions. Based on the production data and the problem description, an initial solution is generated in a randomized manner, forming a set of historical best solutions before the first iteration. .
[0081] The simulated annealing algorithm is improved by introducing a rate of change for generating solutions. And based on this, the rate of change of the generated solution Determine the initial temperature and the number of inner iterations An improved simulated annealing algorithm was constructed.
[0082] The problem is described as follows:
[0083] Will Different warp beams were arranged in the workshop. The weaving process can be carried out on any one of the individual looms, where each warp beam is independent and there is no interdependence between them. It is a positive integer. It is a positive integer. In this embodiment, the textile weaving scheduling problem to be solved is to arrange 9 different warp beams to any one of the 3 machines in the workshop for the weaving process.
[0084] The constraints are set as follows:
[0085] (1) All warp beams to be scheduled must be assigned to machine tools for processing. This constraint is expressed by the following formula:
[0086] ,
[0087] In the formula, ;
[0088] (2) At the same time, only one warp beam can be processed on the same machine. This constraint is expressed by the following formula.
[0089] ;
[0090] The objective function is set as follows:
[0091] ,
[0092] In the formula, The maximum completion time for all machines. ; , For machine platform Maximum completion time For weaving beam At the machine Operation time.
[0093] The initial solution generation process is as follows:
[0094] Based on production data and the problem description, a "random arrangement" method is used to generate multiple initial solutions. Generating too few initial solutions may negatively impact the efficiency of subsequent algorithms due to a poor starting point; generating too many initial solutions will increase computational resources. To balance algorithm efficiency and computational resource optimization, five initial solutions are optimally generated. Then, the objective function of each of the five initial solutions is calculated and ranked. Specifically, the objective function is calculated for each initial solution, and then ranked according to the maximum completion time of all machines corresponding to each initial solution. The initial solutions are sorted from smallest to largest based on their numerical values; the five sorted initial solutions form the set of historical best solutions before the first iteration. .
[0095] After the initial randomly generated schemes were sorted, the two schemes with the shortest maximum completion time are shown in Table 2:
[0096] Table 2 Sorted Scheme Table
[0097]
[0098] illustrate: The representative will number Arrange warp beams of number 6 to the designated number. Processing is carried out on machines with a rating of 1, and so on.
[0099] Before executing the iterative process, the expert rule knowledge base, output requirements, and selection mechanism are pre-configured.
[0100] The selection mechanism is based on an objective function, with the core objective of minimizing the maximum completion time. Output requirements include output format requirements and the requirement for the large language model to verify the solution results before outputting them.
[0101] The expert rules knowledge base includes the following:
[0102] (1) The start / stop information corresponding to the machine number in the scheduling scheme must be in the enabled state.
[0103] (2) Within the same time dimension, the machine corresponding to the same machine number can only carry out the processing task of the warp beam corresponding to one warp beam number.
[0104] (3) The scheduling scheme includes all weaving beam numbers.
[0105] (4) The machine number and weaving beam number in the scheduling scheme must be obtained from step S100.
[0106] (5) The output of the scheduling scheme must conform to the pre-set format.
[0107] The expert rule knowledge base serves the following purposes: First, it is used as a constraint input into the large language model, providing clear rule restrictions and guidance for the thinking process and generated results of the large language model. Second, in step S202, the scheduling scheme to be verified generated by the decision-making agent in step S202 is verified through the rule constraints in the expert rule knowledge base.
[0108] Each iteration process includes the following steps:
[0109] S201: Determine the parity of the iteration round K and select the solution method. If K is even, use the improved simulated annealing algorithm to solve the problem and generate a scheduling scheme to be verified; otherwise, use a large language model to solve the problem and generate a scheduling scheme to be verified. Before executing step S201, construct a decision agent. Step S201 is executed within the decision agent.
[0110] The specific method for solving and generating the scheduling scheme to be verified using the large language model is as follows: combining production data, expert rule knowledge base, output requirements, selection mechanism, and historical best solution set. The input is fed into a large language model, which then solves the problem and generates the scheduling scheme to be verified.
[0111] The specific method for solving and generating the scheduling scheme to be verified using the improved simulated annealing algorithm is as follows:
[0112] When K equals 2, the optimal solution will be determined in the first round. The input is fed into the improved simulated annealing algorithm, which solves the algorithm and generates the scheduling scheme to be verified.
[0113] When K is an even number greater than 2, the first... The optimal solution determined in the round And in the The optimal solution determined in the round The input is fed into the improved simulated annealing algorithm, which solves the problem and generates the scheduling scheme to be verified.
[0114] The process of generating a new scheduling scheme in step S201 specifically includes the following steps:
[0115] S2011: The process of generating new scheduling schemes from large language models includes:
[0116] Large language models use historical best solution sets A new scheduling scheme is generated for the core reference, which is the scheduling scheme to be verified in this round;
[0117] The decision-making agent is pre-configured with interaction templates and prompting engineering. The prompting engineering prompts the content to be filled in. The interaction template after data filling is injected into the large language model to generate a scheduling scheme with diversity and stability. After parsing and processing, the scheduling scheme to be verified is obtained.
[0118] The pre-configured interaction template for the decision-making agent is a structured meta-hint carrier used to guide large language models in generating scheduling schemes. It is constructed based on the structured meta-hint design method. The interaction template encapsulates the core elements of the problem in the scheduling problem definition template and the iterative solution instruction template. Through precise instruction control, it ensures that the large language model outputs standardized, controllable, and high-quality solutions.
[0119] The scheduling problem definition template guides large language models to think in a targeted manner by clearly defining rules and limiting their output space. The rules that the scheduling problem definition template requires large language models to follow include:
[0120] (1) Clearly state that the optimization objective is to minimize the maximum completion time, transforming the vague "finding a good solution" into a specific and quantifiable mathematical objective, setting a single and unambiguous optimization direction for the model, and avoiding invalid outputs from large language models due to objective confusion.
[0121] (2) In addition to introducing a verification agent in step S202 to verify the scheduling scheme to be verified, the verification logic is used as part of the input in the interaction template to force the model to perform self-check before output. This can simulate the behavior of experts to review before drawing conclusions, which significantly improves the feasibility and correctness of the solution generated by the large language model and reduces the generation of erroneous solutions from the source.
[0122] (3) Strictly define the output format, requiring the solution to be wrapped in a label. <solution> and tags< / solution> The output follows the format of "weaving beam ID -> machine ID". This structure offers parsability and output stability. It facilitates automated parsing and processing by subsequent verification modules and, to some extent, prevents redundant content from being generated in the model.
[0123] Iterative solution instruction templates are used to inject production data and historical best solution sets into each optimization iteration of a large language model. Expert rule knowledge base and execution rules. The execution rules that the large language model is required to follow in the iterative solution instruction template include:
[0124] (1) A scheduling state vector is dynamically passed in using placeholders {}. In the Kth iteration, this vector is represented as: Its three components correspond to three types of core data. After being converted into JSON format, a precise structured suggestion engineering is constructed. This mechanism ensures that the large language model makes decisions based on precise, machine-understandable mathematical objects, rather than vague natural language descriptions. The specific components are explained below:
[0125] 1) Production data Defined as an ordered triple, i.e. ,in For the collection of weaving beams, For a set of machines, and Assign processing time to each pair (weaving beam, machine) using a time matrix. In the Kth iteration, its components can be derived from the time matrix. Expand, that is .
[0126] 2) Expert rule knowledge constraints are represented as a finite set of predicates. Each predicate Each rule represents a set of rules that logically and rigorously define the constraints and boundaries of the scheduling scheme. Mapped to a vector by the function Vec ,in Concatenate all rule vectors into a single vector. ,in .
[0127] 3) In the Kth iteration, the current set of historical best solutions is... The vector is .
[0128] The aforementioned vector injection enables the model to make decisions based on the most relevant, structured mathematical context information, especially historical best solution data. This allows large language models to learn from and draw on past successes, thereby improving performance rather than generating from scratch.
[0129] (2) Based on the clear definition of the target in the scheduling problem definition template, the model’s task awareness is strengthened by the instruction “generate new and better scheduling schemes”, which drives it to make creative explorations in order to surpass the existing optimal solution.
[0130] In summary, the pre-configured interaction templates for the decision-making agent are not simply combinations of text inputs, but rather a carefully constructed set of structured meta-hints designed to guide large language models in solving complex optimization problems. Through clear goal definitions, embedded validation logic, and parameterized contextual operations, the reliability, accuracy, and efficiency of model generation are effectively improved.
[0131] The scheduling scheme after parsing in one of the iteration rounds in this embodiment is as follows:
[0132] <solution>
[0133] 3->0
[0134] 1->0
[0135] 4->0
[0136] 2->0
[0137] 6->1
[0138] 0->1
[0139] 5->1
[0140] 8->2
[0141] 7->2
[0142] < / solution>
[0143] Note: 3->0 means numbering Arrange warp beams numbered 3 to the specified number. Processing is carried out on machines with a value of 0, and so on.
[0144] S2012: The process of generating a new scheduling scheme by improving the simulated annealing algorithm includes:
[0145] Calculate the rate of change of generated solutions Based on the rate of change of generated solutions Determine the initial temperature and the number of inner iterations ; with the first Optimal solution generated in round Using the initial values as the basis, the initial values are iteratively optimized using perturbation operations and the Metropolis criterion. The inner iterative solution results are output, generating a new scheduling scheme, which is the scheduling scheme to be verified in this round. The rate of change of the generated solution is calculated using the following formula. :
[0146] In the formula, For the first The optimal solution generated in the round. For the first The optimal solution generated in the round;
[0147] The initial temperature is calculated using the following formula. and the number of inner iterations :
[0148] , .
[0149] The disturbance operation involves randomly selecting any warp beam and randomly changing its originally scheduled processing machine to another machine.
[0150] Preferably, there are at least two decision agents; each decision agent independently executes step S201 and generates a scheduling scheme to be verified. Since the large language model is a probabilistic generative system, not a deterministic function, even if the input and process are exactly the same, the scheduling schemes generated by the model may differ; this difference is inherent and unavoidable. In scenarios where multiple decision agents call independently, this characteristic of "the same input may produce different outputs" is utilized. Multiple decision agents generate the scheduling scheme to be verified in parallel, and then step S2032 selects the optimal solution for the current iteration. This improves the quality of scheduling schemes.
[0151] S202: Use the verification agent to verify the feasibility of the scheduling scheme to be verified; if the scheduling scheme to be verified passes the verification, proceed to step S203, otherwise return to step S201.
[0152] Step S202 specifically includes the following steps:
[0153] Based on the expert rule knowledge base, the verification agent sets multiple verification rules and determines whether the scheduling scheme to be verified passes the feasibility verification. If the scheduling scheme to be verified meets all the verification rules, it is determined to pass the verification and proceeds to step S203; if the scheduling scheme to be verified does not meet any of the verification rules, it is determined to fail the verification, the reason for failing the verification is returned, recorded, and the process returns to step S201.
[0154] The verification rules include machine availability verification rules, full processing verification rules for warp beams, validity verification rules for machine information and warp beam information, uniqueness verification rules for machine occupancy at the same time, and format compliance verification rules for the scheduling scheme to be verified.
[0155] The verification agent, based on predefined expert rule knowledge, verifies the generated scheduling scheme, avoiding erroneous schemes as much as possible and mitigating the uncertainty (illusion) problem in the generation of solutions by large language models, ensuring the scheduling scheme is executable. The verification content and requirements set in the verification agent are shown in Table 3.
[0156] Table 3 Verification Content and Requirements
[0157]
[0158] S203: Determine the optimal solution for the current iteration from the scheduling schemes that have been validated by the validated agents. The set of scheduling schemes to be verified, which have been validated by the verified agents, is combined with the set of historical best solutions. The results are then merged and filtered based on an elite retention strategy to form the first... The set of historical best solutions before each iteration And store the data.
[0159] Step S203 specifically includes the following steps:
[0160] S2031: Store the scheduling schemes to be verified that have been verified by the verified agents in the current iteration round;
[0161] S2032: Based on the objective function, determine the optimal solution for the current iteration from the scheduling schemes to be verified that have been validated by the verified agents. ;
[0162] S2033: Combine the scheduling scheme to be verified, which has been verified by the verification agent in this iteration, with the set of historical best solutions. Merge and update the sorting to form the [number]th [order]. The set of historical best solutions before each iteration The updated formula is as follows:
[0163] ,
[0164] In the formula, This is the set of scheduling schemes generated by a large language model and validated by a valid agent at the Kth iteration. This refers to the set of scheduling schemes generated by the improved simulated annealing algorithm and verified by the validated agent at the Kth iteration. For selection functions, refer to the set Select the best one from the options. A set of historical optimal solutions. For the Used during round iteration.
[0165] S204: Determine whether K has reached a preset value. If not, proceed to the next iteration; otherwise, stop the iteration and, based on the objective function, select from the historical optimal solution set. The final optimal solution is determined, and the optimal scheduling scheme is output.
[0166] Specifically, for the set of historical optimal solutions The objective function is calculated for each scheme, and then the maximum completion time of all machines corresponding to each scheme is compared. The scheme with the smallest maximum completion time of all machines is the final optimal solution, and the optimal scheduling scheme is formed based on the final optimal solution.
[0167] In the above implementation examples, after several rounds of iteration, the optimal scheduling scheme is shown in Table 4, and the Gantt chart corresponding to the optimal scheduling scheme is shown in Table 4. Figure 5 As shown.
[0168] Table 4 Optimal Scheduling Scheme Table
[0169]
[0170] To better illustrate the advantages of the scheduling method in this embodiment compared to existing technologies, the scheduling method of this embodiment is compared with the Shortest Processing Time (SPT) method, the Simulated Annealing algorithm, and the Large Language Model. Three comparative experiments were set up for this purpose: Comparative Experiment 1, Comparative Experiment 2, and Comparative Experiment 3. For ease of explanation, the scheduling method of this embodiment is referred to as Method A, the method using the Simulated Annealing algorithm is referred to as Method B, and the method using the Large Language Model is referred to as Method C. It should be noted that in the three sets of comparative experiments, the input production data for each method is the same, and the calculations are all performed using the data in Table 1; the only difference between the comparative experiments is the solution method.
[0171] Comparative Experiment 1: The Shortest Processing Time Machine Selection (SPT) method is compared with the scheduling method in this embodiment.
[0172] The shortest processing time machine selection method (SPT) is a commonly used heuristic algorithm in the scheduling field. Its core logic is to prioritize assigning tasks with the shortest processing time to available machines, thereby reducing task waiting time and improving machine utilization. In textile weaving scheduling scenarios, for each warp beam to be scheduled, based on its standard processing time on each available machine, a machine matching strategy prioritizes selecting the machine with the shortest processing time as the candidate allocation object. Two schemes generated using the shortest processing time machine selection method (SPT) are shown in Table 5, and the results generated by the scheduling method in this embodiment are shown in Table 4.
[0173] Table 5 Comparison of the two schemes generated using SPT in Experiment 1
[0174]
[0175] When using the Shortest Processing Time (SPT) algorithm to solve the problem, for the scenario where the processing time of warp beam 0 is minimized on both machine 0 and machine 1, the SPT algorithm can obtain two different feasible solutions (i.e., two schemes). The SPT algorithm randomly assigns these two solutions, meaning the solution could be scheme number 1 or scheme number 2. However, the objective functions of the two schemes differ significantly, with an average value of 28.5. Comparing the two methods, it can be seen that the SPT algorithm is a local decision model, independently selecting the current optimal machine for each warp beam, ignoring the coupling relationship between decisions. Comparing the scheduling method in this embodiment with SPT, the scheduling method in this embodiment only provides one scheme, while the two schemes generated by the Shortest Processing Time (SPT) method show that the scheduling method in this embodiment has higher determinism.
[0176] Comparative Experiment 2: The scheduling method (Method A) of this embodiment is compared and analyzed with the simulated annealing algorithm (Method B). Both methods use the same initial solution for solving the problem. The difference lies in the initial temperature of the simulated annealing algorithm. and the number of inner iterations It is fixed and unchanging. The scheduling method (method A) in this embodiment generates the solution change rate. Regarding the initial temperature and the number of inner iterations Optimization was performed. After the same number of iterations, a comparison was made, as shown in Table 6:
[0177] Table 6 Comparison results of the two schemes in Comparative Experiment 2
[0178]
[0179] Compared to Method B, under the same initial solution and the same number of iterations, Method A yields better results using the scheduling method in this embodiment. Pure SA relies on random perturbations for exploration, its process is undirected, and it depends on the settings of parameters such as initial temperature and number of iterations. Once set to static, it cannot adapt to different stages of the optimization process. The scheduling method in this embodiment, based on the understanding of the problem by a large language model and historical experience (historical best solutions), indicates the direction of the initial values for improving the simulated annealing algorithm. Simultaneously, by analyzing the rate of change of the generated solutions... Analysis and dynamic configuration of the operating parameters (initial temperature) of the improved simulated annealing algorithm. and the number of inner iterations It can adaptively adjust the strategy according to the current optimization state.
[0180] Comparative Experiment 3: The scheduling method (Method A) and the large language model solution (Method C) in this embodiment use the same initial solution. The difference is that Method A uses an alternating call to the large language model and the improved simulated annealing algorithm, while Method C uses only the large language model. After the same number of iterations, the results are compared as shown in Table 7:
[0181] Table 7 Comparison results of the two schemes in Comparative Experiment 3
[0182]
[0183] Compared to Method C, under the same initial solution and the same number of iterations, Method A achieves the same result, but takes significantly less time than Method C. This demonstrates that the scheduling method in this embodiment is more computationally efficient. The scheduling method in this embodiment achieves efficient collaboration between global search and local optimization through a cross-iteration mechanism of a large language model and an improved simulated annealing algorithm. On one hand, it fully leverages the advantages of the improved simulated annealing algorithm in local search, deeply mining the solutions generated by the large language model, thereby achieving a balance between solution efficiency and solution quality. Simultaneously, it avoids the high time cost problem caused by frequent calls to the pure large language model, thus improving solution efficiency.
[0184] After adopting the above technical solution, a scheduling scheme is generated by alternately calling the large language model and the improved simulated annealing algorithm. The natural language processing and reasoning generalization capabilities of the large language model are leveraged to quickly generate a preliminary optimized scheduling scheme, effectively reducing the sensitivity of the improved simulated annealing algorithm to the initial solution. Simultaneously, this preliminary optimized scheduling scheme provides a starting point for the improved simulated annealing algorithm, strengthening the global optimization capability to avoid getting trapped in local optima and shortening the overall solution cycle. This results in a relatively short maximum completion time for the generated scheduling scheme. Compared with simply using the large language model, the scheduling method of this invention enables a relatively faster generation speed for the scheduling scheme. The feasibility of the scheduling scheme is verified using a verification agent, ensuring its executable nature.
[0185] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, rather than to describe a specific order.
[0186] The present invention has been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the above embodiments. Those skilled in the art can make various modifications to the present invention based on the prior art, and these modifications all fall within the protection scope of the present invention.
Claims
1. A scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm, characterized by: Includes the following steps: S100: Obtain production data from the textile weaving production management system; S200: Describe the textile weaving scheduling problem using natural language, set constraints, and construct a scheduling problem model with the objective function of minimizing the maximum completion time. Set up an iterative process and repeat the iterative process, using the set of optimal solutions before the Kth iteration as the set of historical optimal solutions. Based on the production data and the problem description, an initial solution is generated in a randomized manner, forming a set of historical optimal solutions before the iteration. ; The simulated annealing algorithm is improved by introducing a rate of change for generating solutions. And based on this, the rate of change of the generated solution Determine the initial temperature and the number of inner iterations An improved simulated annealing algorithm was constructed. Each iteration of the process includes the following steps: S201: Determine the parity of the iteration round K and the solution method. If K is even, the improved simulated annealing algorithm is used to solve the problem and generate a scheduling scheme to be verified. Otherwise, the large language model is used to solve the problem and generate a scheduling scheme to be verified. S202: Use a verification agent to verify the feasibility of the scheduling scheme to be verified; if the scheduling scheme to be verified passes the verification, proceed to step S203; otherwise, return to step S201. S203: Determine the optimal solution for the current iteration round from the scheduling schemes to be verified that have been verified by the verification agent. The scheduling scheme to be verified, which has been verified by the verification agent, is combined with the set of historical best solutions. The results are then merged and filtered based on an elite retention strategy to form the first... The set of historical best solutions before each iteration And store the data; S204: Determine whether K has reached a preset value. If not, proceed to the next iteration; otherwise, stop the iteration and, based on the objective function, select the best historical solution set. The final optimal solution is determined, and the optimal scheduling scheme is output. The rate of change of the generated solution is calculated using the following formula. , In the formula, For the first The optimal solution generated in the round. For the first The optimal solution generated in the round; The initial temperature is calculated using the following formula. and the number of inner iterations : , 。 2. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 1, characterized in that: Before executing the iterative process, the expert rule knowledge base, output requirements, and selection mechanism are pre-configured; In step S201, the specific method for solving and generating the scheduling scheme to be verified using the large language model is as follows: The production data, the expert rule knowledge base, the output requirements, the optimization mechanism, and the historical best solution set are combined. The input is fed into the large language model, which then solves the problem and generates the scheduling scheme to be verified. The specific method for solving and generating the scheduling scheme to be verified using the improved simulated annealing algorithm is as follows: When K equals 2, the optimal solution will be determined in the first round. The input is fed into the improved simulated annealing algorithm, which solves the algorithm and generates the scheduling scheme to be verified. When K is an even number greater than 2, the first... The optimal solution determined in the round And in the The optimal solution determined in the round The input is fed into the improved simulated annealing algorithm, which solves the problem and generates the scheduling scheme to be verified.
3. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 2, characterized in that: In step S100, the production data includes machine information of the machine, information of the warp beam, and processing time information of the warp beam on the machine; the machine information includes machine number and opening / closing information uniquely corresponding to the machine number, and the warp beam information includes warp beam number. The expert rule knowledge base includes the following: (1) The start / stop information corresponding to the machine number in the scheduling scheme must be in the enabled state; (2) Within the same time dimension, the machine corresponding to the same machine number can only carry out the processing task of the warp beam corresponding to one warp beam number; (3) The scheduling plan includes all weaving beam numbers; (4) The machine number and weaving beam number in the scheduling scheme must be obtained from step S100; (5) The output of the scheduling scheme must conform to the pre-set format.
4. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 2, characterized in that: Step S201 specifically includes: S2011: The process of generating a new scheduling scheme using the large language model includes: The large language model uses a set of historical best solutions. A new scheduling scheme is generated for the core reference, which is the scheduling scheme to be verified generated in this round; S2012: The process by which the improved simulated annealing algorithm generates a new scheduling scheme includes: Calculate the rate of change of the generated solution Based on the rate of change of the generated solution Determine the initial temperature and the number of inner layer iterations ; with the first Optimal solution generated in round Using the initial value as the basis, the initial value is iteratively optimized using perturbation operations and the Metropolis criterion. The inner iterative solution results are output to generate a new scheduling scheme, which is the scheduling scheme to be verified generated in this round.
5. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 1, characterized in that: Step S203 includes the following steps: S2031: Store the scheduling scheme to be verified that has been verified by the verification agent in the current iteration round; S2032: Based on the objective function, determine the optimal solution for the current iteration round from the scheduling schemes to be verified that have been verified by the verification agent. ; S2033: Combine the scheduling scheme to be verified, which has been verified by the verification agent in this iteration, with the set of historical best solutions. Merge and update the sorting to form the [number]th [order]. The set of historical best solutions before each iteration .
6. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 1, characterized in that: Before executing step S201, a decision-making agent is constructed, and step S201 is executed in the decision-making agent. There are at least two decision-making agents, and each decision-making agent independently executes step S201 and generates the scheduling scheme to be verified.
7. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 1, characterized in that: The problem is described as: Different warp beams were arranged in the workshop. The weaving process can be carried out on any one of the individual looms, where each warp beam is independent and there is no interdependence between them. It is a positive integer. It is a positive integer; The constraints are set as follows: (1) All warp beams to be scheduled must be assigned to machine tools for processing. This constraint is expressed by the following formula. , In the formula, ; (2) At the same time, only one warp beam can be processed on the same machine. This constraint is expressed by the following formula. ; The objective function is set as follows: , In the formula, The maximum completion time for all machines. ; , For machine platform Maximum completion time For weaving beam At the machine Operation time.
8. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 3, characterized in that: Step S202 includes the following steps: Based on the expert rule knowledge base, the verification agent sets multiple verification rules and determines whether the scheduling scheme to be verified passes the feasibility verification. If the scheduling scheme to be verified meets all the verification rules, it is determined to pass the verification and proceeds to step S203; if the scheduling scheme to be verified does not meet any of the verification rules, it is determined to fail the verification, the reason for failing the verification is returned, recorded, and the process returns to step S201.
9. The scheduling method based on the fusion of a large language model and an improved simulated annealing algorithm as described in claim 8, characterized in that: In step S202, the verification rules include machine availability status verification rules, full processing verification rules for warp beams, validity verification rules for machine information and warp beam information, uniqueness verification rules for machine occupancy at the same time, and format compliance verification rules for the scheduling scheme to be verified.
Citation Information
Patent Citations
New simulated annealing algorithm for solving job shop scheduling problem
CN106611278A
Textile workshop optimization algorithm recommendation method and system based on large language model
CN120875477A