A stochastic scheduling method for ship maintenance tasks considering milestone constraints

By optimizing the ship maintenance task scheduling through an improved discrete cuckoo search algorithm and heuristic rules, the problem of time-varying task duration and resource requirements under milestone constraints was solved, and more efficient task scheduling was achieved.

CN115619141BActive Publication Date: 2026-03-31HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing methods fail to effectively address the time-varying task duration and resource requirements under milestone constraints in ship maintenance, resulting in scheduling schemes with low practicality.

Method used

An improved discrete cuckoo search algorithm is adopted, which combines heuristic rules and probabilistic selection methods to generate an initial population. The task scheduling is optimized by minimizing the maximum completion time and delay cost. The optimization capability of the population is enhanced by using improved discrete Levy flight and local search.

Benefits of technology

This resulted in a task scheduling scheme that better suits actual production conditions, reduced maximum completion time and delay costs, and improved the practicality of the scheduling scheme.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115619141B_ABST
    Figure CN115619141B_ABST
Patent Text Reader

Abstract

The application provides a kind of random scheduling method for ship maintenance task under milestone constraint, and relates to task scheduling technical field.The application obtains the data of the task to be scheduled in project, encodes the task to be scheduled, and generates a task list;process the task list based on heuristic rules and probability selection method, and generate an initial population;use the initial population as an initial bird nest, minimize the maximum completion time and minimize the delay cost as the goal, optimize the initial bird nest by improved discrete valley bird search algorithm, and obtain the optimal solution;the application takes minimizing the maximum completion time and minimizing the delay cost of task as the goal, studies the task scheduling method of time-varying task duration and resource demand under milestone task, and proposes several heuristic rules based on the characteristics of milestone task and random scheduling.It fills the gap in current research, and obtains a task scheduling scheme of high-end equipment manufacturing that is more in line with the actual production situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of task scheduling technology, and specifically to a stochastic scheduling method for ship maintenance tasks that takes into account milestone constraints. Background Technology

[0002] Ship equipment maintenance demands high safety standards and is highly time-sensitive, significantly impacting national economic security and defense. How to rationally coordinate and allocate tasks and resources within maintenance missions to reduce overall duration and cost is a topic worthy of in-depth research. In practice, ship equipment maintenance tasks may be affected by factors such as mechanical failures, external environment, insufficient resource allocation, personnel changes, and illnesses, leading to discrepancies between the anticipated scheduling plan generated by deterministic parameters and the actual situation. The resource requirements for some tasks are also uncertain and may change over time. While the demand for maintenance personnel and machinery generally does not change with the start time of the mission, energy consumption may be affected by time; for example, rising temperatures require additional cooling for large machine tools, leading to increased energy consumption.

[0003] Meanwhile, the scheduling process imposes strict constraints on the completion time of some tasks. Not only must the entire task be completed on schedule, but some tasks must also be completed within a specified time limit; otherwise, the task will incur losses or fail directly. Tasks with completion time constraints are called milestone tasks.

[0004] However, existing methods do not consider scheduling strategies for time-varying task durations under milestone constraints. In other words, the research of existing methods does not match the actual production situation, resulting in scheduling schemes with low practicality. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] To address the shortcomings of existing technologies, this invention provides a stochastic scheduling method for ship maintenance tasks that considers milestone constraints, thus solving the technical problem that the scheduling schemes derived by existing methods have low practicality.

[0007] (II) Technical Solution

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] In a first aspect, the present invention provides a stochastic scheduling method for ship maintenance tasks considering milestone constraints, comprising:

[0010] S1. Obtain the data of tasks to be scheduled in the project, encode the tasks to be scheduled, and generate a task list;

[0011] S2. Process the task list based on heuristic rules and probabilistic selection methods to generate an initial population;

[0012] S3. Using the initial population as the initial nest, with the goal of minimizing the maximum completion time and minimizing the delay cost, the initial nest is optimized using an improved discrete cuckoo search algorithm to obtain the optimal solution.

[0013] Among them, the heuristic rules include:

[0014] Heuristic rule 1: Without considering resource conflicts, prioritize scheduling hard milestone tasks among the pending tasks. Hard milestone tasks are those whose completion time cannot exceed the specified deadline.

[0015] Heuristic rule 2: Each task is scheduled according to the earliest start time rule, that is, tasks are scheduled as early as possible when there are available resources;

[0016] Heuristic Rule 3: When two soft milestone tasks conflict and either task alone cannot be scheduled beyond the deadline, the milestone task with the earlier deadline shall be given priority. A soft milestone task is a task whose completion time can exceed the specified deadline, but exceeding the deadline will incur delay costs.

[0017] Preferably, the probability selection method includes:

[0018] Using regret preference values ​​for random sampling, and combining this with the latest task completion time, we calculate the probability of selecting all available tasks. Then, we randomly select the next task based on these probabilities. The calculation formula is as follows:

[0019]

[0020] Where, ρ j LE represents the regret preference value for the task. i and LE j Let ν represent the latest completion time of task i and task j, ν be the set of optional tasks, and η be the latest completion time of task i and task j. j Let be the probability of choosing task j.

[0021] Preferably, S2 specifically includes:

[0022] S201. Arrange tasks sequentially according to the probability selection method and heuristic rule 1 until a feasible scheduling scheme is generated. Repeat this process M times to generate the initial population.

[0023] S202. Combining heuristic rule 2, heuristic rule 3 and random serial scheduling generation scheme, individuals in the population are decoded. The random serial scheduling generation scheme selects the corresponding tasks according to the encoded task order. Based on the priority, resource constraints and milestone constraints of the tasks, they are arranged into the plan. The final position of the task will change compared to the encoding, and the start and end times of the generated task are determined.

[0024] Preferably, S3 specifically includes:

[0025] S301. Use the initial population as the initial nest, and initialize the current iteration number t and the maximum iteration number T. max Generate an initial external archive Q with a capacity of N. out ;

[0026] S302. Calculate the fitness value f of each individual in the current population. m1 and f m2 ,in:

[0027] f m1 =E(S) n+1 (λ))

[0028]

[0029] In the formula,

[0030] f m1 S represents the expected completion time for individual m; n+1 This is the start time of the last virtual task, which is also the end time of the last actual task; f m2 Let m be the delay cost for individual m, m2 be the soft milestone task, and B be the delay cost for individual m. m This refers to a set of soft milestone tasks that are completed beyond the time limit. The penalty coefficient is... This is the start time of task m2. Let m2 be the duration of task m2 at time t. Set a time limit for completing task m2, and save the non-dominated solutions to an external file Q;

[0031] S303. Use improved discrete Levy flight to update the current population of individuals;

[0032] S304. Calculate the fitness values ​​of individuals in the population after the update is completed, and save the non-dominated solutions to the external archive Q.

[0033] S305. Determine the number N of non-dominated solutions in Q. par and capacity N out The size of N, if par <N outThen save all individuals in Q and regenerate N using the methods in S1 to S2. out -N par If one individual is not filled, then the crowding of all individuals is calculated, and the top N individuals with the highest crowding are retained. out Each individual serves as the next generation of the population;

[0034] S306. Let t = t + 1, determine if t ≤ T. max If the condition is met, return to S302; otherwise, terminate the algorithm and output the current external file Q as the optimal solution.

[0035] Preferably, S303 specifically includes:

[0036] S303a. First, calculate the Euclidean distance of each nest in the population using the following formula. The nest with the smallest Euclidean distance is the optimal nest. The calculation formula is as follows:

[0037]

[0038] Among them, f lm Let l be the objective function value of the m-th individual. This represents the Euclidean distance of each bird's nest;

[0039] S303b. Calculate the individual distance between the current bird's nest and the optimal bird's nest, and use it as the crossover probability of that individual. The formula for calculating the individual distance is as follows:

[0040]

[0041] Where HD(s1,s2) is the Hamming distance between individuals (in this embodiment, the bird's nest) s1 and s2, and N max This represents the upper limit of the Hamming distance, i.e., the length of the individual. This represents the individual distance between the front nest and the optimal nest;

[0042] S303c: Generate a 1×(N+1) random number matrix, where each number is in the range of 0 to 1; compare the number at each position in the matrix with the crossover probability. If the number is greater than the crossover probability, retain the task number at that position; otherwise, delete the task number at that position.

[0043] S303d: Delete the task number that is the same as the task number retained by the current bird's nest in the optimal bird's nest, and put the remaining task numbers of the optimal bird's nest into the position of the task number that was deleted in the current bird's nest in order;

[0044] S303e. The population is sorted and ranked using fast non-dominated sorting. Each interval is divided into equally spaced subsets with a length equal to the number of levels. The probability of finding an individual in the best level is 0, and the probability of finding an individual in the worst level is P.max A local search operation is performed on the discovered individuals.

[0045] Preferably, the local search operation includes:

[0046] Each non-milestone task within an individual has a certain probability of being selected. The selected task will move within the neighborhood of its nearest preceding and succeeding tasks based on the principle of maximum Hamming distance. The movement methods include:

[0047] When there are no milestone tasks in the neighborhood, calculate the Hamming distance between the sequence of the selected task after moving to each position and the sequence before moving, and move the task to the position with the largest Hamming distance.

[0048] When there is a milestone task to the left of the selected task in the neighborhood, the movable position becomes the nearest successor task from the left milestone to the selected task. The Hamming distance before and after the move is calculated, and the task is moved to the position with the largest Hamming distance.

[0049] Preferably, the congestion level is calculated as follows:

[0050] Based on the dominance of each solution, the population is divided into layers: First, find the non-dominated solution set in the population, denoted as the first non-dominated layer FR1, and remove it from the entire population; then continue to find the non-dominated solution set in the remaining population, denoted as the second non-dominated sorting layer FR2; continue in this manner until the entire population is divided into layers.

[0051] Calculate the crowding degree for solutions in the same layer: Let the crowding degree be d. m =0, m=1...n, and sort the individuals in ascending order according to the l-th objective function, assigning d1=d to the individuals at the left and right ends. n =∞, calculate the intermediate individual Where f l (m+1) and f l (m-1) represents the objective function values ​​of the next and previous individuals of individual m. and Let A be the maximum and minimum values ​​of the l-th objective function in the current level; update the congestion degree for each objective function in the above manner until the final congestion degree is calculated; wherein, the dominance condition means that when every objective function of solution A is worse than the objective function of solution B, then solution A is said to be dominated by solution B.

[0052] Secondly, the present invention provides a stochastic scheduling system for ship maintenance tasks under milestone constraints, comprising:

[0053] The encoding module is used to obtain data of tasks to be scheduled in the project, encode the tasks to be scheduled, and generate a task list.

[0054] The initial population generation module is used to process the task list based on heuristic rules and probabilistic selection methods to generate an initial population.

[0055] The optimization module is used to optimize the initial nests using the initial population as the initial nests, with the goal of minimizing the maximum completion time and minimizing the delay cost. The optimal solution is obtained by optimizing the initial nests using an improved discrete cuckoo search algorithm.

[0056] Among them, the heuristic rules include:

[0057] Heuristic rule 1: Without considering resource conflicts, prioritize scheduling hard milestone tasks among the pending tasks. Hard milestone tasks are those whose completion time cannot exceed the specified deadline.

[0058] Heuristic rule 2: Each task is scheduled according to the earliest start time rule, that is, tasks are scheduled as early as possible when there are available resources;

[0059] Heuristic Rule 3: When two soft milestone tasks conflict and either task alone cannot be scheduled beyond the deadline, the milestone task with the earlier deadline shall be given priority. A soft milestone task is a task whose completion time can exceed the specified deadline, but exceeding the deadline will incur delay costs.

[0060] Thirdly, the present invention provides a computer-readable storage medium storing a computer program for stochastic scheduling of ship maintenance tasks under milestone constraints, wherein the computer program causes a computer to execute the stochastic scheduling method for ship maintenance tasks under milestone constraints as described above.

[0061] Fourthly, the present invention provides an electronic device, comprising:

[0062] One or more processors;

[0063] Memory; and

[0064] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including a stochastic scheduling method for ship maintenance tasks taking into account milestone constraints as described above.

[0065] (III) Beneficial Effects

[0066] This invention provides a stochastic scheduling method for ship maintenance tasks considering milestone constraints. Compared with existing technologies, it has the following advantages:

[0067] This invention aims to minimize the maximum completion time and the delay cost of tasks. It studies a task scheduling method for time-varying tasks with varying durations and resource requirements under milestone tasks, and proposes several heuristic rules based on the characteristics of milestone tasks and random scheduling. This fills a gap in current research and yields a task scheduling scheme for high-end equipment manufacturing that is more suitable for actual production conditions. Attached Figure Description

[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0069] Figure 1 This is a block diagram of a stochastic scheduling method for ship maintenance tasks under milestone constraints, as described in an embodiment of the present invention.

[0070] Figure 2 This is a flowchart of the improved discrete cuckoo search algorithm in an embodiment of the present invention;

[0071] Figure 3 This is a schematic diagram illustrating the process of performing a local search operation on discovered individuals when there are no milestone tasks in the neighborhood.

[0072] Figure 4 This is a schematic diagram illustrating the process of performing a local search operation on the discovered individual when a milestone task exists to the left of the selected task in the neighborhood. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0074] This application provides a stochastic scheduling method for ship maintenance tasks that considers milestone constraints, which solves the technical problem that the scheduling schemes obtained by existing methods have low practicality. By considering milestones in the solution process, a task scheduling scheme for high-end equipment manufacturing that is more in line with the actual production situation is obtained.

[0075] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows:

[0076] In existing technologies, some research has been conducted on task scheduling that considers time-varying task durations, but there is limited research on resource-constrained task scheduling that simultaneously considers time-varying task durations and resource requirements. Given the uncertainties inherent in the scheduling process, how to reasonably and accurately assess and measure the specific impact of uncertainty on scheduling is a challenge. Furthermore, the milestone constraints of some tasks further complicate the situation. Currently, no research provides corresponding scheduling strategies for time-varying task durations, resource requirements, and milestone tasks.

[0077] To address this problem, this invention solves the resource-constrained task scheduling problem considering time-varying task duration and resource requirements under milestone tasks. First, a mathematical model is established with the goal of minimizing completion time and delay cost. Based on the characteristics of milestone tasks and random scheduling, several heuristic rules are proposed. An improved multi-objective discrete cuckoo algorithm is used, and a discrete Lévy flight based on Hamming distance is designed for efficient individual updates. Furthermore, an adaptive local search based on a maximum Hamming distance left-right rotation mechanism is constructed to enhance the population's ability to escape local convergence. Finally, a scheduling strategy with optimal duration and delay cost is obtained through non-dominated sorting.

[0078] This invention provides a stochastic scheduling method for ship maintenance tasks considering milestone constraints, such as... Figure 1 As shown, it includes:

[0079] S1. Obtain the data of tasks to be scheduled in the project, encode the tasks to be scheduled, and generate a task list;

[0080] S2. Process the task list based on heuristic rules and probabilistic selection methods to generate an initial population;

[0081] S3. Using the initial population as the initial nest, with the goal of minimizing the maximum completion time and minimizing the delay cost, the initial nest is optimized using an improved discrete cuckoo search algorithm to obtain the optimal solution.

[0082] Among them, the heuristic rules include:

[0083] Heuristic rule 1: Without considering resource conflicts, prioritize scheduling hard milestone tasks among the pending tasks. Hard milestone tasks are those whose completion time cannot exceed the specified deadline.

[0084] Heuristic rule 2: Each task is scheduled according to the earliest start time rule, that is, tasks are scheduled as early as possible when there are available resources;

[0085] Heuristic Rule 3: When two soft milestone tasks conflict and either task alone cannot be scheduled beyond the deadline, the milestone task with the earlier deadline shall be given priority. A soft milestone task is a task whose completion time can exceed the specified deadline, but exceeding the deadline will incur delay costs.

[0086] This invention aims to minimize the maximum completion time and the delay cost. It studies a task scheduling method for time-varying tasks and resource requirements under milestone tasks, and proposes several heuristic rules based on the characteristics of milestone tasks and random scheduling. This fills a gap in current research and yields a task scheduling scheme for high-end equipment manufacturing that is more suitable for actual production conditions.

[0087] The following is a detailed explanation of each step:

[0088] In step S1, data for N tasks to be scheduled in the project is obtained, the tasks to be scheduled are encoded, and a task list A is generated. L =[a0,a1...a N+1 In the list, each element represents a task number, and the position of the element represents the priority order of task assignment. Specifically, a0 and a... N+1 This is a virtual task, representing the start and end of a project. The specific implementation process is as follows:

[0089] In a ship repair project, there are N tasks waiting to be scheduled. The duration of each task is a random variable d that varies with the task's start time. i,t The resource requirements for some tasks are also random variables r that vary with the task start time. ik,t There is a priority relationship between tasks, i∈P j This indicates that task i is a preceding task of task j. The task has K types of updatable resources, and the maximum available quantity of resource k is R. k The scheduling process cannot be preempted or interrupted.

[0090] Using task list A L =[a0,a1...a N+1 The problem under study is coded in the form of [], where each element in the list represents a task number, and the position of the element represents the priority order of the task assignment. a0 and a... N+1 These are virtual tasks, representing the start and end of a project.

[0091] In step S2, the task list is processed based on heuristic rules and probabilistic selection methods to generate an initial population. The specific implementation process is as follows:

[0092] The heuristic rules include:

[0093] Heuristic Rule 1: Without considering resource conflicts, prioritize scheduling hard milestone tasks among the pending tasks. (Hard milestone tasks are those whose completion time cannot exceed the specified deadline.)

[0094] Heuristic Rule 2: Each task is scheduled according to the earliest start time rule, that is, the task is scheduled as early as possible when there are available resources.

[0095] Heuristic Rule 3: When two soft milestone tasks conflict and either task alone will not exceed the deadline, prioritize the milestone task with the earlier deadline. (Soft milestone tasks are those whose completion time can exceed the specified deadline, but exceeding the deadline will incur delay costs).

[0096] S2 specifically includes:

[0097] S201. Tasks are sequentially assigned according to the probabilistic selection method and heuristic rule 1 until a feasible scheduling scheme is generated. This process is repeated M times to generate the initial population. The methods for calculating the selection probability include:

[0098] Methods for calculating the probability of selection include:

[0099] Using regret preference values ​​for random sampling, and combining this with the latest task completion time, we calculate the probability of selecting all available tasks. Then, we randomly select the next task based on these probabilities. The probability calculation formula is as follows:

[0100]

[0101]

[0102] Where, ρ j LE represents the regret preference value for the task. i and LE j Let ν represent the latest completion time of task i and task j, ν be the set of optional tasks, and η be the latest completion time of task i and task j. j The probability of selecting the task.

[0103] S202. Combining heuristic rule 2, heuristic rule 3, and the random serial scheduling generation scheme, the individual is decoded. The random serial scheduling generation scheme selects the corresponding tasks according to the encoded task order, and arranges them into the plan based on constraints such as priority, resources, milestones, etc. The final position of the task will change compared to the encoding. The start and end times of the generated tasks are also specified.

[0104] In step S3, the initial population is used as the initial nest. With the objectives of minimizing the maximum completion time and minimizing delay costs, the initial nest is optimized using an improved discrete cuckoo search algorithm to obtain the optimal solution. For example... Figure 2 As shown, the specific implementation process is as follows:

[0105] S301. Use the initial population as the initial nest, and initialize the current iteration number t and the maximum iteration number T. max Generate an initial external archive Q with a capacity of N. out The initial external archive Q is an empty set that stores individuals.

[0106] S302. Calculate the fitness value (f) of each individual in the current population. m1 ,f m2 ), E(S n+1 (λ)), Where f m1 S is the expected completion time for individual m. n+1 f represents the start time of the last task (the start time of the last virtual task, i.e., the end time of the last actual task). m2 Let m be the delay cost for individual m, m2 be the soft milestone task, and B be the delay cost for individual m. m This refers to a set of soft milestone tasks that are completed beyond the time limit. The penalty coefficient is... This is the start time of task m2. Let m2 be the duration of task m2 at time t. Set the time limit for task m2, E represents the expected time, and save the non-dominated solutions to the external file Q.

[0107] S303. Use an improved discrete Levy flight to update the current population of individuals. Specifically, this includes:

[0108] S303a. First, calculate the Euclidean distance of each nest in the population using the following formula. The nest with the smallest Euclidean distance is the optimal nest. The calculation formula is as follows:

[0109]

[0110] Among them, f lm Let l be the objective function value of the m-th individual. This represents the Euclidean distance of each bird's nest.

[0111] S303b. Calculate the individual distance between the current nest and the optimal nest, and use it as the crossover probability of that individual. The formula for calculating the individual distance is as follows:

[0112]

[0113] Where HD(s1,s2) is the Hamming distance between individuals (in this embodiment, the bird's nest) s1 and s2, and N maxThis represents the upper limit of the Hamming distance, i.e., the length of the individual. This represents the individual distance between the previous nest and the optimal nest.

[0114] S303c: Generate a 1×(N+1) random number matrix, where each number ranges from 0 to 1. Compare the number at each position in the matrix with the crossover probability. If the number is greater than the crossover probability, retain the task number at that position; otherwise, delete the task number at that position.

[0115] S303d: Delete the task number that is the same as the task number retained by the current bird's nest in the optimal bird's nest, and put the remaining task numbers of the optimal bird's nest into the positions of the deleted task numbers of the current bird's nest in order.

[0116] S303e. The population is sorted and ranked using fast non-dominated sorting. Each interval is divided into equally spaced subsets with a length equal to the number of levels. The probability of finding an individual in the best level is 0, and the probability of finding an individual in the worst level is P. max A local search operation is performed on the discovered individuals. (Each non-milestone task within an individual has a certain probability of being selected. The selected task will move within the neighborhood of its nearest preceding and succeeding tasks based on the principle of maximum Hamming distance. There are two cases: first, when there are no milestone tasks in the neighborhood, the Hamming distance between the sequence of the selected task after moving to each position and the sequence before moving is calculated, and the task is moved to the position with the largest Hamming distance, such as...) Figure 3 Second, when a milestone task exists to the left of the selected task within its neighborhood, the movable position becomes the nearest successor task from the left milestone. The Hamming distance before and after the move is calculated, and the task is moved to the position with the largest Hamming distance, such as... Figure 4 .

[0117] S304. Calculate the fitness values ​​of individuals in the population after the update, and save the non-dominated solutions to the external archive Q. The specific implementation process is similar to S302, and will not be repeated here.

[0118] S305. Determine the number N of non-dominated solutions in Q. par and capacity N out The size of N. If N par <N out Then save all individuals in Q and regenerate N using the methods in S1 to S2. out -N par If one individual is not filled, then the crowding of all individuals is calculated, and the top N individuals with the highest crowding are retained. out Each individual is considered as part of the next generation population. Crowding is calculated as follows:

[0119] First, based on the dominance of each solution (when every objective function of solution A is worse than that of solution B, then solution A is said to be dominated by solution B), the population is stratified as follows: First, the set of non-dominated solutions in the population is identified, denoted as the first non-dominated layer FR1, and removed from the entire population; then, the set of non-dominated solutions in the remaining population is identified, denoted as the second non-dominated ordination layer FR2; this process continues until the entire population is stratified. The crowding degree is calculated for solutions in the same layer: Let the crowding degree d... m =0, m=1...n), and sort the individuals in ascending order according to the l-th objective function, assigning d1=d to the individuals at the left and right ends. n =∞, calculate the intermediate individual Where f l (m+1) and f l (m-1) represents the objective function values ​​of the next and previous individuals of individual m. and Let these be the maximum and minimum values ​​of the l-th objective function in the current level. Update the congestion level for each objective function in the above manner until the final congestion level is calculated.

[0120] S306. Let t = t + 1, determine if t ≤ T. max If the condition is met, return to S302; otherwise, terminate the algorithm and output the current external file Q as the optimal pareto solution.

[0121] This invention also provides a stochastic scheduling system for ship maintenance tasks considering milestone constraints, the system comprising:

[0122] The encoding module is used to acquire data for N tasks to be scheduled in the project, encode the tasks to be scheduled, and generate a task list A. L =[a0,a1...a N+1 In the list, each element represents a task number, and the position of the element represents the priority order of task assignment. Specifically, a0 and a... N+1 These are virtual tasks, representing the start and end of a project;

[0123] The initial population generation module is used to process the task list based on heuristic rules and probabilistic selection methods to generate an initial population.

[0124] The optimization module is used to optimize the initial nests using the initial population as the initial nests, with the goal of minimizing the maximum completion time and minimizing the delay cost. The optimal solution is obtained by optimizing the initial nests using an improved discrete cuckoo search algorithm.

[0125] Among them, the heuristic rules include:

[0126] Heuristic rule 1: Without considering resource conflicts, prioritize scheduling hard milestone tasks among the pending tasks. Hard milestone tasks are those whose completion time cannot exceed the specified deadline.

[0127] Heuristic rule 2: Each task is scheduled according to the earliest start time rule, that is, tasks are scheduled as early as possible when there are available resources;

[0128] Heuristic Rule 3: When two soft milestone tasks conflict and either task alone cannot be scheduled beyond the deadline, the milestone task with the earlier deadline shall be given priority. A soft milestone task is a task whose completion time can exceed the specified deadline, but will incur delay costs once the specified completion time is exceeded.

[0129] It is understood that the random scheduling system for ship maintenance tasks under milestone constraints provided in this embodiment of the invention corresponds to the random scheduling method for ship maintenance tasks under milestone constraints described above. The explanations, examples, and beneficial effects of the relevant content can be found in the corresponding content of the random scheduling method for ship maintenance tasks under milestone constraints, and will not be repeated here.

[0130] This invention also provides a computer-readable storage medium storing a computer program for stochastic scheduling of ship maintenance tasks under milestone constraints, wherein the computer program causes a computer to execute the stochastic scheduling method for ship maintenance tasks under milestone constraints as described above.

[0131] This invention also provides an electronic device, comprising:

[0132] One or more processors;

[0133] Memory; and

[0134] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including a stochastic scheduling method for ship maintenance tasks taking into account milestone constraints as described above.

[0135] In summary, compared with existing technologies, it has the following beneficial effects:

[0136] 1. This invention aims to minimize the maximum completion time and the delay cost of tasks. It studies a task scheduling method for time-varying tasks and resource requirements under milestone tasks, and proposes several heuristic rules based on the characteristics of milestone tasks and random scheduling. This fills a gap in current research and yields a task scheduling scheme for high-end equipment manufacturing that is more suitable for actual production conditions.

[0137] 2. The problem model solved by this invention can also be applied to similar problems after adding certain problem assumptions or constraints, and has strong applicability.

[0138] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0139] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for stochastic scheduling of ship maintenance tasks under milestone constraints, characterized in that, The method comprises the following steps: S1, obtaining the data of tasks to be scheduled in a project, encoding the tasks to be scheduled, and generating a task list; S2, processing the task list based on heuristic rules and a probability selection method to generate an initial population; S3, taking the initial population as an initial bird nest, optimizing the initial bird nest by using an improved discrete Levy flight algorithm to minimize the maximum completion time and minimize the delay cost, and obtaining an optimal solution; The heuristic rules comprise: Heuristic rule 1: In the case of no resource conflict, the hard milestone task in the task to be arranged is arranged preferentially, wherein the hard milestone task refers to a task whose completion time cannot exceed a specified deadline; Heuristic rule 2: Each task is arranged according to the earliest start time rule, that is, the task is arranged at the earliest time period as possible when there is available resource; Heuristic rule 3: When two soft milestone tasks conflict and arranging any one of the tasks separately does not exceed the deadline, the milestone task with the earlier deadline is arranged preferentially, wherein the soft milestone task refers to a task whose completion time can exceed the specified deadline, but if the completion time exceeds the deadline, a delay cost will be generated; S2 specifically comprises: S201、According to the probability selection method and heuristic rule 1, arrange tasks in turn until a feasible scheduling scheme is generated, repeat M The initial population is generated, wherein the calculation method of the selection probability comprises: The calculation method of the selection probability comprises: The selection probability of all selectable tasks is calculated by using a regret bias value to randomly sample and combining the latest completion time of the task, and then a task to be performed next is randomly selected according to the probability, and the probability calculation formula is as follows: wherein, is the regret preference value for the task, and denotes the task and the task latest end time, is the set of optional tasks, is the selection probability for the task; S202, decoding the individuals in the population in combination with the heuristic rule 2, the heuristic rule 3 and a random serial scheduling generation scheme, selecting the corresponding task according to the order of the encoded tasks, arranging the task into the plan on the basis of considering the priority, resource constraint and milestone constraint limitation of the task, and finally the position of the task changes compared with the encoding, and the start and end times of the task are generated.

2. The random scheduling method for ship maintenance tasks considering milestone constraints according to claim 1, characterized in that, The S3 specifically comprises: S301. Use the initial population as the initial nest and initialize the current iteration number. t and maximum number of iterations T max Generate the initial external archive The capacity is ; S302、Calculate the fitness value of each individual in the current population wherein: = In the formula, expected completion time of individual m; is the start time of the last virtual task, i.e. the end time of the last real task; delay cost of individual m, is the soft milestone task, is the set of soft milestone tasks completed beyond the defined time, is the penalty coefficient, is the start time of task is the start time of task is the duration of task at time t, is the defined completion time of task , saving the non-dominated solutions among them to the external file . S303, the individuals in the current population are updated by using the improved discrete Levy flight; S304、Calculate the fitness value of the individual in the population after the update is completed, and save the non-inferior solution in the external archive In some embodiments, the method further comprises: S305, judge number of non-dominated solutions and capacity size, if , save the current all individuals and use the method of S1~S2 to regenerate individuals to supplement; otherwise, calculate the crowding degree of all individuals, save the first individuals with larger crowding degree as the next generation population; S306, Order t=t+ 1. Judgment T max If the condition is true, return to S302; otherwise, end the algorithm and output the current external file. As the optimal solution.

3. The random scheduling method for ship maintenance tasks considering milestone constraints according to claim 2, characterized in that, The S303 specifically comprises: S303a, the Euclidean distance of each bird nest in the population is calculated by the following formula, and the bird nest with the minimum Euclidean distance is the optimal bird nest, and the calculation formula is as follows: wherein, is the l-th objective function value for the m-th individual, denotes the Euclidean distance of each bird's nest; S303b, the individual distance between the current bird nest and the optimal bird nest is calculated and used as the crossover probability of the individual, and the calculation formula of the individual distance is as follows: wherein, is the Hamming distance, and is the Hamming distance, is the upper bound of the Hamming distance, i.e. the length of the individual, denotes the individual distance between the pre-bird nest and the optimal bird nest; S303c, a random number matrix of 1x(N+1) is generated, wherein each number ranges from 0 to 1; the numbers in the matrix are compared with the crossover probability, if the number is greater than the crossover probability, the task sequence number in the position is retained, otherwise the task sequence number in the position is deleted; S303d, the task sequence numbers that are the same as the task sequence numbers retained by the optimal bird nest and the current bird nest are deleted, and the remaining task sequence numbers of the optimal bird nest are arranged in the positions of the deleted task sequence numbers of the current bird nest in sequence; S303e, rank the population by fast non-dominated sorting, divide the interval into equal-interval and length same as the number of levels subsets, preferably the probability of the individual in the worst level being found is 0, the probability of the individual in the best level being found is Perform a local search operation on the found individual.

4. The random scheduling method for ship maintenance tasks considering milestone constraints according to claim 3, characterized in that, The local search operation comprises: Each non-milestone task in the individual has a certain probability of being selected, and the selected task will be moved in the neighborhood between the nearest previous and next tasks based on the principle of the maximum Hamming distance, and the moving mode comprises: When there is no milestone task in the neighborhood, the Hamming distance between the sequence after moving the selected task to each position and the sequence before moving is calculated, and the task is moved to the position with the largest Hamming distance; When there is a milestone task on the left side of the selected task in the neighborhood, the movable position becomes the nearest task after the milestone on the left side, the Hamming distance before and after moving is calculated, and the task is moved to the position with the largest Hamming distance.

5. The random scheduling method for ship maintenance tasks considering milestone constraints according to claim 2, characterized in that, The calculation method of the congestion degree is as follows: The solutions are layered according to their dominated conditions: first, find the non-dominated solution set in the population, denoted as the first non-dominated layer FR1, and remove it from the entire population; then continue to find the non-dominated solution set in the remaining population, denoted as the second non-dominated sorting layer FR2; continue in this way until the entire population is layered; Calculate crowding distance for solutions in the same layer: Let the crowding distance of solution be denoted as , and sort the individuals in ascending order according to the lth objective function, and give the individuals at the left and right ends , calculate the middle individual , where and are the objective function values of the next and previous individuals of the individual , and the maximum and minimum values of the lth objective function in the current layer; update the crowding distance according to the above manner for each objective function until the final crowding distance is calculated; wherein, the domination condition refers to when each objective function of solution A is worse than the objective function of solution B, then solution A is dominated by solution B.

6. A random scheduling system for ship maintenance tasks under milestone constraints, characterized in that, It comprises: The encoding module is used for obtaining the data of the tasks to be scheduled in the project, encoding the tasks to be scheduled, and generating a task list; The initial population generation module is used for processing the task list based on the heuristic rules and the probability selection method to generate an initial population; The optimization module is used for taking the initial population as an initial bird nest, taking minimizing the maximum completion time and minimizing the delay cost as the target, and optimizing the initial bird nest by using the improved discrete cuckoo search algorithm to obtain an optimal solution. The heuristic rules include: Heuristic rule 1: In the case of no resource conflict, the hard milestone task in the task to be arranged is preferentially arranged, and the hard milestone task refers to a task whose completion time cannot exceed the specified deadline; Heuristic rule 2: Each task is scheduled according to the earliest start time rule, that is, the task is arranged at the earliest time period as possible when there is available resource; Heuristic rule 3: When two soft milestone tasks conflict and arranging any one of the tasks separately does not exceed the deadline, the milestone task with the earlier deadline is preferentially arranged, and the soft milestone task refers to a task whose completion time can exceed the specified deadline, but if the completion time exceeds, a delay cost will be generated; The processing of the task list based on the heuristic rules and the probability selection method to generate the initial population comprises: S201, arranging tasks according to the probability selection method and heuristic rule 1 in turn until a feasible scheduling scheme is generated, repeating M generating an initial population, wherein the calculation method of the selection probability comprises: The selection probability calculation method comprises: The regret preference value is randomly sampled, the selection probability of all selectable tasks is calculated according to the latest completion time of the task, and the next task is randomly selected according to the probability, and the probability calculation formula is as follows: wherein, is the regret value of task, and denotes the task and the task latest end time, is the set of optional tasks, is the selection probability of task; S202, the individual in the population is decoded in combination with the heuristic rule 2, the heuristic rule 3 and the random serial scheduling generation scheme, the corresponding task is selected according to the task order of the encoding, the task is arranged in the plan on the basis of considering the priority, resource constraint and milestone constraint limitation of the task, the position of the final task is changed compared with the encoding, and the start and end time of the task is generated.

7. A computer-readable storage medium, characterized in that, The computer program for considering the random scheduling of ship maintenance tasks under the milestone constraint, wherein the computer program enables the computer to perform the random scheduling method of ship maintenance tasks under the milestone constraint as claimed in any one of claims 1-5.

8. An electronic device, comprising: It comprises: One or more processors; Memory; And One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising programs for performing the random scheduling method for ship maintenance tasks considering milestone constraints as claimed in any one of claims 1-5.

Citation Information

Patent Citations

  • Development resource integrated scheduling method for high-end equipment complex hierarchical task network

    CN111950761A

  • Parallel task scheduling method based on particle swarm optimization algorithm

    CN113778654A