A conflict resolution method based on an improved genetic algorithm
By improving the genetic algorithm to construct mathematical models and adaptive learning crossover and mutation operations, the resource matching of the cloud manufacturing platform is optimized, solving the problems of low resource utilization and uneven allocation, and achieving more efficient resource allocation and more balanced regional allocation.
Patent Information
- Application Number
- CN202311276831.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-10-07
AI Technical Summary
In existing technologies, cloud manufacturing platforms have low resource utilization, slow optimization processes, and unreasonable resource allocation in resource conflict resolution methods, resulting in low efficiency in manufacturing resource allocation and uneven regional distribution.
An improved genetic algorithm is used to construct a mathematical model based on time cost and resource utilization efficiency. By combining the objective evaluation function and constraints with roulette wheel selection, crossover, and mutation operations, resource matching is optimized. Adaptive learning is used to dynamically adjust the crossover rate and mutation rate to improve resource utilization efficiency.
It effectively solves the resource conflict problem in the cloud manufacturing environment, improves resource utilization and allocation efficiency, optimizes the resource allocation process, and achieves more efficient resource matching and more balanced regional allocation.
Smart Images

Figure SMS_1 
Figure SMS_2 
Figure SMS_3
Abstract
Description
Technical Field
[0001] This invention relates to a method for resolving resource conflicts, and more particularly to a method for resolving resource conflicts based on an improved genetic algorithm. Background Technology
[0002] In existing technologies, cloud manufacturing services often experience various forms of resource conflicts during the invocation and service processes. For example, various hardware production equipment may experience resource selection conflicts under multiple constraints (such as machine tools and other equipment resources). Considering multiple constraints and random disturbances generated during use in the production workshop, these factors can lead to varying degrees of conflict in the system's resource selection.
[0003] In cloud manufacturing environments, service composition often generates manufacturing solutions in a loosely coupled manner. Compared to traditional resource service composition, resource service composition in cloud manufacturing is more complex and unique. For example, parallel requests for multiple resources are the most common occurrence in cloud manufacturing models, as are situations where similar resource requests exceed available resources. Resource conflicts caused by these relatively complex factors are a technical challenge that every resource provider must address.
[0004] Cloud manufacturing has emerged as a new service-oriented, networked manufacturing model. As a new model that provides manufacturing services to users by utilizing network resources according to their manufacturing needs, cloud manufacturing integrates existing intelligent technologies such as cloud computing, the Internet of Things, and high-performance storage. This enables integrated management and unified allocation of manufacturing resources, ensuring the efficient and stable completion of various manufacturing activities. As a networked manufacturing service model, the cloud manufacturing platform provides a "pay-as-you-go" supply and demand chain for resource users and providers, optimizing service methods and promoting a win-win collaborative approach involving the cloud platform and all parties involved.
[0005] The cloud manufacturing platform system contains the following operational elements:
[0006] (1) Cloud manufacturing resources
[0007] Cloud manufacturing resources refer to all relevant elements used to complete manufacturing tasks or activities throughout the entire manufacturing lifecycle. Cloud manufacturing resources are also classified in form based on their different attributes, such as physical manufacturing resources, network service resources, and human resources.
[0008] (2) Resource Provider
[0009] Resource providers: These are the providers of manufacturing services within the entire cloud manufacturing system. Resource providers publish their manufacturing resources on the shared network, making them available to relevant users. These resources can be physical resources, such as standard parts production and equipment manufacturing; network service resources, such as simulation analysis and web services; or human resources, such as technical expertise and outsourced personnel. Resource publishers can be either enterprises or individuals.
[0010] (3) Resource demanders
[0011] Resource demanders: These refer to users who require manufacturing services within the cloud manufacturing system. They can be businesses or individuals. They search for or publish their manufacturing service needs in cloud manufacturing; the resources requested by these users constitute the resource types provided by the resource providers. Manufacturing services are used to meet the personalized manufacturing needs of their products throughout their entire lifecycle.
[0012] (4) Cloud Manufacturing Resource Platform
[0013] A cloud manufacturing resource platform refers to a set of activities related to manufacturing production and trade within a cloud manufacturing environment. These include: the perception of various manufacturing resource capabilities; virtual access to physical resources; resource discovery, matching, and allocation; decomposition, combination, and execution of manufacturing tasks; and the transaction, settlement, and evaluation of manufacturing services. The cloud manufacturing resource platform provides environmental support for cloud manufacturing activities, offering resource integration and management; it is a toolset for manufacturing services.
[0014] (5) Cloud manufacturing task
[0015] Cloud manufacturing tasks refer to manufacturing demands posted by cloud resource users. Based on the specific content of the demands, the cloud manufacturing resource platform generates corresponding manufacturing tasks for matching with manufacturing resources. Cloud manufacturing tasks posted by users can be broken down into sub-tasks by the platform according to their complexity, and then the sub-tasks seek corresponding resource services.
[0016] Taking the development of data acquisition software for specific parts of a workshop production line as an example, the following content will be explained:
[0017] When resource demanders publish data collection software applications, the platform system searches for qualified resource providers. For these supply and demand relationships that can be retrieved, a supply and demand matching task, namely a cloud manufacturing task, will be formed.
[0018] In existing resource conflict resolution methods, cloud manufacturing tasks, acting as matching tasks for retrieval, cannot meet actual production needs. They fail to decompose cloud manufacturing tasks into sub-tasks capable of actual production. These sub-tasks should align with the resource provider's development needs as the actual data acquisition software. Examples of sub-tasks include software framework construction, software-hardware communication development, business logic implementation, and front-end UI development. Furthermore, existing resource conflict resolution methods suffer from low resource utilization, slow optimization processes, and unreasonable resource allocation. The effectiveness and practicality of cloud manufacturing resource allocation optimization are poor, and existing manufacturing resource allocation is inefficient and unevenly distributed across regions. Summary of the Invention
[0019] To effectively address the problems of low resource utilization, slow optimization process, unreasonable resource allocation, poor effectiveness and practicality of cloud manufacturing resource allocation optimization, and low allocation efficiency and uneven regional distribution of existing manufacturing resources, this invention presents a resource conflict resolution method based on an improved genetic algorithm, comprising the following steps:
[0020] Step 101: Based on the number of resource providers and resource demanders, and the time categories of manufacturing services: manufacturing time and transportation time, construct a mathematical model based on time cost TT:
[0021]
[0022] In the formula: cus represents the number of resource demanders, and the range of cus is 1-n;
[0023] sup represents the number of resource providers, and the range of sup is 1-1;
[0024] tas represents the number of subtasks, and the number of tas ranges from 1 to m;
[0025] 's' represents the time category, and there are two categories: manufacturing time and transportation time.
[0026] TT means completing the manufacturing task in the shortest possible manufacturing time;
[0027] mat(sup,cus,tas) represents the matching of resource provider sup with resource demander cus subtask tas;
[0028] t(sup,cus,tas,s) represents the time of resource provider sup for resource demander cus subtask of the s-th time category;
[0029] t(sup,cus,tas,1)=mt(sup,cus,tas); therefore, mt represents the manufacturing time of sup for the subtask cus of tas;
[0030] t(sup,cus,tas,2)=tt(sup,cus,tas); therefore, tt represents the transport time of sup to the subtask cus of tas;
[0031] Step 102: Based on the decomposition of tasks and subtasks involved in conflict resolution and the differences in the manufacturing capabilities of resource providers, establish a mathematical model based on resource utilization efficiency (BR):
[0032]
[0033] Where br(sup) represents the benefit conversion rate of resource provider sup;
[0034] num(sup,cus) represents the number of selection tasks for resource provider sup and resource demander cus;
[0035] BR represents the resource utilization efficiency objective function, which aims to improve resource utilization efficiency through reasonable subtask allocation in order to maximize the use of available resources;
[0036] Step 103: Based on the mathematical model established in Step 101 based on time cost (TT) and the mathematical model established in Step 102 based on resource utilization efficiency (BR), construct the objective evaluation function P for resolving resource conflicts in cloud manufacturing.
[0037]
[0038] Wherein, TM(cus) represents the maximum time for each task of resource provider cus;
[0039] The weighting coefficients ω1 and ω2 are the weights of the time function and the benefit function, respectively, and ω1 + ω2 = 1;
[0040] Step 104: Based on the objective evaluation function P for resolving resource conflicts in cloud manufacturing, and considering the number of supply and demand sides and task status factors, configure the constraints:
[0041] The constraints for solving the objective function P are: x and y;
[0042] x: Matching resource providers has the property of uniqueness:
[0043]
[0044] Where mat(sup,cus,tas) equals 1 or 0, that is: if mat(sup,cus,tas) = 1, it means that the resource provider sup and the resource demander cus's task tas are matched, otherwise mat(sup,cus,tas) = 0. Therefore, the local formula in the mathematical model of step 102 is as follows:
[0045]
[0046] y: The sum of the times for each subtask does not exceed the maximum time for that task.
[0047]
[0048] Step 105: Solve the objective function for resolving resource conflicts in cloud manufacturing to obtain the optimized resource matching results:
[0049] Determine the fitness function fit(TT,BR) for resolving resource conflicts in cloud manufacturing;
[0050] Encode the cloud manufacturing services of the various sub-tasks and resource providers involved in conflict resolution into chromosome genes;
[0051] Randomly generate an initial population that satisfies the conflict resolution logic and rule constraints;
[0052] The next generation of the population is obtained by using roulette wheel selection; crossover and mutation operations are performed on the individuals in the initial population to obtain the optimal solution of the current population fitness function fit(TT,BR);
[0053] Repeat the crossover and mutation operations on the individuals in the initial population to obtain the next generation population until the maximum number of iterations is reached;
[0054] By comparing the optimal solutions of the fitness function fit(TT,BR) of each generation of the population, the chromosome with the largest fitness function fit(TT,BR) in the population is found, thus obtaining the optimal solution for resolving cloud manufacturing resource conflicts.
[0055] The aforementioned conflict resolution method based on an improved genetic algorithm further includes the following step 105:
[0056] The fitness function fit(TT,BR) is set to the reciprocal of the objective function P, i.e., fit(TT,BR) = 1 / P. When TT is small and BR is large, the fitness value fit is large, indicating that the chromosome is better.
[0057] The aforementioned conflict resolution method based on an improved genetic algorithm further includes the following step 105:
[0058] The chromosome genes are encoded using integer encoding, with each chromosome representing the complete manufacturing sequence of the candidate tasks; the chromosome encoding length is: integer strings, before chromosome encoding Each gene location corresponds to a subtask, and all will receive the following results. The cloud manufacturing service is provided by the resource provider corresponding to each gene locus, where the total number of resource demanders is n, and the manufacturing subtasks of resource demander cus are decomposed into m.
[0059] The aforementioned conflict resolution method based on an improved genetic algorithm further includes the following step: Step 105, which involves randomly generating an initial population that satisfies the conflict resolution logic and rule constraints, includes:
[0060] The genetic population is determined by generating a certain number of individuals as an initial population through random combination; this is based on an optimization request for resolving resource conflicts in a cloud manufacturing platform system.
[0061] The number of resource demanders is obtained and assigned a numerical identifier. Based on the definition of chromosome gene coding, the number of resource demanders is represented as cus1, cus2, ..., cus m ;
[0062] Obtain the task decomposition of resource requesters. Based on the definition of chromosome encoding, and ensuring that no subtasks are missing, the subtasks of resource requesters will be randomly assigned gene positions, thereby forming the first half of the chromosome with gene positions [1,n].
[0063] The number of resource requesters is obtained and assigned a numerical code for identification. Based on the definition of chromosome coding, this code is represented as sup1, sup2, ..., sup k ;
[0064] Obtain the matching results between subtasks and resource providers, and randomly configure the task order of subtasks among resource providers to form a correspondence between subtasks and resource providers. Based on the definition of chromosome encoding, this achieves gene... With genes The correspondence.
[0065] The aforementioned conflict resolution method based on an improved genetic algorithm further includes the following steps in step 105: obtaining the next generation population using roulette wheel selection.
[0066] Step 501: Calculate the fitness value f(i) for each chromosome, where i = 1, 2, 3, ..., n; n represents the total number of chromosomes;
[0067] Step 502: Calculate the probability p(i) = f(i) / sum(f) for each chromosome to be inherited into the next generation population, where sum(f) represents the sum of the fitness values of all chromosomes;
[0068] Step 503: Calculate the cumulative probability of each chromosome where i = 1, 2, …, n;
[0069] Step 504: Randomly generate a pseudo-random number r uniformly distributed in the interval [0, 1];
[0070] Step 505: If r < q(1), then select chromosome 1; otherwise, select chromosome k such that q(k - 1) < r ≤ q(k) holds;
[0071] Repeat Step 504 and Step 505 a total of n times to generate the next generation population.
[0072] For the above conflict resolution method based on an improved genetic algorithm, further: In Step 105, the parameters of the crossover operation include: the crossover rate, and the parameters of the mutation operation include: the mutation rate. The crossover rate adopts a dynamic change method according to the population state. The range of change of the crossover rate is 0.4 - 0.9, and the range of change of the mutation rate is 0.01 - 0.21. The update cycle formula for the crossover rate and the mutation rate is k, where k is an integer:
[0073]
[0074] When the number of iterations satisfies the U(gen) condition (c = 1, 2, 3…), Q is an adjustment function; where:
[0075] U(gen) = c × k
[0076]
[0077] gen is the total number of iterations, represents the maximum fitness value of chromosome i in the t-th generation, represents the maximum fitness value of chromosome i in the first generation, and when the number of iterations satisfies the U(gen) condition (c = 1, 2, 3…), it is used to update the values of Pc and Pm:
[0078] Pc(U(gen)) = Pc(U(gen) - k) + 5Q
[0079] Pm(U(gen)) = Pm(U(gen) - k) + 0.2Q
[0080]
[0081]
[0082] Where Pc represents the crossover probability and Pm represents the mutation probability;
[0083] After obtaining new crossover and mutation rates through periodic updates, crossover and mutation operations are performed.
[0084] The crossover operation uses the integer crossover method: two chromosomes are randomly selected from the population, and the individuals before the crossover is performed are removed. The genes are then randomly selected for crossover;
[0085] The mutation operation uses the exchange mutation method: two gene loci on a chromosome are randomly selected, and the genes on these two gene loci are exchanged to obtain a new chromosome.
[0086] The aforementioned conflict resolution method based on an improved genetic algorithm further includes the following: the crossover operation parameter, the crossover rate, varies from 0.5 to 0.8.
[0087] The aforementioned conflict resolution method based on an improved genetic algorithm further includes the following: the crossover operation parameter has a mutation rate ranging from 0.1 to 0.15.
[0088] Compared with the prior art, the present invention:
[0089] 1. This invention addresses the problem of manufacturing resource conflicts in cloud manufacturing environments through an improved genetic algorithm-based conflict resolution method. Based on an innovative approach that uses time cost and resource utilization efficiency as optimization objectives, corresponding model constraints are provided to establish the conflict resolution model. An improved genetic algorithm is then applied to optimize this model, employing a multi-layered integer encoding method to effectively address the issue of a large number of elements to be compiled.
[0090] 2. A crossover and mutation mechanism was designed to increase population diversity and maintain local convergence as much as possible. Crossover and mutation employ adaptive learning, with the crossover and mutation rates dynamically changing as the improved genetic algorithm runs. Crossover and mutation operations play a crucial role in the performance of the genetic algorithm, with Pc and Pm being the most important parameters. When Pc, especially Pm, is too large, healthier individuals in the population are easily destroyed, hindering solution convergence and the generation of the optimal solution; conversely, if Pc and Pm are too small, it is difficult to generate new individuals. In conventional genetic algorithms, Pc and Pm are often determined through extensive experiments or experience, a tedious but efficient method. This invention proposes dynamically determining the probabilities of Pc and Pm according to a predetermined pattern based on the number of iterations, the current population state (fitness value), and the periodic behavior of the fitness value during the iteration process. The crossover and mutation mechanisms employ adaptive learning, with the crossover and mutation rates dynamically changing as the improved genetic algorithm runs. This enables flexible matching of manufacturing resources and improves the resource conflict resolution level of the cloud manufacturing platform system. Attached Figure Description
[0091] Appendix Figure 1 This invention relates to a conflict resolution method based on an improved genetic algorithm, which includes task matching and service relationship graphs for resource supply and demand sides.
[0092] Appendix Figure 2 This is a flowchart of a conflict resolution method based on an improved genetic algorithm according to the present invention.
[0093] Appendix Figure 3 This is a flowchart of a conflict resolution method based on an improved genetic algorithm according to the present invention.
[0094] Appendix Figure 4 This is a schematic diagram of the crossover operation in a conflict resolution method based on an improved genetic algorithm according to the present invention.
[0095] Appendix Figure 5 This is a schematic diagram of the mutation operation in a conflict resolution method based on an improved genetic algorithm according to the present invention.
[0096] Appendix Figure 6 This is a schematic diagram illustrating the optimization results of conflict resolution in cloud manufacturing resource services, representing a specific case of a conflict resolution method based on an improved genetic algorithm according to the present invention. Detailed Implementation
[0097] Preferred Implementation
[0098] A resource conflict resolution method based on an improved genetic algorithm, characterized by the following steps:
[0099] Step 101: Based on the number of resource providers and resource demanders, and the time categories of manufacturing services: manufacturing time and transportation time, construct a mathematical model based on time cost TT:
[0100]
[0101] In the formula: cus represents the number of resource demanders, and the range of cus is 1-n;
[0102] sup represents the number of resource providers, and the range of sup is 1-1;
[0103] tas represents the number of subtasks, and the number of tas ranges from 1 to m;
[0104] 's' represents the time category, and there are two categories: manufacturing time and transportation time.
[0105] TT means completing the manufacturing task in the shortest possible manufacturing time;
[0106] mat(sup,cus,tas) represents the matching of resource provider sup with resource demander cus subtask tas;
[0107] t(sup,cus,tas,s) represents the time of resource provider sup for resource demander cus subtask of the s-th time category;
[0108] t(sup,cus,tas,1)=mt(sup,cus,tas); therefore, mt represents the manufacturing time of sup for the subtask cus of tas;
[0109] t(sup,cus,tas,2)=tt(sup,cus,tas); therefore, tt represents the transport time of sup to the subtask cus of tas;
[0110] Step 102: Based on the decomposition of tasks and subtasks involved in conflict resolution and the differences in the manufacturing capabilities of resource providers, establish a mathematical model based on resource utilization efficiency (BR):
[0111]
[0112] Where br(sup) represents the benefit conversion rate of resource provider sup;
[0113] num(sup,cus) represents the number of selection tasks for resource provider sup and resource demander cus;
[0114] BR represents the resource utilization efficiency objective function, which aims to improve resource utilization efficiency through reasonable subtask allocation in order to maximize the use of available resources;
[0115] Step 103: Based on the mathematical model established in Step 101 based on time cost (TT) and the mathematical model established in Step 102 based on resource utilization efficiency (BR), construct the objective evaluation function P for resolving resource conflicts in cloud manufacturing.
[0116]
[0117] Wherein, TM(cus) represents the maximum time for each task of resource provider cus;
[0118] The weighting coefficients ω1 and ω2 are the weights of the time function and the benefit function, respectively, and ω1 + ω2 = 1;
[0119] Step 104: Based on the objective evaluation function P for resolving resource conflicts in cloud manufacturing, and considering the number of supply and demand sides and task status factors, configure the constraints:
[0120] The constraints for solving the objective function P are: x and y;
[0121] x: Matching resource providers has the property of uniqueness:
[0122]
[0123] Where mat(sup,cus,tas) equals 1 or 0, that is: if mat(sup,cus,tas) = 1, it means that the resource provider sup and the resource demander cus have a matching task tas, otherwise mat(sup,cus,tas) = 0. Therefore, the local formula in the mathematical model of step 102 is as follows:
[0124]
[0125] y: The sum of the times for each subtask does not exceed the maximum time for that task.
[0126]
[0127] Step 105: Solve the objective function for resolving resource conflicts in cloud manufacturing to obtain the optimized resource matching results:
[0128] Determine the fitness function fit(TT,BR) for resolving resource conflicts in cloud manufacturing;
[0129] Encode the cloud manufacturing services of the various sub-tasks and resource providers involved in conflict resolution into chromosome genes;
[0130] Randomly generate an initial population that satisfies the conflict resolution logic and rule constraints;
[0131] The next generation of the population is obtained by using roulette wheel selection; crossover and mutation operations are performed on the individuals in the initial population to obtain the optimal solution of the current population fitness function fit(TT,BR);
[0132] Repeat the crossover and mutation operations on the individuals in the initial population to obtain the next generation population until the maximum number of iterations is reached;
[0133] By comparing the optimal solutions of the fitness function fit(TT,BR) of each generation of the population, the chromosome with the largest fitness function fit(TT,BR) in the population is found, thus obtaining the optimal solution for resolving cloud manufacturing resource conflicts.
[0134] In step 105: the fitness function fit(TT, BR): according to the objective function P, the fitness function fit(TT, BR) is set as the reciprocal of the objective function P, that is, fit(TT, BR) = 1 / P. The larger the fitness value fit, the better the chromosome.
[0135] In step 105: the chromosome gene is encoded using integer encoding, with each chromosome representing the complete manufacturing sequence of the candidate task; the chromosome encoding length is: integer strings, before chromosome encoding Each gene location corresponds to a subtask, and all will receive the following results. The cloud manufacturing service is provided by the resource provider corresponding to each gene locus, where the total number of resource demanders is n, and the manufacturing subtasks of resource demander cus are decomposed into m.
[0136] In step 105, the step of randomly generating an initial population that satisfies the conflict resolution logic and rule constraints includes:
[0137] The genetic population is determined by generating a certain number of individuals as an initial population through random combination; this is based on an optimization request for resolving resource conflicts in a cloud manufacturing platform system.
[0138] The number of resource demanders is obtained and assigned a numerical identifier. Based on the definition of chromosome gene coding, the number of resource demanders is represented as cus1, cus2, ..., cus m ;
[0139] Obtain the task decomposition of resource requesters. Based on the definition of chromosome encoding, and ensuring that no subtasks are missing, the subtasks of resource requesters will be randomly assigned gene positions, thereby forming the first half of the chromosome with gene positions [1,n].
[0140] The number of resource requesters is obtained and assigned a numerical code for identification, which, according to the definition of chromosome coding, is represented as sup1, sup2, ..., supk ;
[0141] Obtain the matching results between subtasks and resource providers, and randomly configure the task sorting of subtasks among resource providers, so as to form the corresponding relationship between subtasks and resource providers. According to the definition of the chromosome encoding method, the correspondence between genes and genes is achieved.
[0142] In step 105, the roulette wheel selection method is used to obtain the next generation population, including the following steps:
[0143] Step 501: Calculate the fitness value f(i) of each chromosome, where i = 1, 2, 3,..., n; n is equal to the total number of chromosomes representing;
[0144] Step 502: Calculate the probability p(i) of each chromosome being inherited into the next generation population as p(i) =
[0145] f(i) / sum(f), where sum(f) represents the sum of the fitness values of all chromosomes;
[0146] Step 503: Calculate the cumulative probability of each chromosome where i = 1, 2,..., n;
[0147] Step 504: Randomly generate a pseudo-random number r uniformly distributed in the interval [0, 1];
[0148] Step 505: If r < q(1), then select chromosome 1, otherwise select chromosome k such that q(k - 1) < r ≤ q(k) holds;
[0149] Repeat steps 504 and 505 for a total of n times to generate the next generation population.
[0150] In step 105, the parameters of the crossover operation include: the crossover rate, and the parameters of the mutation operation include: the mutation rate; the crossover rate adopts a dynamically changing manner according to the population state, the crossover rate change range is 0.4 - 0.9, the mutation rate change range is 0.01 - 0.21, and the update period formula of the crossover rate and the mutation rate is k, where k is an integer:
[0151]
[0152] When the number of iterations satisfies the U(gen) condition (c = 1, 2, 3...), Q is an adjustment function; where:
[0153] U(gen) = c × k
[0154]
[0155] gen represents the total number of iterations. This represents the maximum fitness of chromosome i in generation t. This represents the maximum fitness value of chromosome i in the first generation. When the iteration number satisfies the condition U(gen) (c = 1, 2, 3...), it is used to update the values of Pc and Pm.
[0156] Pc(U(gen))=Pc(U(gen)-k)+5Q
[0157] Pm(U(gen))=Pm(U(gen)-k)+0.2Q
[0158]
[0159]
[0160] Where Pc represents the crossover probability and Pm represents the mutation probability;
[0161] After obtaining new crossover and mutation rates through periodic updates, crossover and mutation operations are performed.
[0162] The crossover operation uses the integer crossover method: two chromosomes are randomly selected from the population, and the individuals before the crossover is performed are removed. The genes are then randomly selected for crossover;
[0163] The mutation operation uses the exchange mutation method: two gene loci on a chromosome are randomly selected, and the genes on these two gene loci are exchanged to obtain a new chromosome.
[0164] The parameters for the crossover operation are: the crossover rate varies from 0.6 to 0.7.
[0165] The parameters for the crossover operation are: the mutation rate varies from 0.11 to 0.14.
[0166] The following example of a specific cloud manufacturing resource service will be used to further explain the practical application of the present invention.
[0167] Table 1. Task Options
[0168]
[0169] The simulation considers the possible operational scenarios of a manufacturing task during a given period: 10 resource providers offer manufacturing resources, and 6 resource requesters submit their respective requests, generating corresponding manufacturing tasks. Each manufacturing task can be decomposed into a maximum of 11 subtasks. The matching relationships and time costs between these subtasks are shown in the two tables below. Based on the assumed constraint pattern described above, a genetic algorithm is used to resolve the manufacturing resource conflict. In Table 1, subtask 1 for resource requester 1 can be provided by resource provider 5; subtask 4 for resource requester 3 can be provided by resource providers 4 or 7, and so on.
[0170] In the time cost of the time options, if there is no corresponding task, the time is zero. In Table 2, the time cost of subtask 1 of resource requester 1, when the manufacturing service is provided by resource provider 5, is 3 minutes; the time cost of subtask 4 of resource requester 3, when the manufacturing service can be provided by resource provider 4 or 7, is 3 minutes or 6 minutes respectively, and so on.
[0171] Table 2. Time Options
[0172]
[0173] Resource conflict resolution based on genetic algorithm: The problem model with the data in Tables 1 and 2 above as input is used to effectively verify the objective function.
[0174] Given the manufacturing time category and transportation time category, the total task time matched by the resource provider after resolution is calculated. The results are shown in Table 3:
[0175] Table 3. Calculation parameters and results of the time function
[0176]
[0177] The resource utilization efficiencies br(sup=i,i=1,…,10) of each resource provider are 96%, 95%, 93%, 92.5%, 96%, 98%, 95%, 96.5%, 97%, and 94%, respectively. Substituting these values into the mathematical model in step 102, we obtain the resource utilization benefit values, as shown in Table 4.
[0178] Table 4. Resource Utilization Efficiency Value
[0179] Resource provider (sup) 1 2 3 4 5 6 7 8 9 10 Efficiency Ratio (BR) 1.95 4.8 3.79 3.83 3.89 2.95 3.8 4.89 3.88 2.85
[0180] To obtain an optimized result for conflict resolution, based on the objective function in step 103, a genetic algorithm is used to solve and optimize one of the manufacturing resource conflict resolution schemes, as shown in the appendix. Figure 6As shown. Resource Provider 1: Starting from day 13, it will provide manufacturing services for sub-task 3 of Resource Requester 4, with a time period of 5 days; starting from day 50, it will provide manufacturing services for sub-task 9 of Resource Requester 6, with a time period of 10 days. The task allocation for other resource providers can be derived similarly. The optimization result provides a resource task allocation scheme. This example shows that the resource providers' manufacturing services will be completed within 80-90 days, ensuring service provision while meeting time cost requirements and improving the utilization efficiency of idle resources.
Claims
1. A resource conflict resolution method based on an improved genetic algorithm, characterized in that, The method comprises the following steps: Step 101: constructing a mathematical model based on time cost TT according to the number of resource providers and resource demanders and the time categories of manufacturing services, manufacturing time and transportation time: In the formula, cus represents the number of resource demanders, and the number of cus ranges from 1 to n; Sup represents the number of resource providers, and the number of sup ranges from 1 to l; Tas represents the number of subtasks, and the number of tas ranges from 1 to m; S represents the time category, and s has two categories, manufacturing time and transportation time; TT represents the manufacturing time for completing the manufacturing task in the least; Mat(sup, cus, tas) represents the matching of the resource provider sup to the subtask tas of the resource demander cus; T(sup, cus, tas, s) represents the time of the s-th time category of the resource provider sup to the subtask tas of the resource demander cus; T(sup, cus, tas, 1) = mt(sup, cus, tas); therefore, mt represents the manufacturing time of sup to cus subtask tas; T(sup, cus, tas, 2) = tt(sup, cus, tas); therefore, tt represents the transportation time of sup to cus subtask tas; Step 102: constructing a mathematical model based on resource use efficiency BR according to the decomposition of the task and subtask involved in conflict resolution and the difference of manufacturing capacity of the resource provider: In the formula, br(sup) represents the benefit conversion rate of the resource provider sup; Num(sup, cus) represents the selected task number of the resource provider sup to the resource demander cus; BR represents the resource use efficiency target function, which improves the resource use efficiency through reasonable subtask allocation to maximize the use of available resources; Step 103: constructing a target evaluation function P of cloud manufacturing resource conflict resolution according to the mathematical model based on time cost TT established in step 101 and the mathematical model based on resource use efficiency BR established in step 102, In the formula, TM(cus) represents the maximum time of each task of the resource provider cus; The weight coefficients ω1 and ω2 are the weight values of the time function and the benefit function respectively, and ω1 + ω2 = 1; Step 104: configuring constraint conditions according to the number of supply and demand sides and the task situation elements built by the target evaluation function P of cloud manufacturing resource conflict resolution: The constraint conditions are x and y; X: the matching resource provider has a unique property: In the formula, mat(sup, cus, tas) is equal to 1 or 0, that is, if mat(sup, cus, tas) = 1, it means that the resource provider sup matches the task tas of the resource demander cus, otherwise mat(sup, cus, tas) = 0, so there is a local formula in the mathematical model in step 102: Y: the sum of each time of each subtask does not exceed the maximum time of the task: Step 105: solving the target function of cloud manufacturing resource conflict resolution to obtain the optimization result of resource matching: Determine the fitness function fit(TT, BR) of the cloud manufacturing resource conflict resolution; Encode the cloud manufacturing service of each subtask and resource provider participating in the conflict resolution into a chromosome gene; Randomly generate an initial population meeting the conflict resolution logic and rule constraints; Obtain the next generation population by using the roulette selection method; perform the crossover operation and the mutation operation on the individuals of the initial population to obtain the optimal solution of the current population fitness function fit(TT, BR); Repeat the crossover operation and the mutation operation on the individuals of the initial population to obtain the next generation population until the maximum iteration number is reached; Compare the optimal solutions of the fitness function fit(TT, BR) of each generation population, find the chromosome with the maximum fitness function fit(TT, BR) in the population, and thus obtain the optimal solution of the cloud manufacturing resource conflict resolution.
2. The method of claim 1, wherein the method is characterized by: In the step 105, the fitness function fit(TT, BR) is set as the reciprocal of the objective function P, i.e., fit(TT, BR) = 1 / P. In the step 105, the fitness function fit(TT, BR) is set as the reciprocal of the objective function P, i.e., fit(TT, BR) = 1 / P.
3. The method of claim 1, wherein the method is characterized by: In the step 105, the step of randomly generating the initial population meeting the conflict resolution logic and rule constraints comprises the following steps: The coding mode of the chromosome gene is integer coding, each chromosome represents the whole manufacturing sequence of the to-be-selected task; the chromosome coding length is: integer string, before the chromosome coding corresponding to the sub task, and the cloud manufacturing service provided by the resource provider corresponding to the gene bit, wherein the total amount of resource demanders is n, and the manufacturing sub task of the resource demander cus is decomposed into m.
4. The method of claim 1, wherein the method is characterized by: Determine the genetic population, generate a certain number of individuals as the initial population by using the random combination method, and obtain the optimization request of the resource conflict resolution in the cloud manufacturing platform system; Obtain the task decomposition of the resource requester, and randomly set the gene position of the subtask of the resource requester to form the first half of the chromosome with the gene position [1, n] according to the definition of the chromosome encoding mode, so that the subtask is not lost; The number of resource demanders is acquired and is identified by a digital number, and according to the definition of the chromosome gene coding mode, the resource demander number is expressed as cus1, cus2, …, cus m ; In the step 105, the roulette selection method for obtaining the next generation population comprises the following steps: The number of resource demanders is acquired and is identified by assigning a digital number, and is defined according to the definition of the chromosome coding mode, that is, sup1, sup2, …, sup k ; The matching result of the subtask and the resource provider is obtained, and the subtask is randomly arranged in the task sequence of the resource provider, so as to form the corresponding relationship between the subtask and the resource provider, and the corresponding relationship between the gene and the gene is realized according to the definition of the chromosome coding mode.
5. The method of claim 1, wherein the method is characterized by: Step 501: Calculate the fitness value f(i) of each chromosome, where i = 1, 2, 3, …, n; n is equal to the total number of chromosomes; Step 502: Calculate the probability p(i) of each chromosome being inherited into the next generation population, where p(i) = f(i) / sum(f), and sum(f) represents the sum of the fitness values of all chromosomes; Step 504: Randomly generate a pseudo-random number r uniformly distributed in the interval [0, 1]; Step 503: Calculate the cumulative probability of each chromosome where i = 1, 2,..., n; Step 505: If r < q(1), select chromosome 1, otherwise select chromosome k, so that q(k-1) < r ≤ q(k) is established; Repeat steps 504 and 505 a total of n times to generate the next generation population. In the step 105, the parameters of the crossover operation include a crossover rate, and the parameters of the mutation operation include a mutation rate, the crossover rate ranges from 0.4 to 0.9, the mutation rate ranges from 0.01 to 0.21, and the update period formula of the crossover rate and the mutation rate is k, where k is an integer:
6. The method of claim 1, wherein the method is characterized by: When the iteration number meets the U(gen) condition (c = 1, 2, 3, …), Q is an adjustment function; wherein: U(gen) = c × k Pc(U(gen)) = Pc(U(gen)-k) + 5Q gen is the total number of iterations, represents the chromosome i fitness maximum of the tth generation, represents the chromosome i fitness maximum of the 1st generation, used to update the Pc and Pm values when the number of iterations meets the U(gen) condition (c = 1, 2, 3...): Pm(U(gen)) = Pm(U(gen)-k) + 0.2Q Wherein, Pc represents the cross probability, Pm represents the mutation probability; After the new cross rate and mutation rate are obtained through periodical updating, the cross and mutation operations are performed. The crossover operation adopts an integer crossover method: two chromosomes are randomly selected from the population, the genes before the crossover position of the two individuals are taken out, and then a crossover position is randomly selected for crossover. The mutation operation adopts the exchange mutation mode: two gene positions of the chromosome are randomly selected, and the genes at the two gene positions are exchanged, so as to obtain a new chromosome.
7. The method of claim 6, wherein the improved genetic algorithm is characterized by: The parameter of the cross operation: the cross rate changes in the range of 0.5-0.
8.
8. The method of claim 6, wherein the improved genetic algorithm is characterized by: The parameter of the cross operation: the mutation rate changes in the range of 0.1-0.15.
Citation Information
Patent Citations
Multi-objective optimization method of steelmaking-continuous casting production scheduling based on NSGA-II
CN105550771A
Dynamic environment-based fleet air defense resource scheduling optimization control method and system
CN108460509A