Fuzzy scheduling method and system for workshop based on genetic algorithm

Through the workshop fuzzy scheduling method based on genetic algorithm, the problem that the cost of the optimal scheduling solution in the cloud manufacturing environment exceeds the threshold is solved. Through the optimization of the scheduling solution, effective cost control and production efficiency improvement are achieved.

CN116167580BActive Publication Date: 2025-08-26HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310108200.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-30
Publication Date
2025-08-26
Estimated Expiration
2043-01-30

AI Technical Summary

Technical Problem

The existing genetic algorithms fail to effectively consider the cost of machine usage in workshop scheduling, resulting in the total cost of the optimal scheduling scheme that may be greater than the cost threshold, and it is impossible to effectively coordinate manufacturing costs and production efficiency in a cloud manufacturing environment.

Method used

Through the workshop fuzzy scheduling method based on genetic algorithm, scheduling information is initialized, the lower and upper bounds of the cost are obtained, the cost threshold is calculated, the maximum number of machines can be used is determined, the fuzzy scheduling model is constructed, and the initial scheduling scheme is obtained using genetic algorithms, and the total weighted delay time is optimized in combination with the repair mechanism to finally determine the optimal scheduling scheme.

Benefits of technology

This avoids the situation where the total cost of the optimal scheduling scheme exceeds the cost threshold, narrows the search space of the genetic algorithm, and improves the accuracy and efficiency of the scheduling scheme.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116167580B_ABST
    Figure CN116167580B_ABST
Patent Text Reader

Abstract

The present invention provides a fuzzy workshop scheduling method and system based on a genetic algorithm, relating to the field of task scheduling. The method includes calculating a cost threshold based on a lower cost bound and an upper cost bound; obtaining a maximum number of usable machines (Max_m) in the scheduling plan based on the cost threshold, and setting the total number of machines to Max_m; obtaining a pre-built workshop fuzzy scheduling model based on the total number of machines; obtaining a scheduling plan with the minimum fitness value as an initial scheduling plan based on workshop scheduling information, the workshop fuzzy scheduling model, and a genetic algorithm; determining whether the total usage cost of the initial scheduling plan is less than the cost threshold; if not, repairing the initial scheduling plan based on two repair mechanisms, and selecting the initial scheduling plan with the minimum total weighted delay time after repair as the optimal scheduling plan. Based on the above processing, the initial scheduling plan is repaired, avoiding the problem of the optimal scheduling plan having a total usage cost greater than the cost threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of task scheduling, and in particular to a workshop fuzzy scheduling method and system based on genetic algorithm. Background Art

[0002] Scheduling optimization is essentially a resource allocation problem: allocating limited resources to multiple tasks while simultaneously satisfying constraints such as processing sequence and delivery time, in order to optimize a specific goal. A specific shop floor scheduling scenario might involve processing n workpieces on m machines, with each machine only allowed to process one workpiece at a time. The m machines have the same processing capabilities and speeds and are always available. The n workpieces have corresponding priorities and can be processed continuously by any machine, but can only be processed once.

[0003] With the emergence of cloud manufacturing, manufacturers are shifting from pre-purchasing manufacturing resources and then organizing production to renting them through cloud platforms, a phenomenon known as resource externalities. Due to the varying machine resource providers in a cloud environment, the unit cost of using different machines also varies.

[0004] To balance manufacturing costs and production efficiency, companies typically set a cost threshold. The cost of completing all workpieces on a machine is constrained by this threshold (i.e., the cost budget). The optimal scheduling solutions generated by existing genetic algorithms often fail to consider whether the cost threshold is met. When factoring in machine usage costs, the resulting optimal scheduling solution may result in a total cost exceeding the cost threshold, rendering the optimal scheduling solution infeasible.

[0005] Therefore, a fuzzy workshop scheduling method is urgently needed to solve the above problems. Summary of the Invention

[0006] (1) Technical problems solved

[0007] In response to the shortcomings of the existing technology, the present invention provides a workshop fuzzy scheduling method and system based on genetic algorithm, which solves the problem in the existing technology that the total usage cost of the final scheduling plan is greater than the cost threshold, making the final scheduling plan infeasible.

[0008] (2) Technical solution

[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0010] In a first aspect of the present invention, a fuzzy job shop scheduling method based on a genetic algorithm is provided, the method comprising:

[0011] S1. Initialize workshop scheduling information;

[0012] S2. Based on the workshop scheduling information, obtain the lower bound of the cost of the scheduling plan U , cost upper bound And based on the cost lower bound U and the cost upper bound Calculating cost thresholds

[0013] S3. Based on the cost threshold Obtain the maximum number of available machines Max_m in the scheduling plan, and set the total number of machines to Max_m;

[0014] S4. Based on the total number of machines, obtaining a pre-built shop fuzzy scheduling model;

[0015] S5. Based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtaining a scheduling plan with the minimum fitness value as an initial scheduling plan;

[0016] S6. Determine whether the total cost of the initial scheduling solution is less than a cost threshold. If so, proceed to S7; if not, proceed to S8.

[0017] S7, determining the initial scheduling plan as the optimal scheduling plan;

[0018] S8. Repair the initial scheduling plan based on the two preset repair mechanisms respectively, and determine the initial scheduling plan with the smallest total weighted delay time after repair as the optimal scheduling plan.

[0019] Optionally, in S4, the pre-built workshop fuzzy scheduling model includes an objective function and constraints,

[0020] The objective function is:

[0021]

[0022] Among them, the objective function (1) represents minimizing the total weighted delay time; Z represents the total weighted delay time; j represents the number of the workpiece; n represents the total number of workpieces; w j Indicates workpiece J j The weight of T j Indicates workpiece J j Delay time; J j represents the jth workpiece;

[0023] The constraints include:

[0024]

[0025]

[0026]

[0027]

[0028] y ijk +y ikj ≤1 i=1,...,m; j=1,...,n; k=1,...,n (6)

[0029]

[0030]

[0031]

[0032]

[0033]

[0034] C j , T j ≥0 j=1,...,n (12)

[0035] x ij ,y ijk ∈{0, 1} i=1,...,m; j=0,...,n;k=1,...,n (13)

[0036] Among them, constraint (2) is used to limit the uniqueness of workpiece allocation, that is, one workpiece is processed by one machine; i represents the machine number; m represents the total number of machines; x ij =1 indicates workpiece J j On machine M i Upper processing; x ij =0 indicates workpiece J i Not on machine M i Upper processing; M i represents the i-th machine;

[0037] Constraint (3) is used to limit the existence of at most one first processed workpiece on a machine, while allowing a machine to have no processed workpieces; k represents the workpiece number; y i0k =1 means workpiece J k It's Machine M i The first workpiece to be processed on the i0k =0 means that the workpiece Jk is not the machine M i The first workpiece to be processed on the workpiece set; wherein a virtual workpiece J0 is preset in the workpiece set, the number of the virtual workpiece J0 is 0, and the processing time is 0;

[0038] Constraint (4) is used to limit each workpiece to have only one immediate predecessor or the workpiece is the first workpiece on the machine; ijk =1, indicating that the machine M i On the workpiece J i It's J k The preceding workpiece; y ijk =0, indicating that the machine M i On the workpiece J j Not J k The tight preceding workpiece;

[0039] Constraint (5) is used to limit each workpiece to have only one subsequent workpiece or the workpiece is the last workpiece on the machine;

[0040] Constraint (6) is used to limit the uniqueness of the relative position of the workpieces, that is, if the workpiece J i For workpiece J k The previous workpiece, then workpiece J j Not for workpiece J k The next workpiece;

[0041] Constraint (7) is used to limit the workpiece J j For workpiece J k When the workpiece is close to the previous workpiece, workpiece J k The processing sequence must be set on workpiece J j After completion; Indicates workpiece J k The fuzzy completion time of L is a preset positive number. Indicates workpiece J j The fuzzy completion time of Indicates workpiece J k fuzzy processing time;

[0042] Constraint (8) is used to limit the completion time of each workpiece to be greater than the processing time; Indicates workpiece J j fuzzy processing time;

[0043] Constraint (9) is used to calculate the total cost of all workpiece processing; TC represents the total cost of the scheduling scheme; l i represents the unit usage cost of the i-th machine;

[0044] Constraint (10) is used to limit the cost of completing all workpiece processing to within a given cost range;

[0045] Constraint (11) is used to calculate the delay time of the workpiece, where the delay time is the difference between the completion time and the delivery time of the workpiece; T j Indicates workpiece J j Delay time; Indicates workpiece J j delivery period;

[0046] Constraint (12) is used to limit the boundary values ​​of completion time and delay time;

[0047] Constraint (13) is used to limit the two decision variables x ij ,y ijk 0 or 1.

[0048] Optionally, in S2, the cost lower bound U The calculation formula is:

[0049]

[0050] in, Represents the fuzzy parameter based on the signed distance method Perform defuzzification;

[0051] The process of defuzzifying fuzzy parameters based on the signed distance method is as follows:

[0052] For triangular fuzzy number A = (A1, A2, A3), the fuzzy parameter A is defuzzified based on the signed distance method to obtain D(A), where:

[0053]

[0054] In S2, the cost upper bound The calculation process includes:

[0055] S201, determining the priority order of the workpieces based on a preset priority calculation formula;

[0056] The preset priority calculation formula is:

[0057]

[0058] Among them, π j Indicates workpiece J j Priority of w j Indicates workpiece J i The weight of Indicates the earliest available machine M i The fuzzy completion time of the job; UJ represents the set of unprocessed workpieces; represents the processing time of the workpieces in the unprocessed workpiece set; q represents the forward-looking coefficient;

[0059] S202: Based on the priority order of the workpieces, the workpiece with the highest priority is set to be processed on the machine with the earliest available time in the pre-sorted machine set, and this operation is repeated for the remaining workpieces until all workpieces are set to be processed on the corresponding machines in the pre-sorted machine set;

[0060] S203: Calculate the fuzzy completion time of each machine in the pre-sorted machine set And according to the fuzzy completion time Sorting all machines in the pre-sorted machine set in non-ascending order;

[0061] S204, placing the workpieces in the pre-sorted machine set after non-ascending sorting in the order of sorting in the machines with the lowest unit cost for processing;

[0062] S205, based on the signed distance method, the fuzzy completion time Defuzzification and calculation of the total usage cost U ATC ;

[0063] S206, Order

[0064] In S2, the cost threshold is calculated The formula is: Among them, λ is the cost control parameter.

[0065] Optionally, in S3, based on the cost threshold Obtain the maximum number of machines Max_m that can be used in the scheduling plan and set the total number of machines to Max_m, including:

[0066] S301, sort all workpieces according to the shortest job priority rule to obtain the workpiece set J′={J′ [1] ,…,J′ [n]};in,

[0067] Among them, J′ [1] Represents the first workpiece in the workpiece set J′; J′ [n] represents the nth workpiece in the workpiece set J′; Represents workpiece J′ [1] fuzzy processing time; Represents workpiece J′ [n] fuzzy processing time;

[0068] S302, set k = m;

[0069] S303, arrange the first (k-1) workpieces in the workpiece set J' in order on the machine M m ,M m-1 ,…,M m-k+2 and arrange the remaining workpieces on the machine M1 with the lowest unit cost;

[0070] S304. Calculate the total usage cost TC when the number of machines is k.k ;in,

[0071] S305, judgment Is it established? If not, go to S306; if so, go to S307;

[0072] S306, set k=k-1, and go to S303;

[0073] S307, determining the maximum number of machines that can be used under the cost threshold Max_m=k;

[0074] S308. Set the total number of machines m to Max_m, that is, m=Max_m.

[0075] Optionally, in S5, based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtaining a scheduling solution with the minimum fitness value as the initial scheduling solution includes:

[0076] S501. Randomly generate an initial population P(0): randomly generate N chromosomes, each of which has a length of n and each gene is a real number in the range [1, m+1), where the integer part of the real number represents the machine number to which the workpiece is assigned during pre-sorting, and the decimal part of the real number represents the processing order of the workpiece on the assigned machine;

[0077] S502: Calculate the fitness value of the individuals in the population P(t), where the fitness value calculation formula for each individual is:

[0078]

[0079] Where u represents an individual; fit(u) represents the fitness value of individual u; r represents the penalty coefficient;

[0080] S503, performing a selection operation on the population P(t), that is, randomly selecting two chromosomes from the population P(t), determining the individual with the smallest fitness value as the individual of the parent population, and repeating the selection operation until the size of the parent population is N;

[0081] S504, perform a crossover operation on the parent population: randomly select two chromosomes from the parent population, and based on the crossover rate P c Determine the two chromosomes Crossover positions are created, and the genes at the crossover positions are exchanged to produce offspring individuals, and the crossover operation is repeated until the offspring population size is N;

[0082] S505, perform mutation operation on the offspring population: based on the mutation rate P m , randomly select from the offspring population obtained after the crossover operation Chromosomes are mutated; then, a random Genes are mutated in real numbers, i.e., random numbers are generated in the range [1, m+1) Replace the original gene with a random key;

[0083] S506, perform local optimization: based on the local search parameter P LS Perform local optimization algorithms within or between machines, that is, randomly generate random numbers between [0,1]. When the random number is greater than P LS When the random number is not greater than P, the chromosome is locally optimized within the machine; LS When , local optimization of chromosomes between machines is performed;

[0084] S507, perform environmental selection: select N individuals with the smallest fitness values ​​from the population P(t) and the offspring population obtained after selection, crossover, mutation, and local optimization as the next generation population, and t=t+1;

[0085] S508, determine whether t≤T holds. If so, go to S503; otherwise, go to S509; where T represents the maximum number of iterations;

[0086] S509 , outputting the best individual in the population P(t), decoding the best individual and calculating the total usage cost TC; wherein the best individual represents the scheduling scheme with the minimum fitness value.

[0087] Optionally, in S509, the step of decoding the optimal individual and calculating the total usage cost TC includes:

[0088] S50901. Assign the artifact corresponding to each gene in the chromosome to a machine in the pre-sorted machine set M′ represented by the integer portion of the corresponding random key; sort the artifact sets on each machine in non-descending order based on the decimal portion of the random key corresponding to the artifact;

[0089] S50902. Calculate the fuzzy completion time of each machine in the pre-sorted machine set Based on fuzzy completion time Sort the machines in non-ascending order;

[0090] S50903, according to the sorting order of the machines in step S50902, set the workpiece sets on the pre-sorted machines to machines M1, ..., M m and obtain the complete scheduling plan;

[0091] S50904. Calculate the fitness value of the scheduling scheme. The formula for calculating the fitness value is:

[0092] Optionally, in S506, local optimization of the chromosome within the machine includes:

[0093] S50601. Initialize i: i = 1;

[0094] S50602. Initialize k: k = 1;

[0095] S50603. Starting from the k-th position of the i-th machine, determine whether two adjacent workpieces J k and J j satisfy the exchange condition, and j = k + 1; if so, go to S50604; if not, go to S50605;

[0096] Among them, the exchange condition is:

[0097]

[0098] S50604. Adjust the processing order of workpieces J k and J j and exchange the corresponding genes in the chromosome;

[0099] S50605. Determine whether k < |M i | - 1 holds; if so, k = k + 1, go to S50603; if not, go to S50606;

[0100] S50606. Determine whether i < Max_m holds; if so, i = i + 1, go to S50602; otherwise, go to S50607;

[0101] S50607. Terminate the loop and output the existing chromosome.

[0102] Optionally, in S506, the steps of the local search algorithm between machines for the chromosome include:

[0103] S50608. Initialize the search times times = 1 and the search termination condition Times;

[0104] S50609. Randomly select two machines from the non-empty machine set, and randomly select a workpiece on each of the two machines. Take the workpiece with a smaller start time as J s , the machine where it is located as M a , the other workpiece and machine are respectively used as J t , M b , then the fuzzy start time difference between workpiece J s and workpiece J t is Among them, represents workpiece J sThe fuzzy start time; Denote the workpiece J t The fuzzy start time;

[0105] S50610. Judge whether the workpiece J s 、J t meets the exchange condition. If any exchange condition is met, go to S50611; if not, go to S50612;

[0106] Among them, the exchange condition 1: l a ≤l b And

[0107] The exchange condition 2: l a ≥l <00****090>And

[0108] Among them, sh represents the workpiece after the workpiece J on the machine M, h = 1,..., n1; w a represents the weight of the workpiece J s ; w sh represents the workpiece J sh The weight of; represents the fuzzy completion time of the workpiece J sh ; represents the workpiece J sh The fuzzy due date; tg represents the workpiece after the workpiece J on the machine M, t = 1,..., n2; w b represents the workpiece J t ; w tg represents the workpiece J tg The weight of; represents the fuzzy completion time of the workpiece J tg ; represents the workpiece J tg The fuzzy due date; represents the fuzzy processing time difference between the workpiece J s and the workpiece J t ,

[0109] S50611. Adjust the processing order of the workpiece J s 、J t and exchange the genes at the corresponding positions in the corresponding chromosomes;

[0110] S50612. Judge whether times < Times holds. If so, times = times + 1 and go to S50609; if not, go to S50613;

[0111] S50613. Terminate the local search and output the existing chromosome.

[0112] Optionally, in S8, the initial scheduling schemes are repaired based on two preset repair mechanisms respectively, and the repaired initial scheduling scheme with the smallest total weighted delay time is determined as the optimal scheduling scheme, including:

[0113] The two repair mechanisms include: a repair mechanism based on artifact removal and a repair mechanism based on artifact exchange;

[0114] The steps of the repair mechanism based on workpiece removal include:

[0115] S801. Select the machine with the highest unit cost and at least one assigned workpiece as the outgoing machine M. a ;

[0116] S802, remove the machine M a Try to remove the workpieces one by one, and according to the workpiece J j Fuzzy processing time Select the unit usage cost to meet The machine with the shortest completion time among the machines is the receiving machine M b ;

[0117] S803, the workpiece J j Move to the receiving machine M b , reorder the machine sequence according to the local optimization algorithm within the machine and calculate the fitness value;

[0118] S804: Select the removal plan with the smallest total weighted delay time as the initial scheduling plan after the final repair; if the removal plan is an empty set, go to S805;

[0119] S805, Multiple Removals: Sequentially move the last workpiece on the machine with the highest unit processing cost and at least one assigned workpiece to a machine with the shortest processing time and a lower cost than the machine being removed, until the cost requirement is met. The removal plan that meets the cost requirement is used as the initial scheduling plan after the final repair.

[0120] The workflow of the repair mechanism based on artifact exchange includes:

[0121] S806. The machine with the highest unit cost and assigned at least one workpiece is designated as the high-cost machine M. a ;

[0122] S807, give priority to the unit cost second only to M a The machine is a low-cost machine Mb ;

[0123] S808, try to exchange the workpieces on the high-cost machine Ma one by one, according to the high-cost machine M a The artifact J that is currently being exchanged j , in low-cost machine M b Determine the processing time satisfy Workpiece J k ;

[0124] S809, if the workpiece J meets the conditions k If the quantity is not less than one, then the workpiece J j Exchange the workpieces that meet the conditions one by one, and reorder the workpieces on the two machines according to the local optimization algorithm in the machine, record the total weighted delay time, and go to S810; otherwise, reduce the unit usage cost and choose the machine with lower cost as M b , transfer to S808;

[0125] S810, selecting the exchange scheme with the smallest total weighted delay time as the initial scheduling scheme after the final repair; if the exchange scheme is an empty set, go to S811;

[0126] S811. Multiple exchanges: The workpiece with the longest processing time on the machine with the highest unit processing cost and at least one assigned workpiece is exchanged with the workpiece with the shortest processing time on the remaining machines until the cost requirements are met. The removal plan that meets the cost requirements is used as the initial scheduling plan after the final repair.

[0127] In a second aspect of the present invention, a fuzzy shop scheduling system based on a genetic algorithm is provided, the system comprising:

[0128] Initialization module, used to execute S1 and initialize workshop scheduling information;

[0129] The first acquisition module is used to execute S2, obtain the cost lower bound of the scheduling plan based on the workshop scheduling information U , cost upper bound And based on the cost lower bound U and the cost upper bound Calculating cost thresholds

[0130] The second acquisition module is used to execute S3, based on the cost threshold Obtain the maximum number of available machines Max_m in the scheduling plan, and set the number of machines to Max_m;

[0131] A third acquisition module is configured to execute S4, and acquire a pre-built shop fuzzy scheduling model based on the total number of machines;

[0132] a fourth acquisition module, configured to execute S5, and acquire, based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, a scheduling solution with the minimum fitness value as an initial scheduling solution;

[0133] A first judgment module is configured to execute S6 and judge whether the total usage cost of the initial scheduling solution is less than a cost threshold. If so, the process goes to S7; if not, the process goes to S8;

[0134] A first determining module, configured to execute S7 and determine the initial scheduling solution as an optimal scheduling solution;

[0135] The first repairing module is configured to execute S8, repair the initial scheduling schemes based on two preset repairing mechanisms respectively, and determine the initial scheduling scheme with the smallest total weighted delay time after repair as the optimal scheduling scheme.

[0136] (3) Beneficial effects

[0137] The present invention provides a fuzzy workshop scheduling method and system based on genetic algorithm, which has the following advantages compared with the prior art:

[0138] In the technical solution provided by the present invention, S1, initialize the workshop scheduling information; S2, based on the workshop scheduling information, obtain the cost lower bound of the scheduling plan U , cost upper bound And based on the cost lower bound U and the cost upper bound Calculating cost thresholds S3. Based on the cost threshold Obtain the maximum number of usable machines Max_m in the scheduling scheme, and set the total number of machines to Max_m; S4, based on the total number of machines, obtain a pre-built workshop fuzzy scheduling model; S5, based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtain the scheduling scheme with the smallest fitness value as the initial scheduling scheme; S6, determine whether the total usage cost of the initial scheduling scheme is less than the cost threshold, if so, go to S7; if not, go to S8; S7, determine the initial scheduling scheme as the optimal scheduling scheme; S8, repair the initial scheduling scheme based on the two preset repair mechanisms, and determine the initial scheduling scheme with the smallest total weighted delay time after repair as the optimal scheduling scheme.

[0139] Based on the above processing, the scheduling scheme is repaired based on the repair mechanism, which avoids the situation where the total usage cost of the optimal scheduling scheme is greater than the cost threshold, and determines the maximum number of machines that can be used, avoids a large number of useless calculations in the iterative process of the genetic algorithm, narrows the search space of the genetic algorithm, and improves the efficiency of the genetic algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0140] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0141] Figure 1 A flowchart of a fuzzy workshop scheduling method based on a genetic algorithm provided by an embodiment of the present invention;

[0142] Figure 2 A structural diagram of a shop floor fuzzy scheduling system based on a genetic algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0143] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0144] The embodiment of the present application provides a workshop fuzzy scheduling method and system based on a genetic algorithm, which solves the problem in the prior art that the total usage cost of the scheduling solution obtained is greater than the cost threshold, making the final scheduling solution infeasible. It realizes the repair of the scheduling solution based on the repair mechanism, avoids the situation that the total usage cost of the optimal scheduling solution is greater than the cost threshold, and determines the maximum number of machines that can be used, avoids a large number of useless calculations in the iterative process of the genetic algorithm, narrows the search space of the genetic algorithm, and improves the efficiency of the genetic algorithm.

[0145] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:

[0146] Regarding the scheduling optimization problem, the existing technology has the following defects:

[0147] 1. The process of developing optimal scheduling plans in existing technologies is plagued by numerous uncontrollable factors during production, such as machine wear and aging and operator errors. These factors make it impossible to predetermine the relevant time parameters of a product. However, existing genetic algorithms, which consider the relevant time parameters of workpieces as precise time parameters, fail to accurately determine the optimal scheduling plan they obtain, failing to accurately reflect the real-world environment. Consequently, the resulting optimal scheduling plan is less accurate.

[0148] 2. In the existing technology, the cost upper bound is usually set as the cost of placing all workpieces on the machine with the highest unit usage cost. However, the above method of setting the cost upper bound will cause the cost threshold to lose its binding force on the decision-making problem and fail to coordinate the relationship between manufacturing cost and production efficiency.

[0149] 3. When solving the workshop scheduling problem, the traditional genetic algorithm always keeps the number of machines as a given number, regardless of whether there is a cost threshold, which results in an excessively large search space for the algorithm.

[0150] 4. Traditional genetic algorithms use integer encoding, and the sequences on the machine are sequentially sorted, resulting in poor quality of the initial solution. At the same time, during the iterative process of the genetic algorithm, the evolutionary operations only include selection, crossover, and mutation, and the improvement of the next generation population obtained after the evolutionary operations is small.

[0151] 5. Traditional genetic algorithms do not consider whether the output optimal scheduling solution meets the cost constraint. When considering the machine usage cost, the output optimal scheduling solution may have a total usage cost greater than the cost threshold.

[0152] In order to solve the above problems, the present invention provides a fuzzy workshop scheduling method based on genetic algorithm, which includes: S1, initializing workshop scheduling information; S2, obtaining the cost lower bound of the scheduling plan based on the workshop scheduling information U , cost upper bound And based on the cost lower bound U and the cost upper bound Calculating cost thresholds S3. Based on the cost threshold Obtain the maximum number of usable machines Max_m in the scheduling scheme, and set the total number of machines to Max_m; S4, based on the total number of machines, obtain a pre-built workshop fuzzy scheduling model; S5, based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtain the scheduling scheme with the smallest fitness value as the initial scheduling scheme; S6, determine whether the total usage cost of the initial scheduling scheme is less than the cost threshold, if so, go to S7; if not, go to S8; S7, determine the initial scheduling scheme as the optimal scheduling scheme; S8, repair the initial scheduling scheme based on the two preset repair mechanisms, and determine the initial scheduling scheme with the smallest total weighted delay time after repair as the optimal scheduling scheme.

[0153] Based on the above processing, the scheduling scheme is repaired based on the repair mechanism, which avoids the situation where the total usage cost of the optimal scheduling scheme is greater than the cost threshold, and determines the maximum number of machines that can be used, avoids a large number of useless calculations in the iterative process of the genetic algorithm, narrows the search space of the genetic algorithm, and improves the efficiency of the genetic algorithm.

[0154] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0155] See also Figure 1 , Figure 1 A flowchart of a fuzzy workshop scheduling method based on a genetic algorithm is provided in an embodiment of the present invention, such as Figure 1 As shown in Figure 2, the fuzzy scheduling method for a shop floor based on genetic algorithm includes:

[0156] S1. Initialize workshop scheduling information.

[0157] S2. Based on the workshop scheduling information, obtain the lower bound of the cost of the scheduling plan U , cost upper bound and based on the cost lower bound U and the cost upper bound Calculating cost thresholds

[0158] S3. Based on the cost threshold The maximum number of available machines Max_m in the scheduling scheme is obtained, and the number of machines is set to Max_m.

[0159] S4. Based on the total number of machines, a pre-built workshop fuzzy scheduling model is obtained.

[0160] S5. Based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, a scheduling plan with the minimum fitness value is obtained as an initial scheduling plan.

[0161] S6. Determine whether the total usage cost of the initial scheduling solution is less than a cost threshold. If so, go to S7; if not, go to S8.

[0162] S7. Determine the initial scheduling plan as the optimal scheduling plan.

[0163] S8. Repair the initial scheduling plan based on the two preset repair mechanisms respectively, and determine the initial scheduling plan with the smallest total weighted delay time after repair as the optimal scheduling plan.

[0164] Based on the above processing, the scheduling scheme is repaired based on the repair mechanism, which avoids the situation where the total usage cost of the optimal scheduling scheme is greater than the cost threshold, and determines the maximum number of machines that can be used, avoids a large number of useless calculations in the iterative process of the genetic algorithm, narrows the search space of the genetic algorithm, and improves the efficiency of the genetic algorithm.

[0165] For step S1, the initialization workshop scheduling information includes population size N, penalty coefficient r, forward-looking coefficient q, cost control parameter λ, crossover rate P c , mutation rate P m , local search parameter P LS , number of iterations t=0, the maximum number of iterations T in the genetic algorithm.

[0166] Regarding step S4, the pre-built workshop fuzzy scheduling model includes an objective function and constraints.

[0167] The objective function is:

[0168]

[0169] Among them, the objective function (1) represents minimizing the total weighted delay time; Z represents the total weighted delay time; j represents the number of the workpiece; n represents the total number of workpieces; w j Indicates workpiece J j The weight of T j Indicates workpiece J j Delay time; J j represents the jth workpiece;

[0170] The constraints include:

[0171]

[0172]

[0173]

[0174]

[0175] y ijk +y ikj ≤1 i=1,…,m; j=1,…,n; k=1,…,n (6)

[0176]

[0177]

[0178]

[0179]

[0180]

[0181] C j ,T j ≥0 j=1,…,n (12)

[0182] x ij ,y ijk ∈{0,1} i=1,…,m; j=0,…,n; k=1,…,n (13)

[0183] Among them, constraint (2) is used to limit the uniqueness of workpiece allocation, that is, one workpiece is processed by one machine; i represents the machine number; m represents the total number of machines; x ij =1 indicates workpiece J j On machine M i Upper processing; x ij =0 indicates workpiece J j Not on machine M i Upper processing; M i Represents the i-th machine.

[0184] Constraint (3) is used to limit the existence of at most one first processed workpiece on a machine, while allowing a machine to have no processed workpieces; k represents the workpiece number; y i0k =1 means workpiece J k It's Machine M i The first workpiece to be processed on the i0k =0 means workpiece J k Not a machine M i wherein, a virtual workpiece J0 is preset in the workpiece set, the number of the virtual workpiece J0 is 0, and the processing time is 0.

[0185] Constraint (4) is used to limit each workpiece to have only one immediate predecessor or the workpiece is the first workpiece on the machine; ijk =1, indicating that the machine M i On the workpiece Jj It's J k The preceding workpiece; y ijk =0, indicating that the machine M i On the workpiece J j Not J k wherein, in the technical solution of the present invention, the preceding workpiece refers to the workpiece that is immediately before the current workpiece.

[0186] Constraint (5) is used to limit each workpiece to have only one subsequent workpiece or the workpiece is the last workpiece on the machine; wherein, in the technical solution of the present invention, the subsequent workpiece refers to the workpiece that is immediately after the current workpiece.

[0187] Constraint (6) is used to limit the uniqueness of the relative position of the workpieces, that is, if the workpiece J j For workpiece J k The previous workpiece, then workpiece J j Not for workpiece J k The tight rear workpiece.

[0188] Constraint (7) is used to limit the workpiece J j For workpiece J k When the workpiece is close to the previous workpiece, workpiece J k The processing sequence must be set on workpiece J j After completion; Indicates workpiece J k The fuzzy completion time of the project is: L represents a preset positive number, and the value of the positive number L is very large; Indicates workpiece J j The fuzzy completion time of Indicates workpiece J k The fuzzy processing time.

[0189] Constraint (8) is used to limit the completion time of each workpiece to be greater than the processing time; Indicates workpiece J j The fuzzy processing time.

[0190] Constraint (9) is used to calculate the total cost of all workpiece processing; TC represents the total cost of the scheduling scheme; l i Represents the unit usage cost of the i-th machine.

[0191] Constraint (10) is used to limit the cost of completing all workpiece processing to within a given cost range.

[0192] Constraint (11) is used to calculate the delay time of workpiece processing, that is, the delay time is the difference between the completion time and the delivery time of the workpiece; T j Indicates workpiece J j Delay time; Indicates workpiece Jj delivery period.

[0193] Constraint (12) is used to limit the boundary values ​​of completion time and delay time.

[0194] Constraint (13) is used to limit the two decision variables x ij ,y ijk 0 or 1.

[0195] To address the uncertainty of the relevant time parameters of the workpiece, this paper designs a fuzzy genetic algorithm, introduces fuzzy theory into the genetic algorithm, makes the solution of the genetic algorithm more consistent with the actual production situation, and effectively improves the accuracy of the optimal scheduling solution obtained. Specifically, the signed distance method is used to defuzzify the fuzzy parameters during the solution process. Among them, for the triangular fuzzy number A = (A1, A2, A3), the exact value D(A) after defuzzification using the signed distance method is:

[0196]

[0197] For step S2, the cost lower bound U The calculation formula is:

[0198]

[0199] in, Represents the fuzzy parameter based on the signed distance method Perform defuzzification.

[0200] In step S2, the cost upper bound The calculation process includes:

[0201] S201. Determine the priority order of the workpieces based on a preset priority calculation formula.

[0202] The preset priority calculation formula is:

[0203]

[0204] Among them, π j Indicates workpiece J j Priority of w j Indicates workpiece J j The weight of Indicates the earliest available machine M i The fuzzy completion time of the job; UJ represents the set of unprocessed workpieces; represents the processing time of the workpieces in the unprocessed workpiece set; q represents the forward-looking coefficient, specifically, q = {1, 2, …, 10}.

[0205] S202. Based on the priority order of the workpieces, the workpiece with the highest priority is set to be processed on the machine with the earliest available time in the pre-sorted machine set, and this operation is repeated for the remaining workpieces until all the workpieces are set to be processed on the corresponding machines in the pre-sorted machine set.

[0206] S203: Calculate the fuzzy completion time of each machine in the pre-sorted machine set And according to the fuzzy completion time All machines in the pre-sorted machine set are sorted in non-ascending order.

[0207] S204 , setting the workpiece set in the machines in the pre-sorted machine set after non-ascending sorting in the sorted order to be processed in the machines with the lowest unit cost in ascending order according to the sorting order.

[0208] S205, based on the signed distance method, the fuzzy completion time After defuzzification, calculate the total usage cost U ATC .

[0209] S206, Order

[0210] Based on the above processing, the cost upper limit is effectively reduced The determination of the cost upper bound makes the total cost of the scheduling scheme constrained and effectively close to the actual situation in actual work, effectively improving the accuracy of the optimal scheduling scheme.

[0211] Calculating cost thresholds The formula is:

[0212] Where λ is the cost control parameter. Specifically, λ = {0.2, 0.5, 0.8}.

[0213] For step S3, based on the cost threshold The maximum number of machines that can be used in the scheduling plan is Max_m, and the total number of machines is set to Max_m, including:

[0214] S301, sort all workpieces according to the shortest job priority rule to obtain the workpiece set J′={J′ [1] ,…,J′ [n]},in,

[0215] Among them, J′ [1] Represents the first workpiece in the workpiece set J′; J′ [n] represents the nth workpiece in the workpiece set J′; Represents workpiece J′ [1] fuzzy processing time; Represents workpiece J′ [n] The fuzzy processing time.

[0216] S302. Let k=m.

[0217] S303, arrange the first (k-1) workpieces in the workpiece set J' in order on the machine M m ,M m-1 ,…,M m-k+2 and arrange the remaining workpieces on the machine M1 with the lowest unit usage cost.

[0218] S304. Calculate the total usage cost TC when the number of machines is k. k .

[0219] in,

[0220] S305, judgment Is it established? If not, go to S306; if so, go to S307.

[0221] S306. Set k=k-1 and go to S303.

[0222] S307: Determine the maximum number of machines that can be used under the cost threshold (Max_m=k).

[0223] S308. Set the total number of machines m to Max_m, that is, m=Max_m.

[0224] Based on the above processing, the maximum number of machines that can be used is determined, which avoids a large number of useless operations in the iterative process of the genetic algorithm, narrows the search space of the genetic algorithm, and improves the efficiency of the genetic algorithm.

[0225] For step S5, based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, a scheduling solution with the minimum fitness value is obtained as an initial scheduling solution, including:

[0226] S501. Randomly generate an initial population P(0): randomly generate N chromosomes, each of which has a length of n and each gene is a real number in the range [1, m+1), where the integer part of the real number represents the machine number to which the workpiece is assigned during pre-sorting, and the decimal part of the real number represents the processing order of the workpiece on the assigned machine.

[0227] In the technical solution of the present invention, the population represents a set of scheduling schemes, and one chromosome corresponds to one scheduling scheme.

[0228] S502: Calculate the fitness value of the individuals in the population P(t), where the fitness value calculation formula for each individual is:

[0229]

[0230] Where u represents an individual; fit(u) represents the fitness value of individual u; and r represents the penalty coefficient. Furthermore, in the technical solution of the present invention, an individual represents a chromosome, that is, corresponds to a scheduling solution. Based on the formula for calculating the fitness value of an individual, it can be seen that the smaller the individual's fitness value, the smaller the total weighted delay time and cost penalty of the scheduling solution corresponding to that individual.

[0231] S503. Perform a selection operation on the population P(t), that is, randomly select two chromosomes from the population, determine the individual with the best fitness value as the individual of the parent population, and repeat the selection operation until the size of the parent population is N.

[0232] S504, performing a crossover operation on the initial parent population: randomly selecting two chromosomes from the initial parent population, and determining the number of chromosomes in the two chromosomes based on the crossover rate. Crossover positions are created, and the genes at the crossover positions are exchanged to produce offspring individuals, and the crossover operation is repeated until the offspring population size is N.

[0233] S505, perform mutation operation on the offspring population: according to the mutation rate P m , randomly select from the offspring population obtained after the crossover operation Chromosomes are mutated; then, a random Genes are mutated in real numbers, i.e., random numbers are generated in the range [1, m+1) The original gene is replaced by a random key.

[0234] S506, perform local optimization: based on the local search parameter P LS Perform local optimization algorithms within or between machines, that is, randomly generate random numbers between [0,1]. When the random number is greater than P LS When the random number is not greater than P, the chromosome is locally optimized within the machine; LS When , local optimization of chromosomes is performed between machines.

[0235] S507. Perform environmental selection: select N individuals with the smallest fitness values ​​from the population P(t) and the offspring population obtained after selection, crossover, mutation, and local optimization as the next generation population, and t=t+1.

[0236] S508. Determine whether t≤T holds. If so, go to S503; otherwise, go to S509; where T represents the maximum number of iterations.

[0237] S509 , outputting the best individual in the population P(t), decoding the best individual and calculating the total usage cost TC; wherein the best individual represents the individual with the smallest fitness value (ie, the initial scheduling scheme in the present invention).

[0238] In step S509, the steps of decoding the optimal individual and calculating the total usage cost TC include:

[0239] S50901. Assign the workpiece corresponding to each gene in the chromosome to a machine in the pre-sorted machine set M′ represented by the integer part of the corresponding random key; sort the workpiece set on each machine in non-descending order according to the decimal part of the random key corresponding to the workpiece.

[0240] S50902. Calculate the fuzzy completion time of each machine in the pre-sorted machine set Based on fuzzy completion time Sort the machines in non-ascending order.

[0241] S50903, according to the sorting order of the machines in step S50902, set the workpiece sets on the pre-sorted machines to machines M1, ..., M m and obtain the complete scheduling plan.

[0242] S50904. Calculate the fitness value of the scheduling scheme. The formula for calculating the fitness value is:

[0243] In S506, local optimization of the chromosome is performed within the machine, including:

[0244] S50601. Initialize i: i=1.

[0245] S50602. Initialize k: k=1.

[0246] S50603, starting from the kth position of the i-th machine, determine the J of two adjacent workpieces k 、J j Whether the exchange condition is met and j=k+1; if so, go to S50604; if not, go to S50605.

[0247] The exchange conditions are:

[0248]

[0249] S50604, adjust workpiece J k 、J j processing order and exchange the corresponding genes in the chromosomes.

[0250] S50605, judge k<|Mi Determine whether |-1| holds. If it does, then k = k + 1, and go to S50603; if not, then go to S50606.

[0251] S50606. Determine whether i < Max_m holds. If it does, then i = i + 1, and go to S50602; otherwise, go to S50607.

[0252] S50607. Terminate the loop and output the existing chromosome.

[0253] In S506, the steps of performing a local search algorithm between machines on the chromosome include:

[0254] S50608. Initialize the search times times = 1 and the search termination condition Times. [[ID=P15]]

[0255] S50609. Randomly select two machines from the non-empty machine set, and randomly select a workpiece on each of the two machines. Take the workpiece with a smaller start time as J s , and the machine where it is located as M a , and the other workpiece and machine are respectively taken as J t , M b , then the fuzzy start time difference between J s and workpiece J t is [[ID=P31]]

[0256] where represents the fuzzy start time of workpiece J s ; represents the fuzzy start time of workpiece J t .

[0257] S50610. Determine whether J s , J t satisfy the exchange condition according to the following formula. If any exchange condition is satisfied, then go to S50611; if not, then go to S50612.

[0258] Among them, exchange condition 1: l a ≤l b and

[0259] Exchange condition 2: l a ≥l b and

[0260] Among them, sh represents the workpiece J on machine M as The workpiece after, h = 1, …, n1; w sh represents the weight of workpiece J sh ; represents the fuzzy completion time of workpiece J sh ; represents the fuzzy due date of workpiece J sh ; tg represents machine M b the workpiece after workpiece J t on it, t = 1, …, n2; w tg represents the weight of workpiece J tg ; represents the fuzzy completion time of workpiece J tg ; represents the fuzzy due date of workpiece J tg ; represents the fuzzy processing time difference between workpiece J s and workpiece J t ;

[0261] S50611. Adjust the processing order of workpiece J s , J t , and exchange the genes at the corresponding positions in the corresponding chromosome.

[0262] S50612. Judge whether times < Times holds. If so, times = times + 1, and go to S50609; if not, go to S5​​​​​​​​​​​​​​​​​​​​​​​​​​​The machine with the shortest completion time among the machines is the receiving machine M b .

[0269] S803, the workpiece J j Move to the receiving machine M b , reorder the machine sequence according to the local optimization algorithm within the machine and calculate the fitness value.

[0270] S804: Select the removal plan with the smallest total weighted delay time as the initial scheduling plan after the final repair; if the removal plan is an empty set, go to S805.

[0271] S805, Multiple Relocations: The last workpiece on the machine with the highest unit processing cost and at least one assigned workpiece is sequentially moved to a machine with the shortest processing time and a lower cost than the machine being moved from, until the cost requirement is met. The relocation plan that meets the cost requirement is used as the initial scheduling plan after the final repair. The cost requirement means that the total cost of the initial scheduling plan after the final repair is no greater than a cost threshold.

[0272] The workflow of the repair mechanism based on artifact exchange includes:

[0273] S806. The machine with the highest unit cost and assigned at least one workpiece is designated as the high-cost machine M. a .

[0274] S807, give priority to the unit cost second only to M a The machine is a low-cost machine M b .

[0275] S808, for high cost machine M a The workpieces on the machine are exchanged one by one, according to the high cost machine M a The artifact J that is currently being exchanged j , in low-cost machine M b Determine the processing time satisfy Workpiece J k .

[0276] S809, if the workpiece J meets the conditions k If the quantity is not less than one, then the workpiece J j Exchange the workpieces that meet the conditions one by one, and reorder the workpieces on the two machines according to the local optimization algorithm in the machine, record the total weighted delay time, and go to S810; otherwise, reduce the unit usage cost and choose the machine with lower cost as M b , transfer to S808.

[0277] S810. Select the exchange scheme with the smallest total weighted delay time as the initial scheduling scheme after the final repair; if the exchange scheme is an empty set, go to S811.

[0278] S811. Multiple Swaps: The workpiece with the longest processing time on the machine with the highest unit processing cost and at least one assigned workpiece is swapped with the workpiece with the shortest processing time on the remaining machines until the cost requirement is met. The swap solution that meets the cost requirement is used as the final repaired initial schedule. Furthermore, if no swappable workpieces exist and the cost requirement is not met, indicating that the initial schedule cannot be repaired through swapping, the multiple swap steps are terminated and the repaired initial schedule based on workpiece swapping is not output.

[0279] Based on the above processing, the repair mechanism repairs the initial scheduling plan, avoiding the situation where the total usage cost of the optimal scheduling plan is greater than the cost threshold. That is, the infeasible optimal scheduling plan is adjusted to ensure the feasibility of the optimal scheduling plan and coordinate the relationship between production cost and production efficiency in actual work.

[0280] Based on the same inventive concept, the present invention also provides a fuzzy workshop scheduling system based on genetic algorithm, see Figure 2 , Figure 2 The structure diagram of a shop floor fuzzy scheduling system based on genetic algorithm provided by an embodiment of the present invention is as follows: Figure 2 As shown, the system includes:

[0281] The initialization module 201 is used to execute S1 and initialize the workshop scheduling information.

[0282] The first acquisition module 202 is used to execute S2, obtain the cost lower bound of the scheduling plan based on the workshop scheduling information U , cost upper bound And based on the cost lower bound U and the cost upper bound Calculating cost thresholds

[0283] The second acquisition module 203 is used to execute S3, based on the cost threshold The maximum number of available machines Max_m in the scheduling scheme is obtained, and the total number of machines is set to Max_m.

[0284] The third acquisition module 204 is configured to execute S4 and acquire a pre-built shop fuzzy scheduling model based on the total number of machines.

[0285] The fourth acquisition module 205 is configured to execute S5 and acquire a scheduling solution with the minimum fitness value as an initial scheduling solution based on the shop scheduling information, the shop fuzzy scheduling model, and the genetic algorithm.

[0286] The first judgment module 206 is configured to execute S6 and judge whether the total usage cost of the initial scheduling solution is less than a cost threshold. If so, the process goes to S7; if not, the process goes to S8.

[0287] The first determining module 207 is configured to execute S7 and determine the initial scheduling solution as the optimal scheduling solution.

[0288] The first repairing module 208 is configured to execute S8, repair the initial scheduling schemes based on two preset repairing mechanisms respectively, and determine the initial scheduling scheme with the smallest total weighted delay time after repair as the optimal scheduling scheme.

[0289] It can be understood that the genetic algorithm-based workshop fuzzy scheduling system provided in the embodiment of the present invention corresponds to the above-mentioned genetic algorithm-based workshop fuzzy scheduling method. The explanations, examples, beneficial effects, etc. of the relevant contents can refer to the corresponding contents in the genetic algorithm-based workshop fuzzy scheduling method, and will not be repeated here.

[0290] In summary, compared with the existing technology, the present invention has the following beneficial effects:

[0291] 1. The determination of the cost upper bound makes the cost of the scheduling plan binding and effectively close to the actual situation in actual work, effectively improving the accuracy of the optimal scheduling plan.

[0292] 2. Repair the scheduling plan based on the repair mechanism to avoid the situation where the total usage cost of the optimal scheduling plan is greater than the cost threshold.

[0293] 3. The determination of the maximum number of machines that can be used avoids a large number of useless calculations during the iteration process of the genetic algorithm, narrows the search space of the genetic algorithm, and improves the efficiency of the genetic algorithm.

[0294] 4. The present invention designs a fuzzy genetic algorithm and introduces fuzzy theory into the genetic algorithm, so that the solution results are more in line with actual production conditions and effectively improves the accuracy of the optimal scheduling plan.

[0295] 5. Based on the technical solution of the present invention, the cost upper limit is effectively reduced The value of , ensures that the cost is constrained.

[0296] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0297] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A fuzzy job shop scheduling method based on genetic algorithm, characterized in that: The method comprises: S1. Initialize workshop scheduling information; S2. Based on the workshop scheduling information, obtain the lower bound of the cost of the scheduling plan U , cost upper bound and based on the cost lower bound U and the cost upper bound Calculating cost thresholds S3. Based on the cost threshold Obtain the maximum number of available machines Max_m in the scheduling plan, and set the total number of machines to Max_m; S4. Based on the total number of machines, obtaining a pre-built shop fuzzy scheduling model; S5. Based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtaining a scheduling plan with the minimum fitness value as an initial scheduling plan; S6. Determine whether the total cost of the initial scheduling solution is less than a cost threshold. If so, proceed to S7; if not, proceed to S8. S7, determining the initial scheduling plan as the optimal scheduling plan; S8. Repair the initial scheduling plan based on the two preset repair mechanisms respectively, and determine the initial scheduling plan with the smallest total weighted delay time after repair as the optimal scheduling plan; Among them, the two repair mechanisms include: a repair mechanism based on artifact removal and a repair mechanism based on artifact exchange; The steps of the repair mechanism based on workpiece removal include: S801. Select the machine with the highest unit cost and at least one assigned workpiece as the outgoing machine M. a ; S802, remove the machine M a Try to remove the workpieces one by one, and according to the workpiece J j Fuzzy processing time Select the unit usage cost to meet The machine with the shortest completion time among the machines is the receiving machine M b ; S803, the workpiece J j Move to the receiving machine M b , reorder the machine sequence according to the local optimization algorithm within the machine and calculate the fitness value; S804: Select the removal plan with the smallest total weighted delay time as the initial scheduling plan after the final repair; if the removal plan is an empty set, go to S805; S805, Multiple Removals: Sequentially move the last workpiece on the machine with the highest unit processing cost and at least one assigned workpiece to a machine with the shortest processing time and a lower cost than the machine being removed, until the cost requirement is met. The removal plan that meets the cost requirement is used as the initial scheduling plan after the final repair. The workflow of the repair mechanism based on artifact exchange includes: S806. The machine with the highest unit cost and assigned at least one workpiece is designated as the high-cost machine M. a ; S807, give priority to the unit cost second only to M a The machine is a low-cost machine M b ; S808, for high cost machine M a The workpieces on the machine are exchanged one by one, according to the high cost machine M a The artifact J that is currently being exchanged j , in low-cost machine M b Determine the processing time satisfy Workpiece J k ; S809, if the workpiece J meets the conditions k If the quantity is not less than one, then the workpiece J j Exchange the workpieces that meet the conditions one by one, and reorder the workpieces on the two machines according to the local optimization algorithm in the machine, record the total weighted delay time, and go to S810; otherwise, reduce the unit usage cost and choose the machine with lower cost as M b , transfer to S808; S810, selecting the exchange scheme with the smallest total weighted delay time as the initial scheduling scheme after the final repair; if the exchange scheme is an empty set, go to S811; S811. Multiple exchanges: The workpiece with the longest processing time on the machine with the highest unit processing cost and at least one assigned workpiece is exchanged with the workpiece with the shortest processing time on the remaining machines until the cost requirements are met. The removal plan that meets the cost requirements is used as the initial scheduling plan after the final repair.

2. The fuzzy scheduling method for a workshop according to claim 1, characterized in that: In said S4, the pre-built shop fuzzy scheduling model includes an objective function and constraints; The objective function is: Among them, the objective function (1) represents minimizing the total weighted delay time; Z represents the total weighted delay time; j represents the number of the workpiece; n represents the total number of workpieces; w j Indicates workpiece J j The weight of T j Indicates workpiece J j Delay time; J j represents the jth workpiece; The constraints include: y ijk +y ikj ≤1i=1,…,m;j=1,…,n;k=1,…,n#(6) C j ,T j ≥0j=1,…,n#(12) x ij ,y ijk ∈{0,1}i=1,…,m;j=0,…,n;k=1,…,n#(13) Among them, constraint (2) is used to limit the uniqueness of workpiece allocation, that is, one workpiece is processed by one machine; i represents the machine number; m represents the total number of machines; x ij =1 indicates workpiece J j On machine M i Upper processing; x ij =0 indicates workpiece J j Not on machine M i Upper processing; M i represents the i-th machine; Constraint (3) is used to limit the existence of at most one first processed workpiece on a machine, while allowing a machine to have no processed workpieces; k represents the workpiece number; y i0k =1 means workpiece J k It's Machine M i The first workpiece to be processed on the i0k =0 means workpiece J k Not a machine M i The first workpiece to be processed on the workpiece set; wherein a virtual workpiece J0 is preset in the workpiece set, the number of the virtual workpiece J0 is 0, and the processing time is 0; Constraint (4) is used to limit each workpiece to have only one immediate predecessor or the workpiece is the first workpiece on the machine; ijk =1, indicating that the machine M i On the workpiece J j It's J k The preceding workpiece; y ijk =0, indicating that the machine M i On the workpiece J j Not J k The preceding workpiece; Constraint (5) is used to limit each workpiece to have only one subsequent workpiece or the workpiece is the last workpiece on the machine; Constraint (6) is used to limit the uniqueness of the relative position of the workpieces, that is, if the workpiece J j For workpiece J k The previous workpiece, then workpiece J j Not for workpiece J k The next workpiece; Constraint (7) is used to limit the workpiece J j For workpiece J k When the workpiece is close to the previous workpiece, workpiece J k The processing sequence must be set on workpiece J j After completion; Indicates workpiece J k The fuzzy completion time of L is a preset positive number. Indicates workpiece J j The fuzzy completion time of Indicates workpiece J k fuzzy processing time; Constraint (8) is used to limit the completion time of each workpiece to be greater than the processing time; Indicates workpiece J j fuzzy processing time; Constraint (9) is used to calculate the total cost of all workpiece processing; TC represents the total cost of the scheduling scheme; l i represents the unit usage cost of the i-th machine; Constraint (10) is used to limit the cost of completing all workpiece processing to within a given cost range; Constraint (11) is used to calculate the delay time of the workpiece, where the delay time is the difference between the completion time and the delivery time of the workpiece; T j Indicates workpiece J j Delay time; Indicates workpiece J j delivery period; Constraint (12) is used to limit the boundary values ​​of completion time and delay time; Constraint (13) is used to limit the two decision variables x ij ,y ijk 0 or 1.

3. The fuzzy scheduling method for a workshop according to claim 1, characterized in that: In S2, the cost lower bound U The calculation formula is: in, Represents the fuzzy parameter based on the signed distance method Perform defuzzification; The process of defuzzifying fuzzy parameters based on the signed distance method is as follows: For triangular fuzzy number A = (A1, A2, A3), the fuzzy parameter A is defuzzified based on the signed distance method to obtain D(A), where: In S2, the cost upper bound The calculation process includes: S201, determining the priority order of the workpieces based on a preset priority calculation formula; The preset priority calculation formula is: Among them, π j Indicates workpiece J j Priority of w j Indicates workpiece J j The weight of Indicates the earliest available machine M i The fuzzy completion time of the job; UJ represents the set of unprocessed workpieces; represents the processing time of the workpieces in the unprocessed workpiece set; q represents the forward-looking coefficient; S202: Based on the priority order of the workpieces, the workpiece with the highest priority is set to be processed on the machine with the earliest available time in the pre-sorted machine set, and this operation is repeated for the remaining workpieces until all workpieces are set to be processed on the corresponding machines in the pre-sorted machine set; S203: Calculate the fuzzy completion time of each machine in the pre-sorted machine set And according to the fuzzy completion time Sorting all machines in the pre-sorted machine set in non-ascending order; S204. Set the workpiece sets in the pre-sorted machine sets after non-ascending sorting in the machines in ascending order of unit cost for processing one by one; S205, based on the signed distance method, the fuzzy completion time Defuzzification and calculation of the total usage cost U ATC ; S206, Order In S2, the cost threshold is calculated The formula is: Among them, λ is a cost control parameter.

4. The fuzzy scheduling method for a workshop according to claim 1, characterized in that: In S3, based on the cost threshold Obtain the maximum number of machines Max_m that can be used in the scheduling plan and set the total number of machines to Max_m, including: S301, sort all workpieces according to the shortest job priority rule to obtain the workpiece set J′={J′ [1] ,…,J′ [n] };in, Among them, J′ [1] Represents the first workpiece in the workpiece set J′; J′ [n] represents the nth workpiece in the workpiece set J′; Represents workpiece J′ [1] fuzzy processing time; Represents workpiece J′ [n] fuzzy processing time; S302. Let k = m; S303, arrange the first (k-1) workpieces in the workpiece set J' in order on the machine M m ,M m-1 ,…,M m-k+2 and arrange the remaining workpieces on the machine M1 with the lowest unit cost; S304. Calculate the total usage cost TC when the number of machines is k. k ; in, S305, judgment Is it established? If not, go to S306; if so, go to S307; S306. Let k = k - 1, and go to S303; S307. Determine the maximum number of machines Max_m that can be used under the cost threshold = k; S308. Set the total number of machines m as Max_m, that is, m = Max_m.

5. The fuzzy scheduling method for a workshop according to claim 1, characterized in that: In the above S5, based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtain the scheduling scheme with the minimum fitness value as the initial scheduling scheme, including: S501. Randomly generate an initial population P(0): Randomly generate N chromosomes, the length of each chromosome is n, and each gene is a real number within the range of [1, m + 1). Among them, the integer part of the real number represents the machine number to which the workpiece is assigned during pre-sorting, and the decimal part of the real number represents the processing order of the workpiece on the assigned machine; S502. Calculate the fitness values of the individuals in the population P(t), and the calculation formula for the fitness value of each individual is: Among them, u represents an individual; fit(u) represents the fitness value of individual u; r represents a penalty coefficient; S503. Perform a selection operation on the population P(t), that is, randomly select 2 chromosomes from the population P(t), and determine the individual with the minimum fitness value as the individual of the parental population. Repeat the selection operation until the scale of the parental population is N; S504, perform a crossover operation on the parent population: randomly select two chromosomes from the parent population, and based on the crossover rate P c Determine the two chromosomes Crossover positions are created, and the genes at the crossover positions are exchanged to produce offspring individuals, and the crossover operation is repeated until the offspring population size is N; S505, perform mutation operation on the offspring population: based on the mutation rate P m , randomly select from the offspring population obtained after the crossover operation Chromosomes are mutated; then, a random Genes are mutated in real numbers, i.e., random numbers are generated in the range [1, m+1) Replace the original gene with a random key; S506, perform local optimization: based on the local search parameter P LS Perform local optimization algorithms within or between machines, that is, randomly generate random numbers between [0,1]. When the random number is greater than P LS When the random number is not greater than P, the chromosome is locally optimized within the machine; LS When , the chromosome is locally optimized among machines; S507. Perform environmental selection: Select the N individuals with the minimum fitness values from the population P(t) and the offspring population obtained after selection, crossover, mutation, and local optimization as the next-generation population, and t = t + 1; S508. Judge whether t ≤ T holds. If so, go to S503; otherwise, go to S509; Among them, T represents the maximum number of iterations; S509. Output the optimal individual in the population P(t), decode the optimal individual and calculate the total usage cost TC; among them, the optimal individual represents the scheduling scheme with the minimum fitness value.

6. The fuzzy scheduling method for a workshop according to claim 5, characterized in that: In the above S509, the steps of decoding the optimal individual and calculating the total usage cost TC include: S50901. Assign the workpiece corresponding to each gene in the chromosome to the machine in the pre-sorted machine set M′ represented by the integer part of the corresponding random key; for the workpiece sets on each machine, perform non-descending sorting according to the decimal part of the random key corresponding to the workpiece; S50902. Calculate the fuzzy completion time of each machine in the pre-sorted machine set And based on the fuzzy completion time C M′i Sort the machines in non-ascending order; S50903, according to the sorting order of the machines in step S50902, set the workpiece sets on the pre-sorted machines to machines M1, ..., M m and obtain the complete scheduling plan; S50904. Calculate the fitness value of the scheduling scheme. The formula for calculating the fitness value is:

7. The fuzzy scheduling method for a workshop according to claim 5, characterized in that: In the above S506, perform local optimization within the machine for the chromosome, including: S50601. Initialize i: i = 1; S50602. Initialize k: k = 1; S50603, starting from the kth position of the i-th machine, determine the J of two adjacent workpieces k 、J j Whether the exchange condition is met and j=k+1; if so, go to S50604; if not, go to S50605; Among them, the swapping condition is: S50604, adjust workpiece J k 、J j The processing order of the two proteins is changed, and the corresponding genes in the chromosomes are exchanged; S50605, judge k<|M i |-1 is true, if so, then k=k+1, go to S50603; if not, go to S50606; S50606. Judge whether i < Max_m holds. If so, i = i + 1, and go to S50602; otherwise, go to S50607; S50607. Terminate the loop and output the existing chromosome.

8. The fuzzy scheduling method for a workshop according to claim 5, characterized in that: In the above S506, the steps of performing a local search algorithm between machines for the chromosome include: S50608. Initialize the search times times = 1, and the search termination condition Times; S50609. Randomly select two machines from the non-empty machine set, and randomly select a workpiece on each of the two machines. The workpiece with the smaller start time is selected as J. s , where the machine is M a , the other side workpiece and machine are J t , M b , then workpiece J s With workpiece J t The fuzzy start time difference in, Indicates workpiece J s The fuzzy start time; Indicates workpiece J t The fuzzy start time; S50610, determine the workpiece J according to the following formula s 、J t Whether the exchange conditions are met, if any exchange condition is met, go to S50611; if not, go to S50612; Among them, exchange condition 1: l a ≤l b and Exchange Condition 2: l a ≥l b and Among them, sh represents the machine M a Workpiece J s The workpiece after, h=1,…,n1; w sh Indicates workpiece J sh The weight of Indicates workpiece J sh The fuzzy completion time of Indicates workpiece J sh The fuzzy delivery period of machine M b Workpiece J t The workpiece after, t=1,…,n2; w tg Indicates workpiece J tg The weight of Indicates workpiece J tg The fuzzy completion time of Indicates workpiece J tg Fuzzy delivery period; Indicates workpiece J s With workpiece J t The fuzzy processing time difference, S50611, adjust workpiece J s 、J t The processing order of the genes is changed and the genes at the corresponding positions in the corresponding chromosomes are exchanged; Judge whether times < Times holds. If so, then times = times + 1, and go to S50609; if not, then go to S50613; S50613: Terminate the local search and output the existing chromosome.

9. A fuzzy workshop scheduling system based on genetic algorithm, characterized in that: The system includes: An initialization module for performing S1: Initialize the workshop scheduling information; The first acquisition module is used to execute S2, obtain the cost lower bound of the scheduling plan based on the workshop scheduling information U , cost upper bound And based on the cost lower bound U and the cost upper bound Calculating cost thresholds The second acquisition module is used to execute S3, based on the cost threshold Obtain the maximum number of available machines Max_m in the scheduling plan, and set the total number of machines to Max_m; A third acquisition module for performing S4: Based on the total number of machines, obtain the pre-constructed workshop fuzzy scheduling model; A fourth acquisition module for performing S5: Based on the workshop scheduling information, the workshop fuzzy scheduling model, and the genetic algorithm, obtain the scheduling plan with the minimum fitness value as the initial scheduling plan; A first judgment module for performing S6: Judge whether the total usage cost of the initial scheduling plan is less than the cost threshold. If so, then go to S7; if not, then go to S8; A first determination module for performing S7: Determine the initial scheduling plan as the optimal scheduling plan; A first repair module for performing S8: Repair the initial scheduling plan respectively based on two preset repair mechanisms, and determine the initial scheduling plan with the minimum total weighted tardiness time after repair as the optimal scheduling plan; The two repair mechanisms include: a repair mechanism based on workpiece removal and a repair mechanism based on workpiece exchange; S801. Select the machine with the highest unit cost and at least one assigned workpiece as the outgoing machine M. a ; S802, remove the machine M a Try to remove the workpieces one by one, and according to the workpiece J j Fuzzy processing time Select the unit usage cost to meet The machine with the shortest completion time among the machines is the receiving machine M b ; S803, the workpiece J j Move to the receiving machine M b , reorder the machine sequence according to the local optimization algorithm within the machine and calculate the fitness value; [[ID=**10**]]Among them, the steps of the repair mechanism based on workpiece removal include: S804: Select the removal plan with the minimum total weighted tardiness time as the finally repaired initial scheduling plan; if the removal plan is an empty set, go to S805; S805: Multiple removals: Sequentially move the last workpiece on the machine with the highest unit processing cost and at least one assigned workpiece to the machine with the minimum processing time and a cost less than that of the removing machine until the cost requirement is met, and use the removal plan that meets the cost requirement as the finally repaired initial scheduling plan; S806. The machine with the highest unit cost and assigned at least one workpiece is designated as the high-cost machine M. a ; S807, give priority to the unit cost second only to M a The machine is a low-cost machine M b ; S808, for high cost machine M a The workpieces on the machine are exchanged one by one, according to the high cost machine M a The artifact J that is currently being exchanged j , in low-cost machine M b Determine the processing time satisfy Workpiece J k ; S809, if the workpiece J meets the conditions k If the quantity is not less than one, then the workpiece J j Exchange the workpieces that meet the conditions one by one, and reorder the workpieces on the two machines according to the local optimization algorithm in the machine, record the total weighted delay time, and go to S810; otherwise, reduce the unit usage cost and choose the machine with lower cost as M b , transfer to S808; The working process of the repair mechanism based on workpiece exchange includes: S810: Select the exchange plan with the minimum total weighted tardiness time as the finally repaired initial scheduling plan; If the exchange plan is an empty set, go to S811; S811: Multiple exchanges: Sequentially exchange the workpiece with the longest processing time on the machine with the highest unit processing cost and at least one assigned workpiece with the workpiece with the shortest processing time on the other machines until the cost requirement is met, and use the removal plan that meets the cost requirement as the finally repaired initial scheduling plan.

Citation Information

Patent Citations

  • Dynamic multi-target flexible job shop scheduling method based on improved artificial bee colony algorithm

    CN113569484A

  • Workshop scheduling method and system based on improved multi-objective genetic algorithm

    CN114862090A