Scheduling method and system for preemptible maintenance personnel for ship power equipment
By combining the improved moth-to-flame algorithm with the adversarial learning strategy and hybrid mutation operator, the problem of accurate and efficient scheduling under multiple constraints in the scheduling of ship power equipment maintenance tasks is solved, achieving shorter maintenance cycles and higher resource utilization.
Patent Information
- Application Number
- CN202211232913.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-10-10
AI Technical Summary
Existing ship power equipment maintenance task scheduling technology cannot accurately and efficiently obtain task scheduling results when considering multiple constraints. Especially when task preemption and multi-skilled personnel resources are limited, the existing algorithm has problems of low precision and low efficiency.
An improved moth-to-flame algorithm is adopted, combined with an opposition-based learning strategy and a hybrid mutation operator, to construct a ship power equipment maintenance task scheduling model. The scheduling model is solved by the improved moth-to-flame algorithm with the goal of minimizing the maximum completion time, taking into account the constraints of task preemption and limited multi-skilled personnel resources.
It achieves accurate and efficient task scheduling while considering multiple constraints, shortens maintenance cycles, improves resource utilization and the accuracy of scheduling results, and reduces enterprise costs.
Smart Images

Figure CN115564242B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship power equipment maintenance task scheduling, and in particular to a method and system for scheduling maintenance personnel with preemptible tasks for ship power equipment. Background Art
[0002] Marine power equipment maintenance is a complex, integrated management project characterized by numerous tasks and multi-skilled maintenance personnel. To reduce maintenance cycles and improve enterprise competitiveness, it is essential to fully utilize existing maintenance resources and design a rational maintenance scheduling plan for marine power equipment. Task sequencing and personnel allocation are two key issues to consider in this process.
[0003] Currently, most ship power equipment maintenance task scheduling only considers a single constraint, for example, only considering task scheduling when multi-skilled personnel resources are limited, or only considering project scheduling when tasks are preempted; then heuristic algorithms or intelligent optimization algorithms are used to process and obtain the optimal solution within an acceptable period of time.
[0004] However, the execution process of ship power equipment maintenance tasks in reality is often very complicated. After being preempted, ship power equipment maintenance will be divided into multiple sub-tasks, and then the order of task execution needs to be arranged, as well as the collaborative allocation of multi-skilled personnel for the preempted sub-tasks when the resources of multi-skilled personnel are limited. Therefore, the scheduling of ship power equipment maintenance tasks in reality needs to consider multiple constraints such as task preemption and resource limitations of multi-skilled personnel at the same time. The task scheduling results obtained by considering only one constraint in the existing technology are bound to be inaccurate. In addition, as the constraints increase, the search space will be accompanied by a "combinatorial explosion" phenomenon. Relying solely on existing heuristic algorithms and intelligent optimization algorithms cannot obtain the optimal solution in a short time, that is, the solution process has problems such as low accuracy and low efficiency. Therefore, there is an urgent need for a ship power equipment maintenance task scheduling technology that considers multiple constraints to solve the above problems. Summary of the Invention
[0005] (1) Technical problems solved
[0006] In response to the shortcomings of the existing technology, the present invention provides a method and system for scheduling preemptive task maintenance personnel for ship power equipment, which solves the problem that the existing ship power equipment maintenance task scheduling technology cannot accurately and efficiently obtain task scheduling results when considering multiple constraints.
[0007] (2) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] In a first aspect, the present invention first proposes a method for scheduling maintenance personnel for preemptible tasks of ship power equipment, the method comprising:
[0010] Considering the constraints including task preemption and coordinated allocation of multi-skilled maintenance personnel, a ship power equipment maintenance task scheduling model is constructed with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects.
[0011] The ship power equipment maintenance task scheduling model is solved based on the improved moth-to-fire algorithm to obtain a scheduling result, and the scheduling of the ship power equipment maintenance task is performed based on the scheduling result; the improved moth-to-fire algorithm includes: embedding an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm.
[0012] Preferably, the objective function of the ship power equipment maintenance task scheduling model is:
[0013] MinC max =max{f g , g∈G}
[0014] Among them, C max represents the maximum completion time of the project; g represents the task, G represents the task set, g∈G; f g Indicates the time from the start to the completion of a task.
[0015] Preferably, solving the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain a scheduling result includes:
[0016] Step 1: Initialize the relevant parameters of the MFO algorithm, including: logarithmic spiral shape constant b, random number t, maximum number of iterations Max_iter, number of flames Flame_no, number of moths n and dimension d;
[0017] Step 2: Expand the initial moth population using an opposition-based learning strategy, sort the fitness values of each moth individual in the expanded moth population in descending order, and select the population corresponding to the top n solutions with the highest fitness values as the sorted initial moth population;
[0018] Step 3: Update the flame based on the sorted initial moth population, calculate the fitness value of the flame population and sort it, and select the best individual as the optimal solution;
[0019] Step 4: Determine whether all individuals have been updated. If i < n, proceed to step 5; otherwise, proceed to step 8. Here, i represents the sequence number of the moth in the current iteration, and n represents the number of moths in the population.
[0020] Step 5: Determine whether all dimensions of the moth individual in the current iteration have been updated. If j < d, proceed to step 7; if not, proceed to step 6. Where j represents the dimension of the moth in the current iteration, and d represents the total dimension of the moth.
[0021] Step 6: Operate the Levy flight operator on the current feasible solution to obtain a new solution x new2 , compare x new2 with x i,j The fitness value of the two is selected and retained as the new x i,j , go to step 8;
[0022] Step 7: Update parameters b, t using formula D i =|F j -M i | Calculate the distance between the moth and the flame using the updated flame F, formula S(M j , F j )=D i ·e bt ·cos(2πt)+F j To update the moth population M, we get a feasible solution x i,j , use the sine-cosine mutation operator to get the new solution x new1 , compare the fitness values of the two solutions and select the larger one as x i,j And go to step 8;
[0023] Step 8: Record the position of the moth and determine whether the iteration end condition is met. If so, return the fitness value and terminate the entire algorithm process; otherwise, return to step 2;
[0024] Step 9: Loop steps 2 to 8 until the preset loop termination condition is met, and the maintenance task scheduling plan is output; the preset loop termination condition includes: the target value no longer decreases or the number of iterations reaches the maximum number of iterations Max_iter.
[0025] Preferably, the initial moth population is obtained by:
[0026] The initial moth population is generated by adopting a random strategy and a preset heuristic rule; the preset heuristic rule includes heuristic rule 1, heuristic rule 2, and heuristic rule 3;
[0027] The specific process of generating the initial moth population using a random strategy and preset heuristic rules includes:
[0028] S211: Initialize the number of moths in the population M to n, calculate the task flexibility of each task and sort them in descending order;
[0029] S212: Generate a task list using heuristic rule 1, and the remaining n-1 solutions are generated by random strategy;
[0030] The heuristic rule 1 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two tasks have a resource conflict, the task with less task flexibility is scheduled first;
[0031] S213: Calculate the scarcity of each multi-skilled maintenance worker and sort them in descending order;
[0032] S214: Generate a multi-skill maintenance personnel allocation list corresponding to the task list using heuristic rule 2, and generate the remaining n-1 solutions using a random strategy;
[0033] The heuristic rule 2 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two employees have a task conflict, the employee with greater personnel scarcity is scheduled first;
[0034] S215: Combine heuristic rule 3 with the serial schedule generation mechanism to obtain the maximum completion time of the project and output a moth solution;
[0035] The heuristic rule 3 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, it is reasonable to assume that the idle time interval of the resource is earlier than the start time of the scheduling task.
[0036] Preferably, the operation of expanding the initial moth population using an opposition-based learning strategy includes:
[0037] The opposition-based learning strategy is used to operate the initial moth population M to obtain its opposition population OM, and then the initial moth population M is merged with its opposition population OM to obtain the expanded initial moth population M.
[0038] In a second aspect, the present invention further proposes a preemptible maintenance personnel scheduling system for ship power equipment, the system comprising:
[0039] The scheduling model acquisition module is used to consider the constraints including task preemption and coordinated allocation of multi-skilled maintenance personnel, and to build a ship power equipment maintenance task scheduling model with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects;
[0040] A scheduling result acquisition module is used to solve the ship power equipment maintenance task scheduling model based on the improved moth-to-fire algorithm to obtain a scheduling result, and execute the scheduling of the ship power equipment maintenance task based on the scheduling result; the improved moth-to-fire algorithm includes: embedding an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm.
[0041] Preferably, the objective function of the ship power equipment maintenance task scheduling model in the scheduling model acquisition module is:
[0042] MinC max =max{f g , g∈G}
[0043] Among them, C max represents the maximum completion time of the project; g represents the task, G represents the task set, g∈G; f g Indicates the time from the start to the completion of a task.
[0044] Preferably, the scheduling result acquisition module solves the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain the scheduling result, including:
[0045] Step 1: Initialize the relevant parameters of the MFO algorithm, including: logarithmic spiral shape constant b, random number t, maximum number of iterations Max_iter, number of flames Flame_no, number of moths n and dimension d;
[0046] Step 2: Expand the initial moth population using an opposition-based learning strategy, sort the fitness values of each moth individual in the expanded moth population in descending order, and select the population corresponding to the top n solutions with the highest fitness values as the sorted initial moth population;
[0047] Step 3: Update the flame based on the sorted initial moth population, calculate the fitness value of the flame population and sort it, and select the best individual as the optimal solution;
[0048] Step 4: Determine whether all individuals have been updated. If i < n, proceed to step 5; otherwise, proceed to step 8. Here, i represents the sequence number of the moth in the current iteration, and n represents the number of moths in the population.
[0049] Step 5: Determine whether all dimensions of the moth individual in the current iteration have been updated. If j < d, proceed to step 7; if not, proceed to step 6. Where j represents the dimension of the moth in the current iteration, and d represents the total dimension of the moth.
[0050] Step 6: Operate the Levy flight operator on the current feasible solution to obtain a new solution x new2 , compare x new 2 and x i,j The fitness value of the two is selected and retained as the new x i,j , go to step 8;
[0051] Step 7: Update parameters b, t using formula D i =|F j -Mi | Calculate the distance between the moth and the flame using the updated flame F, formula S(M j , F j )=D i ·e bt ·cos(2πt)+F j To update the moth population M, we get a feasible solution x i,j , use the sine-cosine mutation operator to get the new solution x new1 , compare the fitness values of the two solutions and select the larger one as x i,j And go to step 8;
[0052] Step 8: Record the position of the moth and determine whether the iteration end condition is met. If so, return the fitness value and terminate the entire algorithm process; otherwise, return to step 2;
[0053] Step 9: Loop steps 2 to 8 until the preset loop termination condition is met, and the maintenance task scheduling plan is output; the preset loop termination condition includes: the target value no longer decreases or the number of iterations reaches the maximum number of iterations Max_iter.
[0054] Preferably, the initial moth population is obtained by:
[0055] The initial moth population is generated by adopting a random strategy and a preset heuristic rule; the preset heuristic rule includes heuristic rule 1, heuristic rule 2, and heuristic rule 3;
[0056] The specific process of generating the initial moth population using a random strategy and preset heuristic rules includes:
[0057] S211: Initialize the number of moths in the population M to n, calculate the task flexibility of each task and sort them in descending order;
[0058] S212: Generate a task list using heuristic rule 1, and the remaining n-1 solutions are generated by random strategy;
[0059] The heuristic rule 1 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two tasks have a resource conflict, the task with less task flexibility is scheduled first;
[0060] S213: Calculate the scarcity of each multi-skilled maintenance worker and sort them in descending order;
[0061] S214: Generate a multi-skill maintenance personnel allocation list corresponding to the task list using heuristic rule 2, and generate the remaining n-1 solutions using a random strategy;
[0062] The heuristic rule 2 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two employees have a task conflict, the employee with greater personnel scarcity is scheduled first;
[0063] S215: Combine heuristic rule 3 with the serial schedule generation mechanism to obtain the maximum completion time of the project and output a moth solution;
[0064] The heuristic rule 3 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, it is reasonable to assume that the idle time interval of the resource is earlier than the start time of the scheduling task.
[0065] Preferably, the operation of expanding the initial moth population using an opposition-based learning strategy includes:
[0066] The opposition-based learning strategy is used to operate the initial moth population M to obtain its opposition population OM, and then the initial moth population M is merged with its opposition population OM to obtain the expanded initial moth population M.
[0067] (3) Beneficial effects
[0068] The present invention provides a method and system for scheduling maintenance personnel for preemptible tasks on marine power equipment. Compared with the existing technology, it has the following advantages:
[0069] 1. The present invention, while considering the two constraints of task preemption and limited resources of multi-skilled personnel, constructs a ship power equipment maintenance task scheduling model with the goal of minimizing the maximum completion time of the ship power equipment maintenance task scheduling project, and then solves the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain a scheduling result, and executes the scheduling of the ship power equipment maintenance task based on the scheduling result. The present invention first simultaneously considers multiple constraints such as task preemption and limited resources of multi-skilled personnel, which is more in line with the actual ship power equipment maintenance scenario, making the ship power equipment maintenance task scheduling result more accurate; secondly, an improved moth-to-flame algorithm is proposed for solving the ship power equipment maintenance task scheduling model to obtain a scheduling result, and the solution result is more accurate and efficient. In general, compared with the existing technology, the present invention is more accurate and efficient in realizing ship power equipment maintenance task scheduling, reduces enterprise costs, and improves resource utilization.
[0070] 2. The present invention embeds an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm to improve the standard moth-to-fire algorithm. The ship power equipment maintenance task scheduling model is solved based on this improved moth-to-fire algorithm. On the one hand, it can quickly converge to an approximate optimal solution in a relatively short time, making the ship power equipment maintenance task scheduling more accurate; secondly, the time required to solve large-scale data is also relatively ideal, and compared with existing heuristic algorithms or intelligent optimization algorithms, the solution is more efficient.
[0071] 3. The present invention adopts random strategy and preset heuristic rules to generate the initial moth population, which can improve the quality of the initial solution, increase the search speed, and has strong applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0073] Figure 1 This is a schematic diagram of scheduling maintenance tasks for ship power equipment in the present invention;
[0074] Figure 2 This is a schematic diagram of a scheduling scheme when task preemption is not considered in the present invention;
[0075] Figure 3 A schematic diagram of a scheduling scheme considering task preemption in the present invention;
[0076] Figure 4 Schematic diagram of heuristic rule 3 in an embodiment of the present invention;
[0077] Figure 5 The flowchart of solving the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0078] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0079] The embodiments of the present application provide a method and system for scheduling preemptible task maintenance personnel for ship power equipment, thereby solving the problem that existing ship power equipment maintenance task scheduling technologies are unable to accurately and efficiently obtain task scheduling results when considering multiple constraints. This achieves the purpose of obtaining a scientific and reasonable maintenance task scheduling plan for ship main power equipment, thereby reducing maintenance cycles and improving the competitiveness of shipyard enterprises.
[0080] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:
[0081] To achieve more scientific, reasonable, accurate, and efficient scheduling of ship power equipment maintenance tasks, thereby reducing enterprise costs and improving resource utilization, the present invention constructs a ship power equipment maintenance task scheduling model with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects, while considering the two constraints of task preemption and limited multi-skilled personnel resources. The model is then solved based on an improved moth-to-flame algorithm to obtain a final scheduling result, and the scheduling of ship power equipment maintenance tasks is executed based on the final scheduling result. Compared with the existing technology, the present invention provides more accurate and efficient ship power equipment maintenance task scheduling results.
[0082] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0083] In the ship maintenance task scheduling problem studied, each multiskilled maintenance worker possesses multiple skills with specific proficiency levels and is responsible for different maintenance tasks. Each task also requires a given minimum skill level to execute; only multiskilled maintenance workers who possess the required skills and meet the minimum skill level can perform that task. Furthermore, each task can be preempted at discrete integer time points and restarted later. During the maintenance scheduling process, when an urgent task arrives, a multiskilled maintenance worker may interrupt their current task and switch to repairing more critical equipment.
[0084] It can be seen that the actual ship power equipment maintenance process is often more complicated: due to limited resources, after obtaining the ship power equipment maintenance task, the shipyard first sorts the tasks according to the order of priority, and then allocates multi-skilled maintenance personnel. In the process of allocating multi-skilled maintenance personnel, if it is found that a task can be preempted, the preempted sub-task will be reallocated to the multi-skilled maintenance personnel to shorten the construction period; at the same time, for the limited number of multi-skilled maintenance personnel, the multi-skilled maintenance personnel will be arranged on the appropriate maintenance tasks as scientifically and reasonably as possible. Specifically, the ship power equipment maintenance task scheduling process is as follows: Figure 1As shown in the figure, when a task is split into multiple subtasks after being preempted, arranging the order of task execution is a challenge. This is further complicated by the issue of coordinating personnel allocation for the preempted subtasks. Task preemption and personnel allocation can both affect the maximum completion time of the project.
[0085] like Figure 2-3 As shown in the figure, T1-T6 represent maintenance tasks, and there are tight precedence and tight follow-up constraints between tasks. R1-R3 represent multi-skilled maintenance personnel, and only those who have mastered the types of skills required for the task and met the minimum level requirements of the skills required for the task can be assigned to do the task. Figure 2 Indicates that the scheduling scheme does not consider preemption. Figure 3 Indicates a scheduling scheme that considers preemption. For example, T6 can only be executed after the immediate predecessor task T3 is completed, so person R2 is idle in the [0,1] time period. At time point 1, task T1 is preempted, splitting the two tasks T 1.1 and T 1.2 , and R2 meets the resource requirements of T1, so the preempted T 1.2 Assign it to R2, which not only improves the utilization rate of personnel but also shortens the project duration.
[0086] In addition, the Moth-Flame Optimization (MFO) algorithm is a heuristic search algorithm. Its principle is to abstract the process of a moth flying around a light source into an optimization process. The variable to be optimized is regarded as the position of the moth in space. By changing the position vector of the moth, it continuously iterates the optimization in multidimensional space to obtain the global optimal solution that meets the requirements.
[0087] Example 1:
[0088] In a first aspect, the present invention first proposes a method for scheduling maintenance personnel for preemptible tasks of ship power equipment, the method comprising:
[0089] S1. Considering the constraints including task preemption and coordinated allocation of multi-skilled maintenance personnel, a ship power equipment maintenance task scheduling model is constructed with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects.
[0090] S2. Solve the ship power equipment maintenance task scheduling model based on the improved moth-to-fire algorithm to obtain a scheduling result, and execute the scheduling of the ship power equipment maintenance task based on the scheduling result; the improved moth-to-fire algorithm includes: embedding an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm.
[0091] It can be seen that this embodiment, while considering the two constraints of task preemption and limited resources of multi-skilled personnel, constructs a ship power equipment maintenance task scheduling model with the goal of minimizing the maximum completion time of the ship power equipment maintenance task scheduling project, and then solves the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain a scheduling result, and executes the scheduling of the ship power equipment maintenance task based on the scheduling result. This embodiment firstly takes into account multiple constraints such as task preemption and limited resources of multi-skilled personnel at the same time, which is more in line with the actual ship power equipment maintenance scenario, making the ship power equipment maintenance task scheduling result more accurate; secondly, an improved moth-to-flame algorithm is proposed for solving the ship power equipment maintenance task scheduling model to obtain a scheduling result, and the solution result is more accurate and efficient. In general, compared with the existing technology, the present invention is more accurate and efficient in realizing ship power equipment maintenance task scheduling, reduces enterprise costs, and improves resource utilization.
[0092] The following is combined with Figure 1-5 , and an explanation of the specific steps S1-S2, to describe in detail the implementation process of an embodiment of the present invention.
[0093] S1. Considering the constraints including task preemption and coordinated allocation of multi-skilled maintenance personnel, a ship power equipment maintenance task scheduling model is constructed with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects.
[0094] Assume that there are G tasks waiting to be processed in the project, and the duration of each task is d g , S g and f g Indicates the start and completion time of the task. In addition, there are R people and K skills in the project. r Mastering Skills V k The proficiency is Q rk , Task T g Required Skills V k The lowest level is l gk The scheduling process allows tasks to be preempted at discrete points in time.
[0095] Based on this, a ship power equipment maintenance task scheduling model is constructed with the goal of minimizing the maximum completion time of the ship power equipment maintenance task scheduling project. Among them, the objective function of the ship power equipment maintenance task scheduling model is:
[0096] MinC max =max{f g , g∈G}
[0097] Among them, C maxrepresents the maximum completion time of the project, that is, the task with the largest completion time among all tasks; g represents the task, G represents the task set, g∈G; f g Indicates the time from the start to the completion of the task, that is, the duration d of each task g and start time S g sum.
[0098] S2. Solve the ship power equipment maintenance task scheduling model based on the improved moth-to-fire algorithm to obtain a scheduling result, and execute the scheduling of the ship power equipment maintenance task based on the scheduling result; the improved moth-to-fire algorithm includes: embedding an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm.
[0099] The standard MFO algorithm has a fast convergence speed, a simple overall structure, and is easy to understand, so it is often used to solve many practical problems. However, when the standard MFO algorithm is applied to the optimization of high-dimensional and multi-dimensional modal functions, it is prone to falling into local optimality, which ultimately leads to algorithm slowdown or even stagnation.
[0100] In this embodiment, the ship power equipment maintenance task scheduling problem, while taking into account the preemptibility of tasks, further focuses on the constraints of multi-skilled personnel in large-scale problems. As the number of constraints increases, the search space is accompanied by a "combinatorial explosion" phenomenon. Relying solely on intelligent optimization algorithms can only obtain satisfactory solutions for large-scale problems, and it is extremely time-consuming. Based on this, this embodiment proposes an improved moth-to-flame algorithm to solve the ship power equipment maintenance task scheduling model. Figure 4 ,When using the improved moth-to-flame algorithm to solve the ship power equipment maintenance task scheduling model, the specific process is as follows:
[0101] Step 1: Initialize the relevant parameters of the MFO algorithm, including: logarithmic spiral shape constant b, random number t between [-1, 1], maximum number of iterations Max_iter, number of flames Flame_no, number of moths n and dimension d.
[0102] Step 2: Use the opposition-based learning strategy to expand the initial moth population M to obtain its opposition population OM, and merge the M and OM populations. At this time, the number of the initial moth population M is 2n. Sort the fitness values corresponding to each moth individual in the expanded moth population in descending order, and select the population corresponding to the top n solutions with the highest fitness values as the sorted initial moth population as the initial population for the following iteration.
[0103] Among them, the number of moth population is n, and the dimension is d, that is, n rows and d columns. Each row corresponds to a moth, that is, a moth individual. Calculating the fitness value of each moth is the feasible solution of the moth individual. The solutions of all moths constitute the solution space of the entire moth population.
[0104] Specifically:
[0105] 1) A random strategy and preset heuristic rules are used to generate the initial moth population M of the MFO algorithm.
[0106] When generating the initial moth population M, the task-personnel double linked list structure is used to encode the problem being studied, where the vector π 1 Represents the task execution order list, π 2 Represents the corresponding personnel allocation linked list. Each element in the linked list is a random number between 0 and 1, and the total number of elements in each linked list is equal to the sum of the durations of the relevant tasks. The specific steps of the process of generating the initial moth population M are as follows:
[0107] S211: Initialize the number of moths in the population M to n, calculate the task flexibility of each task and sort them in descending order;
[0108] S212: Generate a task list using heuristic rule 1, and the remaining n-1 solutions are generated by random strategies.
[0109] Heuristic Rule 1 states: For resource-constrained project scheduling with preemptive multi-skilled workers, when two tasks conflict, prioritizing the task with less flexibility can shorten the project's maximum completion time. Task flexibility refers to the total number of workers who can perform the task.
[0110] S213: Calculate the scarcity of each multi-skilled maintenance worker and sort them in descending order;
[0111] S214: Use heuristic rule 2 to generate a multi-skill maintenance personnel allocation list corresponding to the task list, and the remaining n-1 solutions are generated by random strategies.
[0112] Heuristic Rule 2 states: For the resource-constrained project scheduling problem involving preemptive multi-skilled workers, when two workers have a task conflict, the worker with the greater scarcity should be scheduled first to shorten the project completion time. Scarcity refers to the sum of the scarcity values of the skills possessed by the worker.
[0113] S215: Combine heuristic rule 3 and the serial scheduling generation mechanism to obtain the maximum completion time of the project and output a moth solution.
[0114] Among them, heuristic rule 3 is: For the resource-constrained project scheduling problem of preemptive multi-skilled personnel, assume that the idle time interval of the resource is earlier than the start time of the scheduled task. In this case, the duration of the project can be reduced by moving the assigned task to the left to the start time of the assigned resource idle time, as shown in the following example. Figure 5As shown, suppose there are two available resources R in a project a and R b , and three tasks A i′ 、A j′ and A k′ Task A i′ It's A j′ The predecessor of Task A i′ The duration of task A is not less than k′ duration. When scheduling A k′ If the serial scheduling mechanism is followed, it will be directly arranged in d i′ +d j′ At first, but because A i′ 、A j′ It is a parallel task with no tight precedence constraints, and R b The idle time is greater than A k′ The construction period, so A k′ Move left to R b The starting moment of the idle time is determined to reduce the maximum completion time of the project.
[0115] 2) Adopt an opposition-based learning strategy to expand the initial moth population M.
[0116] Opposition-based learning (OBL) aims to help swarm intelligence algorithms achieve global optimization. By simultaneously considering the current moth population and its opposing population, the OBL strategy increases the likelihood of reaching the global optimal solution. Compared to the standard MFO algorithm, the OBL strategy improves the quality of the initial population. This allows the improved algorithm to enter the iteration process from a high-quality initial population, significantly improving the convergence speed of the algorithm in the initial stage and subsequently converging more quickly to the optimal solution.
[0117] Specifically, the opposition-based learning strategy OBL is used to operate the initial moth population M to obtain its opposition population OM, and then the initial moth population M is merged with its opposition population OM to obtain the expanded initial moth population M.
[0118] 3) Calculate the fitness value of the expanded initial moth population M and sort it, and select the top n solutions with the best fitness value as the initial population for the following iteration.
[0119] Step 3: Use the sorted moth population to update the flame F, calculate the fitness value of the flame population and sort it in the OF matrix, and select the best individual as the optimal solution Fbest.
[0120] Step 4: Determine whether all individuals have been updated. If i < n, proceed to step 5; otherwise, proceed to step 8; where i represents the sequence number of the moth in the current iteration, and n represents the number of moths in the population.
[0121] Step 5: Determine whether all dimensions of the moth individual in the current iteration have been updated. If j < d, proceed to step 7; if not, proceed to step 6; where j represents the dimension of the moth in the current iteration, and d represents the total dimension of the moth.
[0122] Step 6: Operate the Levy flight operator on the current feasible solution to obtain a new solution x new2 , compare x new2 with x i,j The fitness value of the selected value is retained as x i,j , go to step 8. The current feasible solution refers to the fitness value of the current moth individual.
[0123] Since the standard MFO algorithm follows the process of each individual moving to another position in the search space, when approaching the global optimum, the convergence speed slows down significantly and eventually gets stuck in the local optimum. By using a mutation strategy, a certain ambiguity is left in the process of transitioning to the next generation. Therefore, in this embodiment, a hybrid mutation operator based on sine, cosine and Levy flight is proposed. Based on the hybrid mutation operator, when the number of iterations of the improved MFO algorithm exceeds a certain number (such as 100 times in this embodiment), the convergence curve still shows a downward trend, which also shows that the improved MFO algorithm performs better in avoiding falling into the local optimum.
[0124] Step 7: Update parameters b, t using formula D i =|F j -M i | Calculate the distance between the moth and the flame using the updated flame F, formula S(M j , F j )=D i ·e bt ·cos(2πt)+F j To update the moth population M, we get a feasible solution x i,j , use the sine-cosine mutation operator to get the new solution x new1 , compare the fitness values of the two solutions and select the larger one as x i,j And go to step 8.
[0125] Step 8: Record the position of the moth and determine whether the iteration end condition is met. If so, return the fitness value and terminate the entire algorithm process; otherwise, return to step 2.
[0126] Step 9: Loop steps 2 to 8 until the preset loop termination condition is met, and output the maintenance task scheduling plan.
[0127] Repeat steps 2 to 8 above multiple times. If the target value no longer decreases or the number of iterations reaches the specified value, terminate the entire process and output the maintenance task scheduling plan, which includes the final maintenance task and personnel scheduling plan.
[0128] At this point, the entire process of the method for scheduling preemptible maintenance personnel for ship power equipment in this embodiment is completed.
[0129] Example 2:
[0130] In a second aspect, the present invention further provides a preemptible task maintenance personnel scheduling system for ship power equipment, the system comprising:
[0131] The scheduling model acquisition module is used to consider the constraints including task preemption and coordinated allocation of multi-skilled maintenance personnel, and to build a ship power equipment maintenance task scheduling model with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects;
[0132] A scheduling result acquisition module is used to solve the ship power equipment maintenance task scheduling model based on the improved moth-to-fire algorithm to obtain a scheduling result, and execute the scheduling of the ship power equipment maintenance task based on the scheduling result; the improved moth-to-fire algorithm includes: embedding an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm.
[0133] Optionally, the objective function of the ship power equipment maintenance task scheduling model in the scheduling model acquisition module is:
[0134] MinC max =max{f g , g∈G}
[0135] Among them, C max represents the maximum completion time of the project; g represents the task, G represents the task set, g∈G; f g Indicates the time from the start to the completion of a task.
[0136] Optionally, the block solves the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain a scheduling result including:
[0137] Step 1: Initialize the relevant parameters of the MFO algorithm, including: logarithmic spiral shape constant b, random number t, maximum number of iterations Max_iter, number of flames Flame_no, number of moths n and dimension d;
[0138] Step 2: Expand the initial moth population using an opposition-based learning strategy, sort the fitness values of each moth individual in the expanded moth population in descending order, and select the population corresponding to the top n solutions with the highest fitness values as the sorted initial moth population;
[0139] Step 3: Update the flame based on the sorted initial moth population, calculate the fitness value of the flame population and sort it, and select the best individual as the optimal solution;
[0140] Step 4: Determine whether all individuals have been updated. If i < n, proceed to step 5; otherwise, proceed to step 8. Here, i represents the sequence number of the moth in the current iteration, and n represents the number of moths in the population.
[0141] Step 5: Determine whether all dimensions of the moth individual in the current iteration have been updated. If j < d, proceed to step 7; if not, proceed to step 6. Where j represents the dimension of the moth in the current iteration, and d represents the total dimension of the moth.
[0142] Step 6: Operate the Levy flight operator on the current feasible solution to obtain a new solution x new2 , compare x new2 with x i,j The fitness value of the two is selected and retained as the new x i,j , go to step 8;
[0143] Step 7: Update parameters b, t using formula D i =|F j -M i | Calculate the distance between the moth and the flame using the updated flame F, formula S(M j , F j )=D i ·e bt ·cos(2πt)+F j To update the moth population M, we get a feasible solution x i,j , use the sine-cosine mutation operator to get the new solution x new1 , compare the fitness values of the two solutions and select the larger one as x i,j And go to step 8;
[0144] Step 8: Record the position of the moth and determine whether the iteration end condition is met. If so, return the fitness value and terminate the entire algorithm process; otherwise, return to step 2;
[0145] Step 9: Loop steps 2 to 8 until the preset loop termination condition is met, and the maintenance task scheduling plan is output; the preset loop termination condition includes: the target value no longer decreases or the number of iterations reaches the maximum number of iterations Max_iter.
[0146] Optionally, the initial moth population is obtained by:
[0147] The initial moth population is generated by adopting a random strategy and a preset heuristic rule; the preset heuristic rule includes heuristic rule 1, heuristic rule 2, and heuristic rule 3;
[0148] The specific process of generating the initial moth population using a random strategy and preset heuristic rules includes:
[0149] S211: Initialize the number of moths in the population M to n, calculate the task flexibility of each task and sort them in descending order;
[0150] S212: Generate a task list using heuristic rule 1, and the remaining n-1 solutions are generated by random strategy;
[0151] The heuristic rule 1 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two tasks have a resource conflict, the task with less task flexibility is scheduled first;
[0152] S213: Calculate the scarcity of each multi-skilled maintenance worker and sort them in descending order;
[0153] S214: Generate a multi-skill maintenance personnel allocation list corresponding to the task list using heuristic rule 2, and generate the remaining n-1 solutions using a random strategy;
[0154] The heuristic rule 2 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two employees have a task conflict, the employee with greater personnel scarcity is scheduled first;
[0155] S215: Combine heuristic rule 3 with the serial schedule generation mechanism to obtain the maximum completion time of the project and output a moth solution;
[0156] The heuristic rule 3 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, it is reasonable to assume that the idle time interval of the resource is earlier than the start time of the scheduling task.
[0157] Optionally, the operation of expanding the initial moth population by adopting the opposition-based learning strategy includes:
[0158] The opposition-based learning strategy is used to operate the initial moth population M to obtain its opposition population OM, and then the initial moth population M is merged with its opposition population OM to obtain the expanded initial moth population M.
[0159] It can be understood that the preemptible task maintenance personnel scheduling system for ship power equipment provided by the embodiment of the present invention corresponds to the above-mentioned preemptible task maintenance personnel scheduling method for ship power equipment. The explanations, examples, beneficial effects, etc. of the relevant contents can refer to the corresponding contents in the preemptible task maintenance personnel scheduling method for ship power equipment, and will not be repeated here.
[0160] In summary, compared with the existing technology, the present invention has the following beneficial effects:
[0161] 1. The present invention, while considering the two constraints of task preemption and limited resources of multi-skilled personnel, constructs a ship power equipment maintenance task scheduling model with the goal of minimizing the maximum completion time of the ship power equipment maintenance task scheduling project, and then solves the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain a scheduling result, and executes the scheduling of the ship power equipment maintenance task based on the scheduling result. The present invention first simultaneously considers multiple constraints such as task preemption and limited resources of multi-skilled personnel, which is more in line with the actual ship power equipment maintenance scenario, making the ship power equipment maintenance task scheduling result more accurate; secondly, an improved moth-to-flame algorithm is proposed for solving the ship power equipment maintenance task scheduling model to obtain a scheduling result, and the solution result is more accurate and efficient. In general, compared with the existing technology, the present invention is more accurate and efficient in realizing ship power equipment maintenance task scheduling, reduces enterprise costs, and improves resource utilization.
[0162] 2. The present invention embeds an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm to improve the standard moth-to-fire algorithm. The ship power equipment maintenance task scheduling model is solved based on this improved moth-to-fire algorithm. On the one hand, it can quickly converge to an approximate optimal solution in a relatively short time, making the ship power equipment maintenance task scheduling more accurate; secondly, the time required to solve large-scale data is also relatively ideal, and compared with existing heuristic algorithms or intelligent optimization algorithms, the solution is more efficient.
[0163] 3. The present invention adopts random strategy and preset heuristic rules to generate the initial moth population, which can improve the quality of the initial solution, increase the search speed, and has strong applicability.
[0164] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0165] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for scheduling maintenance personnel for preemptible tasks of ship power equipment, characterized in that: The method comprises: Considering the constraints including task preemption and coordinated allocation of multi-skilled maintenance personnel, a ship power equipment maintenance task scheduling model is constructed with the goal of minimizing the maximum completion time of ship power equipment maintenance task scheduling projects. Solving the ship power equipment maintenance task scheduling model based on an improved moth-to-fire algorithm to obtain a scheduling result, and executing the scheduling of the ship power equipment maintenance task based on the scheduling result; the improved moth-to-fire algorithm includes: embedding an opposition-based learning strategy and a hybrid mutation operator into the moth-to-fire algorithm; Among them, embedding the adversarial learning strategy and hybrid mutation operator into the moth-to-flame algorithm includes: The initial moth population M is operated by the opposition-based learning strategy to obtain its opposition population OM, and then the initial moth population M is merged with its opposition population OM to obtain the expanded initial moth population M; Use the sine-cosine mutation operator to obtain a new solution x in the moth-to-flame algorithm new1 ; In the moth-to-fire algorithm, a random strategy and preset heuristic rules are used to generate an initial moth population; the preset heuristic rules include heuristic rule 1, heuristic rule 2, and heuristic rule 3; The specific process of generating the initial moth population using a random strategy and preset heuristic rules includes: S211: Initialize the number of moths in the population M to n, calculate the task flexibility of each task and sort them in descending order; S212: Generate a task list using heuristic rule 1, and the remaining n-1 solutions are generated by random strategy; The heuristic rule 1 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two tasks have a resource conflict, the task with less task flexibility is scheduled first; S213: Calculate the scarcity of each multi-skilled maintenance worker and sort them in descending order; S214: Generate a multi-skill maintenance personnel allocation list corresponding to the task list using heuristic rule 2, and generate the remaining n-1 solutions using a random strategy; The heuristic rule 2 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, when two employees have a task conflict, the employee with greater personnel scarcity is scheduled first; S215: Combine heuristic rule 3 with the serial schedule generation mechanism to obtain the maximum completion time of the project and output a moth solution; The heuristic rule 3 is: for resource-constrained project scheduling of preemptive multi-skilled personnel, it is reasonable to assume that the idle time interval of the resource is earlier than the start time of the scheduling task.
2. The method according to claim 1, wherein The objective function of the ship power equipment maintenance task scheduling model is: MinC max =max{f g ,g∈G} Among them, C max represents the maximum completion time of the project; g represents the task, G represents the task set, g∈G; f g Indicates the time from the start to the completion of a task.
3. The method according to claim 1, wherein Solving the ship power equipment maintenance task scheduling model based on the improved moth-to-flame algorithm to obtain a scheduling result includes: Step 1: Initialize the relevant parameters of the MFO algorithm, including: logarithmic spiral shape constant b, random number t, maximum number of iterations Max_iter, number of flames Flame_no, number of moths n and dimension d; Step 2: Expand the initial moth population using the opposition-based learning strategy, sort the fitness values corresponding to each moth individual in the expanded moth population in descending order, and select the population corresponding to the top n solutions with higher fitness values as the sorted initial moth population; Step 3: Update the flames based on the sorted initial moth population, calculate and sort the fitness values of the flame population, and select the best individual as the optimal solution; Step 4: Determine whether all individuals have been updated. If i < n holds, proceed to Step 5; otherwise, proceed to Step 8. Here, i represents the serial number of the moth in the current iteration, and n represents the number of moths in the population; Step 5: Determine whether all dimensions of the moth individual in the current iteration have been updated. If j < d holds, proceed to Step 7; if not, proceed to Step 6. Here, j represents the dimension of the moth in the current iteration, and d represents the total dimension of the moth; Step 6: Operate the Levy flight operator on the current feasible solution to obtain a new solution x new2 , compare x new2 with x i,j The fitness value of the two is selected and retained as the new x i,j , go to step 8; Step 7: Update parameters b, t using formula D i =|F j -M i | Calculate the distance between the moth and the flame using the updated flame F, formula S(M j ,F j )=D i ·e bt cos(2π)+F j To update the moth population M, we get a feasible solution x i,j , use the sine-cosine mutation operator to get the new solution x new1 , compare the fitness values of the two solutions and select the larger one as x i,j And go to step 8; Step 8: Record the positions of the moths, determine whether the iteration end condition is satisfied. If it holds, return the fitness value and terminate the entire algorithm process; otherwise, return to Step 2; Step 9: Loop through Steps 2 - Step 8 until the preset loop termination condition is met, ending the loop process and outputting the maintenance task scheduling plan. The preset loop termination conditions include: the target value no longer decreases or the number of iterations reaches the maximum number of iterations Max_iter.
4. A preemptive maintenance personnel scheduling system for ship power equipment, characterized in that: The system includes: A scheduling model acquisition module, which is used to construct a ship power equipment maintenance task scheduling model with the goal of minimizing the makespan of the ship power equipment maintenance task scheduling project considering constraint conditions including task preemption and coordinated allocation of multi-skilled maintenance personnel; A scheduling result acquisition module, which is used to solve the ship power equipment maintenance task scheduling model based on the improved moth-flame algorithm to obtain scheduling results, and perform the scheduling of ship power equipment maintenance tasks based on the scheduling results. The improved moth-flame algorithm includes: embedding the opposition-based learning strategy and the hybrid mutation operator into the moth-flame algorithm; Among them, embedding the opposition-based learning strategy and the hybrid mutation operator into the moth-flame algorithm includes: Operating on the initial moth population M using the opposition-based learning strategy to obtain its opposite population OM, and then merging the initial moth population M with its opposite population OM to obtain the expanded initial moth population M; Use the sine-cosine mutation operator to obtain a new solution x in the moth-to-flame algorithm new1 ; In the moth-flame algorithm, a random strategy and preset heuristic rules are used to generate the initial moth population. The preset heuristic rules include Heuristic Rule 1, Heuristic Rule 2, and Heuristic Rule 3; The specific process of generating the initial moth population using a random strategy and preset heuristic rules includes: S211: Initialize the number of moths in the population M as n, calculate the task flexibility of each task and sort it in descending order; S212: Use Heuristic Rule 1 to generate a task list, and the remaining n - 1 solutions are generated by the random strategy; Among them, Heuristic Rule 1 is: for the resource-constrained project scheduling of preemption-type multi-skilled personnel, when resource conflicts occur between two tasks, the task with smaller task flexibility is preferentially scheduled; S213: Calculate the personnel scarcity of each multi-skilled maintenance personnel and sort it in descending order; S214: Generate a multi - skilled maintenance personnel allocation list corresponding to the task list using heuristic rule 2, and the remaining n - 1 solutions are generated by random strategy; Among them, the heuristic rule 2 is: for the resource - constrained project scheduling personnel allocation of pre - emptive multi - skilled personnel, when there is a task conflict between two employees, the employee with a greater personnel scarcity is scheduled first; S215: Combine heuristic rule 3 and serial scheduling generation mechanism to obtain the maximum completion time of the project and output a solution of the moth; Among them, the heuristic rule 3 is: for the resource - constrained project scheduling personnel allocation of pre - emptive multi - skilled personnel, reasonably assume that the idle time interval of resources is earlier than the start time of the scheduling task.
5. The system according to claim 4, wherein: The objective function of the ship power equipment maintenance task scheduling model in the scheduling model acquisition module is: MinC max =max{f g ,g∈G} Among them, C max represents the maximum completion time of the project; g represents the task, G represents the task set, g∈G; f g Indicates the time from the start to the completion of a task.
6. The system according to claim 4, wherein: The scheduling result acquisition module solves the ship power equipment maintenance task scheduling model based on the improved moth - flame algorithm to obtain the scheduling result, including: Step 1: Initialize the relevant parameters of the MFO algorithm. The relevant parameters include: logarithmic spiral shape constant b, random number t, maximum number of iterations Max_iter, number of flames Flame_no, number of moths n, and dimension d; Step 2: Use the opposition - based learning strategy to expand the initial moth population. Sort the fitness values corresponding to each moth individual in the expanded moth population in descending order, and select the population corresponding to the top n solutions with the best fitness values as the sorted initial moth population; Step 3: Update the flames based on the sorted initial moth population, calculate the fitness values of the flame population and sort them, and select the best individual as the optimal solution; Step 4: Judge whether all individuals have been updated. If i < n holds, then enter Step 5; otherwise, enter Step 8. Here, i represents the serial number of the moth in the current iteration, and n represents the number of moths in the population; Step 5: Judge whether all dimensions of the moth individual in the current iteration have been updated. If j < d holds, then enter Step 7; if not, enter Step 6. Here, j represents the dimension of the moth in the current iteration, and d represents the total dimension of the moth; Step 6: Operate the Levy flight operator on the current feasible solution to obtain a new solution x new2 , compare x new2 with x i,j The fitness value of the two is selected and retained as the new x i,j , go to step 8; Step 7: Update parameters b, t using formula D i =|F j -M i | Calculate the distance between the moth and the flame using the updated flame F, formula S(M j ,F j )=D i ·e bt cos(2π)+F j To update the moth population M, we get a feasible solution x i,j , use the sine-cosine mutation operator to get the new solution x new1 , compare the fitness values of the two solutions and select the larger one as x i,j And go to step 8; Step 8: Record the position of the moth, judge whether the iteration end condition is met. If it holds, return the fitness value and terminate the entire algorithm process; otherwise, return to Step 2; Step 9: Loop Steps 2 - Step 8 until the preset loop termination condition is met, and then end the loop process and output the maintenance task scheduling plan. The preset loop termination condition includes: the target value no longer decreases or the number of iterations reaches the maximum number of iterations Max_iter.