Resource-constrained project scheduling optimization method, system and device based on random key coding, medium and product

Through the resource-constrained project scheduling optimization method based on random key encoding, the genetic algorithm is used to search for optimization, and the problem of difficult to take into account the solution accuracy and computing speed in resource-constrained project scheduling in the existing technology is solved, and efficient and accurate scheduling is achieved optimization.

CN119417164APending Publication Date: 2025-02-11NORTH CHINA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411551279.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art is difficult to ensure both solution accuracy and computing rate in resource-constrained project scheduling, making it difficult to match in enterprise management of fast decision-making requirements.

Method used

The resource-constrained project scheduling optimization method based on random key encoding is adopted. Multiple coded individuals are generated through random key encoding to form initial populations, and the optimization is searched through the genetic algorithm of population evolution strategy to obtain the optimal scheduling scheme.

Benefits of technology

It improves the efficiency and accuracy of optimized scheduling of resource-constrained projects, ensures that the optimal scheduling plan can be quickly positioned and meets the needs of rapid decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005115240900000131
    Figure BDA0005115240900000131
  • Figure HDA0005115240930000011
    Figure HDA0005115240930000011
  • Figure HDA0005115240930000021
    Figure HDA0005115240930000021
Patent Text Reader

Abstract

The invention discloses a resource-constrained project scheduling optimization method, system and device based on random key coding, a medium and a product, and relates to the field of resource-constrained project scheduling, and the method comprises the steps: obtaining all activities in a resource-constrained project; coding each activity by adopting a random key coding mode to generate a plurality of coding individuals, and forming an initial population by the plurality of coding individuals; determining a scheduling order of each coding individual, and sorting each coding individual according to the scheduling order to obtain sorted coding individuals; decoding the sequenced coding individuals to obtain a scheduling scheme; judging whether the scheduling scheme is an optimal scheduling scheme or not according to a preset condition; if not, optimizing the scheduling scheme based on a genetic algorithm of a population evolution strategy to obtain an optimal scheduling scheme; and scheduling optimization is carried out on the resource-constrained project according to the optimal scheduling scheme. According to the invention, the efficiency and precision of resource-constrained project optimization scheduling can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of resource-constrained project scheduling, and in particular to a resource-constrained project scheduling optimization method and system based on random key coding. Background Art

[0002] The resource constrained project scheduling problem (RCPSP) is a combinatorial optimization problem that is common in the manufacturing and construction industries. It is a problem that aims to achieve the shortest project duration through reasonable resource allocation. This type of optimization decision-making problem is faced by mass production enterprises, automobile manufacturing, shipbuilding, aircraft manufacturing, energy, and construction industries. For enterprises, resources are always limited. The purpose of carrying out production activities is to obtain the maximum utilization efficiency of resources through effective resource organization and allocation, and then achieve the project duration or economic benefit goals. RCPSP obtains the shortest schedule by optimizing the start and completion time of each activity based on the unit time limit of renewable resources such as labor and equipment. It is a nondeterministic polynomial time hard (NP-hard) problem and is very difficult to solve.

[0003] At present, the methods for solving resource-constrained project scheduling optimization problems include heuristic algorithms, branch-and-bound methods, and meta-heuristic algorithms. However, traditional heuristic algorithms based on certain priority rules (such as shortest duration, earliest start time, earliest completion time, etc.) have the fastest computing speed, but cannot obtain the optimal solution to the problem; at the same time, precise algorithms based on branch-and-bound methods are very time-consuming to compute, and are difficult to meet the requirements of rapid decision-making in the ever-changing enterprise management. Therefore, designing an algorithm that can ensure both solution accuracy and computing speed is of great significance to engineering practice, ensuring that the shortest total construction period schedule is obtained and that various resources of the project are always configured in the most effective way. Summary of the invention

[0004] The purpose of this application is to provide a resource-constrained project scheduling optimization method, system, device, medium and product based on random key encoding, which can improve the efficiency and accuracy of resource-constrained project optimization scheduling.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a resource-constrained project scheduling optimization method based on random key encoding, comprising:

[0007] Capture activities in resource-constrained projects;

[0008] The various activities are encoded by random key encoding to generate a plurality of encoded individuals, and the plurality of encoded individuals form an initial population; the encoded individuals include the weights of the various activities;

[0009] Determine a scheduling order for each coding individual, and sort each coding individual according to the scheduling order to obtain sorted coding individuals;

[0010] Decoding the sorted coded individuals to obtain a scheduling plan; the scheduling plan includes: activity start time, activity completion time and total duration of the resource-constrained project; each scheduling plan corresponds to a decoded coded individual, and multiple decoded coded individuals form a first population;

[0011] Determine whether a preset condition is met, wherein the preset condition is whether a preset time or a preset scheduling plan quantity is reached;

[0012] If so, the scheduling scheme with the shortest total construction period of the source-constrained project is determined to be the optimal scheduling scheme;

[0013] If not, the scheduling scheme is optimized based on a genetic algorithm of a population evolution strategy to obtain an optimal scheduling scheme;

[0014] The resource-constrained project is scheduled and optimized according to the optimal scheduling solution.

[0015] Optionally, the various activities include: first and last virtual activities and intermediate activities between the first and last virtual activities; the first and last virtual activities include: first activity and last activity; the first and last virtual activities do not occupy time and resources of resource-constrained projects; the intermediate activities occupy time and resources of resource-constrained projects.

[0016] Optionally, the activities are encoded by random key encoding to generate multiple coded individuals, including:

[0017] The intermediate activity is encoded with a random number between (0, 1) by using a random key encoding method to obtain a weight of the intermediate activity;

[0018] The weight of the first activity and the weight of the last activity are encoded as 0 and 1 respectively by using an assignment encoding method;

[0019] The coded individuals are generated based on the weights of the first and last virtual activities and the weights of the middle activities.

[0020] Optionally, determining a scheduling order for each coding individual, and sorting each coding individual according to the scheduling order to obtain sorted coding individuals specifically includes:

[0021] The weights of the activities are sorted by the principle of minimum priority to determine the scheduling order of the coded individuals;

[0022] Each coding individual is sorted according to the scheduling order to obtain sorted coding individuals.

[0023] Optionally, the sorted coded individuals are decoded to obtain a scheduling scheme, which specifically includes:

[0024] According to the occupied time and resources of each activity, with the goal of minimizing the total duration of the resource-constrained project, the sorted coded individuals are subjected to a first forward scheduling decoding, a reverse scheduling decoding and a second forward scheduling decoding to obtain a scheduling plan.

[0025] Optionally, a genetic algorithm based on a population evolution strategy is used to optimize the scheduling scheme to obtain an optimal scheduling scheme, which includes:

[0026] Performing random key coding adjustment on the first population to obtain adjusted coding individuals and form a second population;

[0027] Sorting and evolving the second population to obtain a third population; the evolution includes selection, crossover and mutation;

[0028] The coded individuals in the third population are sorted and decoded to obtain an optimal scheduling solution.

[0029] In a second aspect, the present application provides a resource-constrained project scheduling optimization system based on random key coding, which is used to implement any of the resource-constrained project scheduling optimization methods based on random key coding described above, and the resource-constrained project scheduling optimization system based on random key coding includes:

[0030] The acquisition module is used to obtain various activities in resource-constrained projects;

[0031] A random key encoding module, which uses a random key encoding method to encode the various activities, generates a plurality of encoding individuals, and the plurality of encoding individuals form an initial population; the encoding individuals include the weights of the various activities;

[0032] A scheduling order sorting module is used to determine the scheduling order of each coding individual, and sort each coding individual according to the scheduling order to obtain sorted coding individuals;

[0033] A decoding module is used to decode the sorted coded individuals to obtain a scheduling plan; the scheduling plan includes: activity start time, activity completion time and total duration of the resource-constrained project; each scheduling plan corresponds to a decoded coded individual, and multiple decoded coded individuals form a first population;

[0034] A judgment module, used to judge whether a preset condition is met;

[0035] An output module is used to determine that the scheduling scheme with the shortest total construction period of the source-constrained project is the optimal scheduling scheme; the preset condition is whether the preset time or the preset number of scheduling schemes is reached;

[0036] An optimization module, used to optimize the scheduling scheme based on a genetic algorithm of a population evolution strategy to obtain an optimal scheduling scheme;

[0037] The optimization module is used to optimize the scheduling of resource-constrained projects according to the optimal scheduling solution.

[0038] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned resource-constrained project scheduling optimization methods based on random key encoding.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned resource-constrained project scheduling optimization methods based on random key encoding.

[0040] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned resource-constrained project scheduling optimization methods based on random key encoding.

[0041] According to the specific embodiments provided in this application, this application has the following technical effects:

[0042] (1) This application uses random key coding to encode various activities, so that the weights of the coded individuals can be quickly adjusted, expanding the search space, thereby effectively improving the global search capability and ensuring that the optimal scheduling plan can be quickly located.

[0043] (2) The present application decodes the sorted coded individuals so that the scheduling order of the decoded coded individuals can be adjusted, and the weight combination of the original code is used to reduce the invalid search space, thereby ensuring that the method of the present application efficiently searches the effective space and improving the search efficiency of the optimal scheduling of resource-constrained projects.

[0044] (3) This application uses a genetic algorithm based on a population evolution strategy to optimize the scheduling plan, and can continuously iterate to obtain the optimal scheduling plan, thereby improving the accuracy of optimal scheduling of resource-constrained projects. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 1 This is an application environment diagram of a resource-constrained project scheduling optimization method based on random key encoding in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of a process flow of a resource-constrained project scheduling optimization method based on random key coding provided in an embodiment of the present application;

[0048] Figure 3 A schematic diagram of a project single code network provided for an exemplary embodiment of the present application;

[0049] Figure 4 A schematic diagram of a random number encoding individual provided in an embodiment of the present application;

[0050] Figure 5 A schematic diagram of forward scheduling decoding provided by an embodiment of the present application;

[0051] Figure 6 A schematic diagram of reverse scheduling decoding provided in an embodiment of the present application;

[0052] Figure 7 A schematic diagram of forward scheduling decoding provided by an embodiment of the present application;

[0053] Figure 8 A schematic diagram of a coding adjustment method provided in an embodiment of the present application;

[0054] Fig. 9 A schematic diagram of an evolution strategy provided in an embodiment of the present application;

[0055] Fig.10 A weight crossover diagram provided for an embodiment of the present application;

[0056] Fig.11 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0059] The resource-constrained project scheduling optimization method based on random key encoding provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the resource-constrained project to be solved to the server 104. After the server 104 receives the resource-constrained project to be solved, for the resource-constrained project to be solved, the server 104 solves the resource-constrained project to be solved based on the random key coding resource-constrained project scheduling optimization method to obtain the optimal scheduling solution. The server 104 can feedback the obtained optimal scheduling solution to the terminal 102. In addition, in some embodiments, the resource-constrained project scheduling optimization method based on random key coding can also be implemented separately by the server 104 or the terminal 102, such as the terminal 102 can directly solve the resource-constrained project to be solved, or the server 104 can obtain the resource-constrained project to be solved from the data storage system and solve the resource-constrained project to be solved.

[0060] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0061] In an exemplary embodiment, Figure 2 As shown, a resource-constrained project scheduling optimization method based on random key encoding is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0062] Step 1: Get the activities in the resource-constrained project.

[0063] Step 2: Use random key coding to encode each activity and generate multiple coded individuals. Multiple coded individuals form an initial population; the coded individuals include the weight of each activity.

[0064] Step 3: Determine the scheduling order of each coding individual, and sort each coding individual according to the scheduling order to obtain sorted coding individuals.

[0065] Step 4: Decode the sorted coded individuals to obtain a scheduling plan; the scheduling plan includes: activity start time, activity completion time and total duration of resource-constrained projects; each scheduling plan corresponds to a decoded coded individual, and multiple decoded coded individuals form the first population.

[0066] Step 5: Determine whether the preset conditions are met, the preset conditions being whether the preset time or the preset number of scheduling plans is reached.

[0067] Step 6: If yes, determine the scheduling scheme with the shortest total construction period of the source-constrained project as the optimal scheduling scheme.

[0068] Step 7: If not, the scheduling scheme is optimized based on a genetic algorithm using a population evolution strategy to obtain the optimal scheduling scheme.

[0069] Step 8: Optimize the scheduling of resource-constrained projects based on the optimal scheduling plan.

[0070] In a specific embodiment, the various activities obtained in step 1 include: the first and last virtual activities and the intermediate activities between the first and last virtual activities; the first and last virtual activities include: the first activity and the last activity. Since the first and last virtual activities only represent the beginning and end of the project, they do not occupy the time and resources of the resource-constrained project; the intermediate activities occupy the time and resources of the resource-constrained project.

[0071] In a specific embodiment, step 2 specifically includes:

[0072] Step 21: Use random key encoding to encode the intermediate activities with random numbers between (0,1) to obtain the weights of the intermediate activities.

[0073] A random key (random weight, a random floating point decimal between (0, 1)) is used as an encoding method. For the intermediate activities between the first and last virtual activities, a random number between (0, 1) is generated as the weight to obtain the weight of the intermediate activity.

[0074] Step 22: Use assignment coding to encode the weight of the first activity and the weight of the last activity as 0 and 1 respectively.

[0075] Step 23: Generate coded individuals based on the weights of the first and last virtual activities and the weights of the middle activities.

[0076] For a project with J activities, the code length is J, Figure 3 Take the project shown in the figure as an example. This project is represented by a single-code network diagram. Nodes represent activities, and arrows represent the logical relationship between activities. For example, there is an arrow between activity 3 and activity 6, starting from 3 and ending at 6, indicating that activity 6 can only be started after activity 3 is completed. Activities 1 and 11 are virtual activities, which only represent the start and end of the project. R1=2 means that the number of renewable resources 1 that can be provided by the project every day (can also be expressed as a unit of time) is 2, and R j1 represents the quantity of renewable resource 1 required by activity j, d j represents the duration of activity j. Figure 4 The coding individual is shown, where the weight of activity 1 is 0.00, the weight of activity 2 is 0.54, the weight of activity 3 is 0.02, the weight of activity 4 is 0.76, the weight of activity 5 is 0.15, the weight of activity 6 is 0.19, the weight of activity 7 is 0.48, the weight of activity 8 is 0.90, the weight of activity 9 is 0.85, the weight of activity 10 is 0.92, and the weight of activity 11 is 1.00. According to the coding method, a certain number of coding individuals (such as 50, 100, 200...) are generated to form an initial population.

[0077] In a specific embodiment, step 3 specifically includes:

[0078] Step 31: Use the minimum priority principle to sort the weights of various activities and determine the scheduling order of the coded individuals.

[0079] Step 32: Sort each coded individual according to the scheduling order to obtain sorted coded individuals.

[0080] Since the random number encoding method is used, the activities that can be started are determined according to the size of the random number. For example, the activity with a small random number is selected first (of course, the principle of priority for the activity with a large random weight can also be selected, and the result is the same). Specifically, for Figure 3 Project activities shown:

[0081] 1. First, schedule the start activity 1, update the scheduled activity set S = {1}, and then determine the selectable activity set G = {2, 3, 4, 5}.

[0082] 2. The random numbers corresponding to the activities in G are 0.54, 0.02, 0.76 and 0.15 respectively. Select the smallest number 0.02 corresponding to activity 3, and update the set of scheduled activities S = {1, 3}. After arranging activity 3, activity 6 can start, and update G = {2, 4, 5, 6}.

[0083] 3. The random numbers corresponding to the activities in G are 0.54, 0.76, 0.15, and 0.19. Select the smallest number 0.15, which corresponds to activity 5, and update S = {1, 3, 5}. After arranging activity 5, activity 9 can start, and update G = {2, 4, 6, 9}.

[0084] 4. The random numbers corresponding to the activities in G are 0.54, 0.76, 0.19, and 0.85. The smallest number 0.19 corresponds to activity 6, and S is updated to {1, 3, 5, 6}. Since activity 6 is scheduled but activity 7 is not completed yet, activity 8 cannot be a candidate activity. G is updated to {2, 4, 9}.

[0085] 5. The random numbers corresponding to the activities in G are 0.54, 0.76, and 0.85 respectively. Select the smallest number 0.54, which corresponds to activity 2, and update S = {1, 3, 5, 6, 2}. After activity 2 ends, activity 10 can start, and update G = {4, 9, 10}.

[0086] 6. The random numbers corresponding to the activities in G are 0.76, 0.85, and 0.90 respectively. Select the smallest number 0.76, which corresponds to activity 4, and update S = {1, 3, 5, 6, 2, 4}. After activity 4 ends, activity 7 can start, and update G = {7, 9, 10}.

[0087] 7. The random numbers corresponding to the activities in G are 0.48, 0.85, and 0.90 respectively. Select the smallest number 0.48, which corresponds to activity 7, and update S = {1, 3, 5, 6, 2, 4, 7}. After activities 6 and 7 are completed, activity 8 can start, and update G = {8, 9, 10}.

[0088] 8. The random numbers corresponding to the activities in G are 0.92, 0.85, and 0.90 respectively. Select the smallest number 0.85, which corresponds to activity 9, and update S = {1, 3, 5, 6, 2, 4, 7, 9}. After activity 9 ends, activity 11 cannot start because activities 8 and 10 have not ended yet. Update G = {8, 10}.

[0089] 9. The random numbers corresponding to the activities in G are 0.90 and 0.92 respectively. Select the smallest activity 8 corresponding to 0.90, update S = {1, 3, 5, 6, 2, 4, 7, 9, 8}, and update G = {10}.

[0090] 10. Select activity 10, update S = {1, 3, 5, 6, 2, 4, 7, 9, 8, 10}. After activities 8, 9, and 10 are completed, activity 11 can be scheduled, and update G = {11}.

[0091] 11. Select activity 11. Update S = {1, 3, 5, 6, 2, 4, 7, 9, 8, 10, 11}, update G = {}.

[0092] Therefore, the scheduling order determined by the coding scheme is S = {1, 3, 5, 6, 2, 4, 7, 9, 8, 10, 11}. Obviously, one scheduling order can correspond to multiple coding schemes with random weights.

[0093] In a specific embodiment, step 4 specifically includes: according to the occupied time and resources of each activity, with the goal of minimizing the total construction period of the resource-constrained project, the sorted coded individuals are subjected to a first forward scheduling decoding, a reverse scheduling decoding and a second forward scheduling decoding to obtain a scheduling plan.

[0094] Specifically, for each code, a decoding method is needed to convert it into a corresponding schedule to obtain the start and completion time of each activity and the duration of the entire project. When the scheduling order is determined, various resources are allocated according to the limited resources per unit time, and the start and completion time of each activity is determined accordingly. For a project with J activities, resource allocation includes J stages, such as Figure 3 The schematic project includes 11 stages, and 1 activity is scheduled for each stage. For {1, 3, 5, 6, 2, 4, 7, 9, 8, 10, 11}, schedule activity 3 first. Then, on the 1st and 2nd days of the time period, the remaining daily resource quantity is 1 unit / day. Then schedule activity 5. Since the number of resources required for activity 5 is 1, it can be scheduled on the 1st day. At this time, on the 1st day of the time period, the remaining daily resource quantity is 0 unit / day, and on the 2nd day of the time period, the remaining daily resource quantity is 1 unit / day. Then schedule activity 6. According to the above scheduling order, schedule other activities in turn, thereby realizing forward scheduling decoding, such as Figure 5 As shown, a forward scheduling decoding scheduling scheme is finally formed, and the total construction period of the scheduling scheme is 18 days.

[0095] according to Figure 5 The forward scheduling decoding schedule shown in FIG. 1 is sorted from largest to smallest according to the completion time of each activity, and a new order S = {11, 10, 8, 9, 7, 2, 4, 6, 3, 5, 1} is obtained. Starting from the 18th day, each activity is arranged from the back to the front in the same principle, thereby realizing the reverse scheduling decoding, as shown in FIG. Figure 6 As shown, a reverse scheduling decoding scheduling scheme is finally formed, and the total construction period of the scheduling scheme is 16 days.

[0096] according to Figure 6 The scheduling plan of the reverse scheduling decoding shown in FIG. is sorted from small to large according to the start time to obtain a new order S = {1, 3, 6, 4, 2, 7, 8, 5, 10, 9, 11}, and the activities are arranged from front to back in sequence. The principle is the same as above, thereby realizing the forward scheduling decoding, such as Figure 7As shown in the figure, the forward scheduling decoding scheduling scheme is finally formed, and the total construction period of this scheduling scheme is 15 days. Figure 5 , Figure 6 , Figure 7 Repeated execution of forward, reverse, and forward decoding can continuously reduce project duration. Figure 5 , Figure 6 , Figure 7 R1=2 here means that the number of renewable resources 1 that the project can provide every day (can also be expressed as unit time) is 2, and R1=1 means that the number of renewable resources 1 that the project can provide every day (can also be expressed as unit time) is 1.

[0097] In a specific embodiment, step 7 specifically includes:

[0098] Step 71: Perform random key coding adjustment on the first population to obtain adjusted coding individuals and form a second population.

[0099] like Figure 8 As shown, the coding individuals in the first population are coded and adjusted. For the coding individual A of the first population, a coding individual B is randomly selected from the initial population, and the coding individual B is sorted from small to large according to the random weight, and then matched with the scheduling order of the coding individual A to obtain the new code of the coding individual A, that is: the activity 3 of the coding individual A starts the second time, and the corresponding weight is 0.03, then 0.03 is placed in the third position of the new code, indicating that the adjusted weight of activity 3 is 0.03; activity 6 starts the third time, and the corresponding weight is 0.15, then 0.15 is placed in the sixth position, and so on. The corresponding relationship is marked with the same color. Multiple newly coded coding individuals form the second population.

[0100] The principle of coding adjustment is that one scheduling order can correspond to countless random key-based coding schemes in principle. The purpose of adjustment is to: 1) ensure that the scheduling order of any coding individual A is always consistent with the scheduling order obtained by new coding and decoding; 2) enhance the diversity of elite coding individuals (top part) and reduce the expansion of coding space.

[0101] Step 72: Sort and evolve the second population to obtain a third population; evolution includes selection, crossover and mutation.

[0102] For example, after the coding is adjusted, all coded individuals in the second population are sorted according to the construction period, and the positions of the coded individuals in the population are adjusted to obtain the sorted population.

[0103] In order to avoid a single algorithm from falling into local convergence, an algorithm based on population evolution strategy is adopted. Drawing on the optimization strategy of genetic algorithm, a crossover global optimization strategy is adopted for the sorted population to speed up the global search rate of the algorithm, and a gene mutation strategy is adopted to improve the local search efficiency of the algorithm. Considering that excessive mutation will cause the algorithm to fall into random search, which is not conducive to problem solving and cannot achieve twice the result with half the effort, a mutation strategy based on normal distribution is designed to limit the random number of its mutation to a certain area near the original value, which can not only improve the search rate, but also avoid falling into random search, resulting in reduced search efficiency.

[0104] like Fig. 9 As shown in the figure, the contemporary population is the sorted population. For the sorted population, select the coding individuals with the smallest duration as the top part as the optimal coding individuals of the contemporary population. Top is set to 0.1. For example, for a population containing 100 coding individuals, the first 10 coding individuals with the smallest duration values ​​are selected from the 100 coding individuals to obtain the elite coding individual set.

[0105] like Fig.10 As shown, the weights of the encoded individuals are interchanged by random crossover, where I F The coded individuals are randomly selected from the top part of the population, and I M P from the middle part of the population C For each activity, when the random number generated by the algorithm is greater than the pre-set crossover probability, the crossover probability is set to 0.7, and the crossover probability is set to 0.7. M Select a value from I when it is less than the crossover probability F Select a value from the list to form a new coded individual I D Through multiple crossovers, a set of coded individuals after crossover is obtained.

[0106] The pre-set mutation probability determines whether a gene in the code mutates. For each activity, if the random value generated by the algorithm is less than the pre-set mutation probability, then the mutation occurs, otherwise no mutation occurs. The mutation probability is set to 0.1. Through multiple mutations, a set of mutated coding individuals is obtained.

[0107] 1-P for the middle part of the population CThe coded individuals in mutate. When a mutation occurs, considering that it is just a simple random number generated between (0,1), it is highly likely that the evolution of the population will tend to be random, and it is difficult to obtain the optimal solution. Therefore, this application uses a normal distribution to determine the updated value, so that the variation range is controlled in an interval close to the original value, to achieve local optimization, and to avoid stagnation of the search due to large changes. According to the theory of normal distribution, the probability that the variable value falls within μ±σ is 68.27%, the probability of μ±2σ is 95.45%, and the probability of μ±3σ is 99.73%. For example, the mutated gene value (i.e., the weight of the activity) is 0.65, and the standard deviation σ=0.05, then according to the confidence interval of the normal distribution. The probability that the generated random number falls within 0.65±0.05 is 68.27%, the probability within 0.65±2×0.05 is 95.45%, and the probability within 0.65±3×0.05 is 99.73%, that is, it falls within the range of 0.50-0.80, rather than a position far from 0.65. The normal distribution equation is:

[0108]

[0109] Among them, x is the weight in the encoding; σ is the standard deviation; μ is the mutated gene value.

[0110] The coded individuals in the Bot in the population are re-coded again using a random key method to obtain a set of re-coded coded individuals.

[0111] The elite coding individual set, the coding individual set after crossover, the coding individual set after mutation and the coding individual set after recoding are recombined to obtain the third population.

[0112] Step 73: Sort and decode the coded individuals in the third population to obtain the optimal scheduling solution. First, determine the scheduling order of each coded individual in the third population, and sort each coded individual according to the scheduling order to obtain sorted coded individuals; then, decode the sorted coded individuals to obtain the optimal scheduling solution.

[0113] This application has the following technical effects:

[0114] (1) This method uses a random key crossover method, which is fast and continuously combines random weights to achieve global search and expand the search space.

[0115] (2) After executing forward and reverse decoding, the original code is adjusted according to the newly obtained scheduling order, that is, each gene position in the original code is adjusted according to the new scheduling order. The purpose is to use the weight combination of the original code to effectively reduce the search space, avoid expanding the invalid search space, promote the effective local search of each coding individual, and continuously iterate to obtain the optimal scheduling plan.

[0116] (3) Based on the crossover operation of random weights, the weight crossover can construct multiple combinations and quickly realize effective global search.

[0117] (4) Based on the mutation operation of normal distribution, we can avoid the stagnation of search caused by large fluctuations in weight values, thereby achieving effective local search.

[0118] (5) Random key crossover mutation realizes global search, mutation operation realizes local search, and the coding arrangement is readjusted after decoding. According to the scheduling order corresponding to each coding individual in the population, the coding individuals of the previous generation population are randomly selected to fill the sorted coding individuals, further reducing the search space and effectively increasing the diversity of elite coding individuals. The above procedures ensure the operation efficiency and solution accuracy.

[0119] Based on the same inventive concept, the embodiment of the present application also provides a resource-constrained project scheduling optimization system for implementing the resource-constrained project scheduling optimization method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more resource-constrained project scheduling optimization system embodiments provided below can refer to the limitations of the resource-constrained project scheduling optimization method above, and will not be repeated here.

[0120] In an exemplary embodiment, a resource-constrained project scheduling optimization system based on random key coding is provided, including:

[0121] The acquisition module is used to obtain various activities in resource-constrained projects.

[0122] The random key encoding module encodes the various activities by random key encoding to generate a plurality of encoding individuals, and the plurality of encoding individuals form an initial population; the encoding individuals include the weights of the various activities.

[0123] The scheduling order sorting module is used to determine the scheduling order of each coding individual, and sort each coding individual according to the scheduling order to obtain sorted coding individuals.

[0124] A decoding module is used to decode the sorted coded individuals to obtain a scheduling plan; the scheduling plan includes: activity start time, activity completion time and total duration of resource-constrained projects; each scheduling plan corresponds to a decoded coded individual, and multiple decoded coded individuals form a first population.

[0125] The judgment module is used to judge whether the preset conditions are met.

[0126] The output module is used to determine that the scheduling scheme with the shortest total construction period of the source-constrained project is the optimal scheduling scheme; the preset condition is whether the preset time or the preset number of scheduling schemes is reached.

[0127] The optimization module is used to optimize the scheduling scheme based on a genetic algorithm of a population evolution strategy to obtain the optimal scheduling scheme.

[0128] The optimization module is used to optimize the scheduling of resource-constrained projects according to the optimal scheduling solution.

[0129] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store resource-constrained project scheduling plans. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource-constrained project scheduling optimization method based on random key encoding is implemented.

[0130] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0131] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0132] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0134] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0135] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0137] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A resource-constrained project scheduling optimization method based on random key encoding, characterized in that: The resource-constrained project scheduling optimization method based on random key encoding includes: Capture activities in resource-constrained projects; The various activities are encoded by random key encoding to generate a plurality of encoded individuals, and the plurality of encoded individuals form an initial population; the encoded individuals include the weights of the various activities; Determine a scheduling order for each coding individual, and sort each coding individual according to the scheduling order to obtain sorted coding individuals; Decoding the sorted coded individuals to obtain a scheduling plan; the scheduling plan includes: activity start time, activity completion time and total duration of the resource-constrained project; each scheduling plan corresponds to a decoded coded individual, and multiple decoded coded individuals form a first population; Determine whether a preset condition is met, wherein the preset condition is whether a preset time or a preset scheduling plan quantity is reached; If so, the scheduling scheme with the shortest total construction period of the source-constrained project is determined to be the optimal scheduling scheme; If not, the scheduling scheme is optimized based on a genetic algorithm of a population evolution strategy to obtain an optimal scheduling scheme; The resource-constrained project is scheduled and optimized according to the optimal scheduling solution.

2. The resource-constrained project scheduling optimization method based on random key encoding according to claim 1 is characterized in that: The various activities include: the first and last virtual activities and the intermediate activities between the first and last virtual activities; the first and last virtual activities include: the first activity and the last activity; the first and last virtual activities do not occupy the time and resources of the resource-constrained project; the intermediate activities occupy the time and resources of the resource-constrained project.

3. The resource-constrained project scheduling optimization method based on random key encoding according to claim 2 is characterized in that: The activities are coded by random key coding to generate multiple coded individuals, including: The intermediate activity is encoded with a random number between (0, 1) by using a random key encoding method to obtain a weight of the intermediate activity; The weight of the first activity and the weight of the last activity are encoded as 0 and 1 respectively by using an assignment encoding method; The coded individuals are generated based on the weights of the first and last virtual activities and the weights of the middle activities.

4. The resource-constrained project scheduling optimization method based on random key encoding according to claim 1 is characterized in that: Determining the scheduling order of each coding individual, and sorting each coding individual according to the scheduling order to obtain sorted coding individuals, specifically includes: The weights of the activities are sorted by the principle of minimum priority to determine the scheduling order of the coded individuals; Each coding individual is sorted according to the scheduling order to obtain sorted coding individuals.

5. The resource-constrained project scheduling optimization method based on random key encoding according to claim 2 is characterized in that: Decode the sorted coded individuals to obtain the scheduling plan, which includes: According to the occupied time and resources of each activity, with the goal of minimizing the total duration of the resource-constrained project, the sorted coded individuals are subjected to a first forward scheduling decoding, a reverse scheduling decoding and a second forward scheduling decoding to obtain a scheduling plan.

6. The resource-constrained project scheduling optimization method based on random key encoding according to claim 1 is characterized in that: The scheduling scheme is optimized by a genetic algorithm based on a population evolution strategy to obtain an optimal scheduling scheme, which includes: Performing random key coding adjustment on the first population to obtain adjusted coding individuals and form a second population; Sorting and evolving the second population to obtain a third population; the evolution includes selection, crossover and mutation; The coded individuals in the third population are sorted and decoded to obtain an optimal scheduling solution.

7. A resource-constrained project scheduling optimization system based on random key coding, characterized in that: The resource-constrained project scheduling optimization method based on random key coding as described in any one of claims 1 to 6, wherein the resource-constrained project scheduling optimization system based on random key coding comprises: The acquisition module is used to obtain various activities in resource-constrained projects; A random key encoding module, which uses a random key encoding method to encode the various activities, generates a plurality of encoding individuals, and the plurality of encoding individuals form an initial population; the encoding individuals include the weights of the various activities; A scheduling order sorting module is used to determine the scheduling order of each coding individual, and sort each coding individual according to the scheduling order to obtain sorted coding individuals; A decoding module is used to decode the sorted coded individuals to obtain a scheduling plan; the scheduling plan includes: activity start time, activity completion time and total duration of the resource-constrained project; each scheduling plan corresponds to a decoded coded individual, and multiple decoded coded individuals form a first population; A judgment module, used to judge whether a preset condition is met; An output module is used to determine that the scheduling scheme with the shortest total construction period of the source-constrained project is the optimal scheduling scheme; the preset condition is whether the preset time or the preset number of scheduling schemes is reached; An optimization module, used to optimize the scheduling scheme based on a genetic algorithm of a population evolution strategy to obtain an optimal scheduling scheme; The optimization module is used to optimize the scheduling of resource-constrained projects according to the optimal scheduling solution.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the resource-constrained project scheduling optimization method based on random key encoding as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the resource-constrained project scheduling optimization method based on random key encoding described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the resource-constrained project scheduling optimization method based on random key encoding described in any one of claims 1 to 6 is implemented.