Construction plan adjustment method based on genetic algorithm and program product
Through the construction plan adjustment method based on genetic algorithm, the problem of high complexity of construction scheduling tasks in subway operations is solved, the construction plan is optimized, and construction efficiency and safety are improved.
Patent Information
- Application Number
- CN202411876364.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-28
AI Technical Summary
In subway operations, the maintenance window period is short and the road network environment is complex, resulting in high complexity of construction scheduling tasks and inability to effectively utilize resources, and manual adjustment is required to lead to unreasonableness.
The construction plan adjustment method based on genetic algorithm is adopted, and the individual with the highest fitness is obtained as the final construction plan by generating the initial population, defining the fitness function, and using the genetic algorithm iterative optimization.
The conflict detection, resource allocation and task adjustment during the scheduling process are optimized to ensure that the construction plan optimizes the use of resources under multiple constraints, reduces conflicts, and improves construction efficiency and safety.
Smart Images

Figure SMS_1 
Figure SMS_7 
Figure QLYQS_1
Abstract
Description
Technical Field
[0001] The present invention relates to the field of construction scheduling, and in particular to a construction plan adjustment method and a program product based on a genetic algorithm. Background Art
[0002] With the rapid increase in the operating mileage of urban rail transit in my country, the scale of passenger flow has increased dramatically, the road network structure has become more complicated, and the mainline operation time has been extended, which has made the maintenance window period continuously compressed. How to complete the construction scheduling tasks with large workload and high complexity under the complex road network environment and short maintenance window period has become an increasingly severe test faced by cities around the world.
[0003] The subway is a public transportation tool that relies on the stability of equipment and facilities to ensure safe operation. A large amount of inspection and maintenance work must be completed during the intervals when the subway stops operating at night. There are several obvious constraints in the organization of subway construction work: limited operation time, limited operation resources, and conflicts caused by different requirements for resources and operation conditions between construction operations. When different types of construction operations conflict due to operation conditions, manual adjustments are required for the conflicting construction operations, which often result in unreasonable adjustments and ineffective use of track area resources and construction operation resources. Summary of the invention
[0004] In view of the above problems, the present invention proposes the following technical solutions:
[0005] A construction plan adjustment method based on genetic algorithm comprises the following steps:
[0006] S1: reading the original construction plan and the allowable offset range of the operation time of each construction task, wherein the construction plan includes the operation time of each construction task;
[0007] S2: Generate an initial population of N individuals, each of which is a construction plan. Each individual is in the form of a vector of length n. The i-th element of each individual is randomly generated according to the offset range allowed for the operation time of the i-th construction task; the i-th element of the individual represents the operation time offset of the i-th construction task; i∈[1,n];
[0008] Where N is the size of the initial population;
[0009] n is the total number of construction tasks;
[0010] Define the fitness function to evaluate the fitness of individuals. For any individual s:
[0011]
[0012] in, represents the fitness of individual s;
[0013] represents the number of conflicting task pairs of individual s;
[0014] Represents the sum of the absolute values of each element of individual s;
[0015] Quantity weights for conflicting tasks;
[0016] is the total offset weight;
[0017] S3: Using genetic algorithms to obtain the individuals with the highest fitness, starting from the initial population, the next generation of sub-populations are iterated with the previous generation population as the parent population;
[0018] S4: After reaching the iteration exit condition, the individual with the highest fitness is output, and the construction plan corresponding to the individual is taken as the final result.
[0019] Preferably, the process of the parent population iterating the child population is:
[0020] From the parent population, a preset number of individuals are selected;
[0021] Perform crossover operation on the selected individuals to generate new individuals;
[0022] Perform mutation operation on k individuals among the selected individuals to generate new individuals; where k is a preset ratio.
[0023] Among the parent population and the generated new individuals, select the N individuals with the highest fitness as the sub-population of this iteration;
[0024] Preferably, the crossover operation includes single-point crossover and multi-point crossover.
[0025] Preferably, the value of k is 5-10%.
[0026] Preferably, when selecting a preset number of individuals from the parent population, the selection method includes roulette selection and tournament selection.
[0027] Preferably, the iteration exit condition includes that the number of iterations reaches a preset maximum number of iterations or that the individual with the highest fitness remains unchanged during a preset number of consecutive iterations.
[0028] Preferably, the value of each element of the individual is an integer multiple of 1 / 6.
[0029] Preferably, the value of N is 50.
[0030] The present invention also provides a computer program product, comprising a computer program, which implements the above method when executed by a processor.
[0031] Beneficial effects: The present invention optimizes conflict detection, resource allocation and task adjustment during the scheduling process to ensure that the construction plan optimizes resource utilization, reduces conflicts and improves construction efficiency and safety while satisfying multiple constraints. DETAILED DESCRIPTION
[0032] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] A construction plan adjustment method based on genetic algorithm comprises the following steps:
[0034] S1: reading the original construction plan and the allowable offset range of the operation time of each construction task, wherein the construction plan includes the operation time of each construction task;
[0035] In this embodiment, all construction tasks are shown in Table 1:
[0036] Table 1
[0037] Task number Working time Working area Whether to use a car Is it charged? Assignment Resources The range of offsets allowed for job time 1 1-1 8:00-9:00 ab Use a car yes Engineering Vehicle α [-2,2] 2 1-1 8:00-9:00 ab Use a car yes Engineering Vehicles β [-1,3] 3 1-1 8:00-9:00 ab Use a car no Engineering Vehicles [-2,4] 4 1-1 9:00-10:00 ab Use a car yes Engineering Vehicle α [-1,2] 5 1-1 9:00-10:00 cd No need for car yes none [-2,0] 6 1-1 9:00-10:00 ac No need for car no none [0,2] 7 1-1 8:30-9:30 ab Use a car yes Engineering Vehicle α [-4,3]
[0038] In the operation area field, we regard abcd as a section of the subway, where a, b, c, and d are four subway stations, and the three "-" in the middle are the track sections. The positive and negative offsets allowed for the operation time of construction task 1 [-2,2] indicate that the earliest allowed operation time for construction task 1 is 1-1 6:00-7:00, and the latest allowed operation time is 1-1 10:00-11:00.
[0039] Therefore, in the original construction plan, the operation time of each task is shown in Table 1;
[0040] S2: Generate an initial population of N individuals, each of which is a construction plan. Each individual is in the form of a vector of length n. The i-th element of each individual is randomly generated according to the offset range allowed for the operation time of the i-th construction task; the i-th element of the individual represents the operation time offset of the i-th construction task; i∈[1,n];
[0041] As a further implementation, for the convenience of calculation, when generating individuals, the time granularity is 10 minutes, that is, the value of each element of the individual is an integer multiple of 1 / 6;
[0042] Wherein, N is the size of the initial population, and in this embodiment, the value of N is 50;
[0043] n is the total number of construction tasks. As shown in Table 1, in this embodiment, the value of n is 7;
[0044] Define the fitness function to evaluate the fitness of individuals. For any individual s:
[0045]
[0046] in, represents the fitness of individual s;
[0047] represents the number of conflicting task pairs of individual s;
[0048] Represents the sum of the absolute values of each element of individual s;
[0049] Quantity weights for conflicting tasks;
[0050] is the total offset weight;
[0051] When adjusting the construction plan, we seek to minimize the number of conflicts and the total adjustment time, so we designed such a fitness function;
[0052] In the process of numerical calculation, the logic of whether a pair of construction tasks conflict is formulated according to the actual situation. The following example illustrates that in the tasks in this embodiment, the conditions for the conflict between the two tasks are:
[0053] (operation time overlaps and (operation area overlaps and whether the power is different) or the operation resources are the same) or (operation time interval is lower than the buffer time and the operation resources are the same);
[0054] For example, the generated individual examples: [0,-0.5,0.5,0,-1,-0.5,2], means that the construction time offsets of the 1st to 7th construction tasks are 0,-0.5,0.5,0,-1,-0.5,2 respectively; in this embodiment, the buffer time of the operation time interval is 30 minutes;
[0055] At this time, the operation time and operation area of construction task 1 and construction task 2 overlap, and they are the same whether they are energized or not, but the operation resources are different, so there is no conflict between the two.
[0056] The operation time of construction task 1 and construction task 3 overlap, the operation area overlaps, and whether they are energized is different, so there is a conflict. At this time, construction task 1 and construction task 3 belong to a conflicting task pair;
[0057] Construction Task 1 and Construction Task 4 have the same operation resources and no overlap in operation time, but the operation time interval is 0, which is lower than the buffer time. Therefore, there is also a conflict. Construction Task 1 and Construction Task 4 also belong to a conflicting task pair.
[0058] S3: Using genetic algorithms to obtain the individuals with the highest fitness, starting from the initial population, the next generation of sub-populations are iterated with the previous generation population as the parent population;
[0059] Specifically, the process of the parent population iterating the child population is:
[0060] Select a preset number of individuals from the parent population, using methods such as roulette wheel selection and tournament selection;
[0061] Perform crossover operation on selected individuals to generate new individuals; crossover operation includes single-point crossover and multi-point crossover;
[0062] For example, for the following two individuals, [1,1,2,2,0.5,1,0], [0,0,0.5,0.5,2,1,1], perform single-point crossover and randomly select a crossover position, such as the position of the third element, to obtain two new individuals [1,1,2,0.5,2,1,1], [0,0,0.5,2,0.5,1,0];
[0063] Perform mutation operation on k individuals among the selected individuals to generate new individuals; k is a preset ratio, and in this embodiment, the value of k is 5-10%; performing mutation operation on an individual means randomly regenerating the values of one or more random positions in an individual, which belongs to the conventional operation of genetic algorithm and will not be given as an example here;
[0064] Among the parent population and the generated new individuals, select the N individuals with the highest fitness as the sub-population of this iteration;
[0065] S4: After reaching the iteration exit condition, the individual with the highest fitness is output, and the construction plan corresponding to the individual is used as the final result. The iteration exit condition includes that the number of iterations reaches the preset maximum number of iterations or the individual with the highest fitness remains unchanged during the preset number of consecutive iterations.
[0066] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A construction plan adjustment method based on genetic algorithm, characterized in that: The following steps are involved: S1: reading the original construction plan and the allowable offset range of the operation time of each construction task, wherein the construction plan includes the operation time of each construction task; S2: Generate an initial population of N individuals, each of which is a construction plan. Each individual is in the form of a vector of length n. The i-th element of each individual is randomly generated according to the offset range allowed for the operation time of the i-th construction task; the i-th element of the individual represents the operation time offset of the i-th construction task; i∈[1,n]; Where N is the size of the initial population; n is the total number of construction tasks; Define the fitness function to evaluate the fitness of individuals. For any individual s: in, represents the fitness of individual s; represents the number of conflicting task pairs of individual s; Represents the sum of the absolute values of each element of individual s; weights for the number of conflicting tasks; is the total offset weight; S3: Using genetic algorithms to obtain the individuals with the highest fitness, starting from the initial population, the next generation of sub-populations are iterated with the previous generation population as the parent population; S4: After reaching the iteration exit condition, the individual with the highest fitness is output, and the construction plan corresponding to the individual is taken as the final result.
2. A construction plan adjustment method based on genetic algorithm according to claim 1, characterized in that: The process of the parent population iterating the child population is: From the parent population, a preset number of individuals are selected; Perform crossover operation on the selected individuals to generate new individuals; Perform mutation operations on k individuals among the selected individuals to generate new individuals; where k is a preset ratio; Among the parent population and the new individuals generated, select the N individuals with the highest fitness as the sub-population of this iteration.
3. A construction plan adjustment method based on genetic algorithm according to claim 2, characterized in that: Crossover operations include single-point crossover and multi-point crossover.
4. A construction plan adjustment method based on genetic algorithm according to claim 2, characterized in that: The value of k is 5-10%.
5. A construction plan adjustment method based on genetic algorithm according to claim 2, characterized in that: When selecting a preset number of individuals from a parent population, the selection methods include roulette selection and tournament selection.
6. A construction plan adjustment method based on genetic algorithm according to claim 1, characterized in that: The iteration exit condition includes that the number of iterations reaches the preset maximum number of iterations or the individual with the highest fitness remains unchanged during the preset number of consecutive iterations.
7. A construction plan adjustment method based on genetic algorithm according to claim 1, characterized in that: The value of each element of an individual is an integer multiple of 1 / 6.
8. The construction plan adjustment method based on genetic algorithm according to claim 1, characterized in that: The value of N is 50.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.