Nursing personnel periodic scheduling method based on two-stage heuristic algorithm
The two-stage heuristic algorithm and ant colony algorithm are used to optimize the nursing path, which solves the problem of service date allocation and interval requirements in the periodic scheduling of community nursing staff, achieves efficient allocation of nursing resources and reduces costs, and improves service efficiency.
Patent Information
- Application Number
- CN202410720476.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
AI Technical Summary
In the periodic scheduling of community nursing staff, how to rationally allocate and schedule nursing resources to meet multi-day service needs, especially the allocation and interval requirements of service dates, is difficult to effectively solve with existing technology, resulting in high operating costs and low efficiency.
A periodic scheduling method for nursing staff based on a two-stage heuristic algorithm is adopted. By constructing a periodic scheduling model for community nursing staff, the improved ant colony algorithm is used to optimize the nursing path, taking into account service time intervals and cost minimization, and combining ESS strategies and dynamic programming ideas. , determine the date combination and care path for the person being served.
It effectively reduces the operating costs of community care centers, improves the efficiency of door-to-door services, meets customer needs, and provides an optimized solution for nursing staff.
Smart Images

Figure CN118737398A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of precise allocation of medical service resources, and in particular relates to a method for periodic scheduling of nursing staff based on a two-stage heuristic algorithm. Background Art
[0002] At present, the care of the elderly population mainly adopts nursing homes and community care models. The community care model is increasingly popular among the elderly due to its advantages such as home living and good living atmosphere. However, with the continuous growth of community care demand, how to reasonably allocate and dispatch care resources has become an urgent problem to be solved.
[0003] The periodic scheduling of community care workers involves multi-day service plans to address the needs of customers who need to receive multiple services within a week or a month. In multi-period research, the allocation of service dates is a key issue. In some literature, the allocation of service dates is fixed, providing corresponding services within the specified time or using date preferences to determine the service dates that customers are willing to accept. Some studies have proposed considering the uniform distribution of service dates. Most of these studies are predefined service combinations, and a few studies consider service interval constraints. In some papers, the constraints set ensure that the visit dates are distributed within a week, avoiding the provision of services on two consecutive days or stipulating that the shifts of nurses must be at least 9 hours apart. In addition, in terms of allocation strategies, most papers achieve allocation by balancing the workload or work tasks of care workers. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a method that can consider the service time interval to determine the date combination of the service object, and optimize the nursing path of each day by using the improved ant colony algorithm to minimize the overall cost. This method can improve the efficiency of door-to-door service, reduce the operating cost of community nursing centers, and provide a basis for community nursing centers to formulate nursing staff paths.
[0005] The present invention specifically provides a nursing staff periodic scheduling method based on a two-stage heuristic algorithm, comprising the following steps:
[0006] Step 1: Considering the interval service demand, a periodic scheduling model for community nursing staff is constructed;
[0007] Step 2: Based on the periodic scheduling model of community nursing staff, a two-stage heuristic algorithm is designed to solve the problem and obtain the nursing staff scheduling plan.
[0008] In step 1, the objective function of the community nursing staff periodic scheduling model is:
[0009]
[0010] The objective function is used to minimize the sum of the path cost, the fixed cost of the nursing staff, and the penalty cost for lateness, where ct, cc, and cp are the unit time cost, the fixed cost of the nursing staff, and the penalty cost per unit time, respectively. ijct represents the 0-1 decision variable for caregiver c to transfer from client i to client j on day t, u ct w is a 0-1 decision variable indicating that the nursing staff c is served on day t; ict is the delay time cost of caregiver c at customer point i within t days; D represents the date set, C represents the caregiver set, P represents the set of scheduled customers, where customer point i and customer point j are both from the set P, and A represents the set of arcs A={(i,j)|i∈N,j∈N,i≠j}.
[0011] In step 1, the following constraints are set for the objective function:
[0012]
[0013] T oct =0 (11)
[0014]
[0015]
[0016] w ict ≥0 (17)
[0017] Among the above constraints:
[0018] Constraint (1) means that each customer can be served at most once a day;
[0019] Constraint (2) means that the number of times served within the decision cycle must be equal to the frequency of demand;
[0020] Constraint (3) means x ijct and jct The relationship between the two;
[0021] Constraints (4) and (5) indicate that the caregiver departs from the community care center and returns to the community care center.
[0022] Constraint (6) means that y ict and u ct The relationship between the two,
[0023] Constraint (7) states that the inflow is balanced;
[0024] Constraints (8) and constraints (17) refer to the delay time of the nursing staff;
[0025] Constraint (9) refers to the transitive relationship between the caregiver and the client. When going from client point i to client point j, M(1-x ijct )=0, the starting time of customer point j must be greater than or equal to the time to reach j. When there is no time from customer point i to customer point j, M(1-x ijct )=M, the equation always holds true;
[0026] Constraints (10) refer to the limited working hours of nursing staff every day;
[0027] Constraint (11) means ensuring that the departure time of each caregiver from the community care center is 0;
[0028] Constraint (12) refers to the condition that each service date interval satisfies, requiring that customer i be served within k and m days, that is, and The service date interval is greater than or equal to Where T is the number of days of the cycle, k>m;
[0029] Constraints (13)(14)(15)(16) define the range of values of the variables;
[0030] The problem is described using a complete graph G = (N, A), where the point set N = P ∪ {0, |p+1|}, where 0 and |p+1| both represent a nursing center, the arc set A = {(i, j) | i∈N, j∈N, i≠j}, the date set D is {1, 2, …, T}, where T represents the number of days in the cycle, P represents the set of scheduled customers, C represents the set of nursing staff, R represents the maximum working time of the nursing staff per day, and f i represents the frequency of customer point i receiving service in a cycle, [e i ,l i ] represents the starting service time window range of customer point i, t ij represents the path time between customer point i and customer point j, s i represents the service time required for each service of customer point i, x ijct represents the 0-1 decision variable for caregiver c to go from customer point i to customer point j on day t, x ojct represents the 0-1 decision variable for the caregiver c to travel from the care center to customer point j on day t, x ioct represents the 0-1 decision variable for caregiver c to go from customer point i to the care center on day t; x jict represents the decision variable of the caregiver c from customer point j to customer point i on day t; y ict represents the 0-1 decision variable for the caregiver c to serve customer point i on day t; T ict represents the service start time when the caregiver c arrives at the customer point i on day t, w ictrepresents the delay time cost of caregiver c at customer point i within t days; u ct A 0-1 decision variable indicating that caregiver c was served on day t.
[0031] Step 2 includes the following steps:
[0032] Step 2-1, the first stage: Under the condition of considering the service time interval, determine the date combination of the service object based on the strategy of expanding the solution space ESS;
[0033] Step 2-2, the second stage: Adopt the decoding method based on dynamic programming ideas and use the improved ant colony algorithm to optimize the nursing path for each day.
[0034] Step 2-1 includes the following steps:
[0035] Step 2-1-1, construct T sets, which are sequentially represented as the first service set, the second service set, ..., the Tth service set;
[0036] Step 2-1-2: The time interval between the i-th service set and the 1st, ..., i-1st service set is greater than or equal to sky;
[0037] Step 2-1-3, find all the m service sets, the first service set is arranged on the first day, and the second service set is arranged on the The third service is scheduled on the Days, the mth service is arranged in the sky;
[0038] Step 2-1-4, randomly arrange the remaining Tm service sets on the remaining Tm days, ensuring that one set is arranged per day;
[0039] Step 2-1-5, arrange the n service requirements of customer j into the first service set, ..., the nth service set in sequence, and obtain the service date combination of customer j according to the date of the set.
[0040] Step 2-2 includes the following steps:
[0041] Step 2-2-1, set the maximum number of iterations MaxIter of the ant colony algorithm, the initial information heuristic factor α, the initial expected heuristic factor β, the initial value of the initial pheromone volatility coefficient ρ, the initial number of ants m and the initial pheromone constant Q;
[0042] Step 2-2-2, for each ant, use the roulette strategy to select the next node according to the pheromone concentration and heuristic information until all ants have walked all paths;
[0043] Step 2-2-3, apply the path segmentation strategy to decode the path sequence constructed by each ant, evaluate the quality of the solution obtained, and record the best solution in the current iteration;
[0044] Step 2-2-4, apply the neighborhood search strategy to the optimal solution of the current iteration, randomly select a neighborhood search method, if the new solution in the neighborhood is worse than the current optimal solution, update the optimal solution, if the new solution is not as good as the current solution, continue to select the current solution as the optimal solution;
[0045] Step 2-2-5, evaporate the pheromone values on all paths, and update the pheromone concentration on the path according to the paths of all ants in this iteration;
[0046] Step 2-2-6, determine whether the algorithm has reached the maximum number of iterations MaxIter, if so, output the best solution currently found, if not, update Iter = Iter + 1, and jump to step 2-2-2.
[0047] In step 2-2-3, the path segmentation strategy includes the following steps:
[0048] Step 2-2-3-1, for a given order of n nodes, define two labels V[i] and P[i] for each node, V[i] represents the minimum total cost to reach node i, that is, the sum of the minimum path cost, fixed cost of the nursing staff, and penalty cost of the late time window generated when node i and the nodes before node i are all visited and the nursing staff have all returned to node 0; P[i] represents the direct predecessor node of node i in the minimum total cost path; node 0 is the nursing center;
[0049] Step 2-2-3-2, initialization: let V[i]=∞, V[0]=0, P[i]=i-1, i=1;
[0050] Step 2-2-3-3, initialize the nursing staff’s working time worktime = 0, cost cost = 0, and set j = i;
[0051] Step 2-2-3-4, evaluate the improvement from node i-1 to node j, j = i, ..., n;
[0052] Step 2-2-3-5, update the nursing staff working time at node j, the formula is worktime = worktime + s j ; j = i, ..., n;
[0053] Step 2-2-3-6, update the cost at node j, if j==i, that is, if j is equal to i, then execute step 2-2-3-7, if j>i, then execute step 2-2-3-8, until the route division of node i and its successor nodes is completed;
[0054] Step 2-2-3-7, when j==i, that is, when j is determined to be equal to i, update the cost: cost=cost+X1, where X1 represents the round-trip cost from node 0 to node i;
[0055] Step 2-2-3-8, when j>i, then update the cost: cost=cost+X2, where X2 represents the cost of the sub-route (0,i,i+1,.,j-1,j,0);
[0056] Step 2-2-3-9, if worktime<=X3 and V[j]>V[i-1]+cost, then V[j]=V[i-1]+cost, p[j]=i-1; X3 represents the maximum working time;
[0057] Step 2-2-3-10, determine whether the routing splitting of node i and the successor node is completed. If worktime>X3 or j>n, then i=i+1, and go to step 2-2-3-3; otherwise, j=j+1, and go to step 2-2-3-5;
[0058] Step 2-2-3-11, if i>n, the iteration terminates, otherwise i=i+1 and goes to step 2-2-3-3.
[0059] In step 2-2-4, the neighborhood search method includes 2-opt operator, Or-opt operator, and Exchange operator;
[0060] The 2-opt operator includes: selecting two endpoints in the path and reversing the subpath between the two points to generate a new solution;
[0061] The Or-opt operator includes: extracting a subpath containing one, two or three consecutive nodes from the current path and inserting it into all possible positions in the path except the atomic path position;
[0062] The Exchange operator includes: exchanging two different nodes in the current route.
[0063] Step 2-2-5 includes:
[0064] Pheromone volatilization: After each iteration, use τ ij (t) represents the pheromone value between i and j at time t, and the formula is:
[0065] τij (t+1)=(1-ρ)·τ ij (t)
[0066] Pheromone increase: When the ants complete the path search, the pheromone concentration is updated according to the path the ants have taken. The formula is as follows:
[0067]
[0068] where Δτ ij is the additional pheromone, Q is a constant, indicating the fixed value of the pheromone carried by the ant; L k represents the path taken by ant k in this iteration;
[0069] Add extra pheromone rewards: After updating the pheromone values of all paths, add an extra reward value Q for the optimal path. bestroute , where bestroute is the optimal path length.
[0070] The present invention also provides a storage medium storing a computer program or instruction. When the computer program or instruction is run on a computer, the steps of the nursing staff periodic scheduling method based on a two-stage heuristic algorithm are executed.
[0071] The present invention has the following beneficial effects:
[0072] In the present invention, the scheduling method and system take into account the interval service demand, and construct a community nursing staff periodic scheduling model taking into account the interval service demand; based on the community nursing staff periodic scheduling model, the model aims to minimize the sum of the path cost, the nursing staff fixed cost and the penalty cost of the late time window, and on this basis, a two-stage heuristic algorithm is designed to solve it: the first stage is to design the ESS strategy, considering the conditions of the service time interval to determine the date combination of the service object; the second stage adopts the decoding method of dynamic programming ideas, and uses the improved ant colony algorithm to optimize the nursing path for each day. The proposed model and algorithm can quickly and effectively solve the nursing staff scheduling problem in the field of elderly care, effectively reduce the cost of community nursing centers, and effectively meet the needs of customers. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0074] Figure 1 The figure is a flowchart of the steps of the algorithm-based periodic family medical staff scheduling method in an embodiment of the present invention.
[0075] Figure 2This is the convergence diagram of the three algorithms using ESS strategy-IACO, HCC (balanced daily task allocation)-IACO and ESS-ACO in the invention with a scale of 100 examples.
[0076] Figure 3 Flowchart of a two-stage algorithm flow chart in an embodiment of the present invention.
[0077] Figure 4 This is the route map for Caregiver A of the present invention on Monday. DETAILED DESCRIPTION
[0078] like Figure 1 As shown, in one embodiment of the present invention, the present invention provides a nursing staff periodic scheduling method based on a two-stage heuristic algorithm, comprising the following steps:
[0079] S1: Construct a periodic scheduling model for community nursing staff considering interval service demand;
[0080] The objective function expression of the periodic scheduling model for community nursing staff considering the interval service demand in step S1 is as follows:
[0081]
[0082] The objective function is used to minimize the sum of the path cost, the fixed cost of the nursing staff, and the penalty cost for lateness, where ct, cc, and cp are the unit time cost, the fixed cost of the nursing staff, and the penalty cost per unit time, respectively. ijct represents the 0-1 decision variable for caregiver c to transfer from client i to client j on day t, u ct represents the 0-1 decision variable that caregiver c is served on day t, w ict is the delay time cost of caregiver c at customer point i within t days, D represents the date set, C represents the caregiver set, P represents the appointment customer set, where customer point i and customer point j are both from this set, and A represents the arc set A={(i,j)|i∈N,j∈N,i≠j}.
[0083] The objective function setting condition constraints of the community nursing staff periodic scheduling model considering the interval service demand in step S1 are as follows:
[0084]
[0085] T oct =0 (11)
[0086]
[0087] w ict ≥0 (17)
[0088] Among the above constraints:
[0089] Constraint (1) means that each customer can be served at most once a day;
[0090] Constraint (2) means that the number of times served within the decision cycle must be equal to the frequency of demand;
[0091] Constraint (3) means x ijct and jct The relationship between the two;
[0092] Constraints (4) and (5) indicate that the caregiver departs from the community care center and returns to the community care center.
[0093] Constraint (6) means that y ict and u ct The relationship between the two,
[0094] Constraint (7) states that the inflow is balanced;
[0095] Constraints (8) and constraints (17) refer to the delay time of the nursing staff;
[0096] Constraint (9) refers to the transitive relationship between the caregiver and the client. When going from client point i to client point j, M(1-x ijct )=0, the starting time of customer point j must be greater than or equal to the time to reach j. When there is no time from customer point i to customer point j, M(1-x ijct )=M, the equation always holds true.
[0097] Constraints (10) refer to the limited working hours of nursing staff every day;
[0098] Constraint (11) means ensuring that the departure time of each caregiver from the community care center is 0;
[0099] Constraint (12) refers to the condition that each service date interval satisfies, requiring customer i to be served within two days k, m (k>m), that is, and The service date interval is greater than or equal to Where T is the number of days in the cycle.
[0100] Constraints (13)(14)(15)(16) define the range of values of the variables;
[0101] The problem is described using a complete graph G = (N, A). The point set N = P ∪ {0, |p+1|}, where 0 and |p+1| both represent a nursing center, the arc set A = {(i, j) | i∈N, j∈N, i≠j}, the date set D is {1, 2, ..., T}, T represents the number of days in the cycle, P represents the set of appointment customers, C represents the set of nursing staff, R represents the maximum working time of the nursing staff every day, and f i represents the frequency of customer point i receiving service in a cycle, [e i ,l i ] represents the starting service time window range of customer point i, t ij represents the path time between customer point i and customer point j, s i represents the service time required for each service of customer point i, x ijct represents the 0-1 decision variable for caregiver c to go from customer point i to customer point j on day t, x ojct represents the 0-1 decision variable for the caregiver c to travel from the care center to customer point j on day t, x ioct represents a 0-1 decision variable for caregiver c to go from customer point i to the care center on day t. jict represents the decision variable for caregiver c to go from customer point j to customer point i on day t. ict T represents the 0-1 decision variable for the caregiver c to serve customer point i on day t. ict represents the service start time when the caregiver c arrives at the customer point i on day t, w ict represents the delay time cost of caregiver c at customer point i within t days. ct A 0-1 decision variable indicating that caregiver c is served on day t;
[0102] S2: Based on the periodic scheduling model of community nursing staff, a two-stage heuristic algorithm is designed to solve and obtain the nursing staff scheduling plan;
[0103] like Figure 3 As shown, step S2 includes the following steps:
[0104] S21: In the first stage, the date combination of the service object is determined based on the strategy of expanding the solution space ESS under the condition of considering the service time interval;
[0105] The step S21 includes the following sub-steps:
[0106] S211: construct T sets, which are labeled as the first service set, the second service set, and the Tth service set, respectively, where T represents the number of cycles;
[0107] S212: The time interval between the i-th service set and the 1st, ..., i-1st service sets is greater than or equal to sky;
[0108] S213 Find all the matches m service sets, the first service set is arranged on the first day, and the second service set is arranged on the The third service is scheduled on the Days, the mth service is arranged in the sky;
[0109] S214: randomly arrange the remaining Tm service sets on the remaining Tm days, ensuring that one set is arranged per day;
[0110] S215: Arrange the n service requirements of customer j to the first service set, ... the nth service set in sequence, and obtain the service date combination of customer j according to the date of the set;
[0111] S22: The second stage: using the decoding method of dynamic programming idea and using the improved ant colony algorithm to optimize the nursing path of each day;
[0112] The step S22 includes the following sub-steps:
[0113] S221: various parameters of the improved ant colony algorithm, including the maximum number of iterations MaxIter, the initial information heuristic factor α, the initial expected heuristic factor β, the initial value of the initial pheromone volatility coefficient ρ, the initial number of ants m, and the initial pheromone constant Q;
[0114] S222: For each ant, the next node is selected using a roulette strategy according to the pheromone concentration and the heuristic information until all ants have walked all the paths;
[0115] S223: Apply the decoding strategy to decode the path sequence constructed by each ant (path segmentation strategy), evaluate the quality of the obtained solution, and record the best solution in this iteration;
[0116] The step S223 includes the following sub-steps:
[0117] S2231: For a given order of n nodes, define two labels V[i] and P[i] for each node, V[i] represents the minimum total cost to reach node i, that is, the sum of the minimum path cost, fixed cost of the nursing staff, and penalty cost of the late time window generated when node i and the nodes before node i are all visited and the nursing staff have all returned to node 0; P[i] represents the direct predecessor node of node i in the minimum total cost path; node 0 is the nursing center;
[0118] S2232: Initialization: let V[i]=∞, V[0]=0, P[i]=i-1, i=1;
[0119] S2233: Initialize the nursing staff's working time worktime=0, cost cost=0, and set j=i;
[0120] S2234: Evaluate the improvement from node i-1 to node j, j=i,...,n;
[0121] S2235: Update the nursing staff working time at node j, the formula is worktime=worktime+s j ; j = i, ..., n;
[0122] S2236: Update the cost at node j. If j==i, that is, if j is equal to i, then execute S2237. If j>i, then execute S2238 until the route division of node i and its successor nodes is completed.
[0123] S2237: When j==i, that is, it is determined that j is equal to i, the cost is updated: cost=cost+X1, where X1 represents the round-trip cost from node 0 to node i;
[0124] S2238: When j>i, then update the cost: cost=cost+X2, where X2 represents the cost of the sub-route (0,i,i+1,.,j-1,j,0);
[0125] S2239: If worktime<=X3 and V[j]>V[i-1]+cost, then V[j]=V[i-1]+cost, p[j]=i-1; X3 represents the maximum working time;
[0126] S2240: Determine whether the route segmentation of node i and the successor node is completed. If worktime>X3 or j>n, then i=i+1, and enter S2233; otherwise, j=j+1, and enter S2235;
[0127] S2241: If i>n, the iteration terminates, otherwise i=i+1 and enters S2233.
[0128] S224: Apply the neighborhood search strategy to the optimal solution of the current iteration, randomly select a neighborhood search method, and if the new solution in the neighborhood is worse than the current optimal solution, update the optimal solution; if the new solution is not as good as the current solution, continue to select the current solution as the optimal solution;
[0129] The neighborhood search method in step S224 includes 2-opt, Or-opt, and Exchange:
[0130] 2-opt operator: It selects two endpoints in the path and reverses the subpath between the two points to generate a new solution. For example, if the original sequence is (1-2-3-4-5-6-7), the 2-opt operator is used to swap 2 and 4 to obtain a new sequence (1-4-3-2-5-6-7).
[0131] Or-opt operator: extract a sub-path containing one, two or three consecutive nodes from the current path and insert it into all possible positions except the atomic path position. For example, in the route (1-2-3-4-5-6-7), two consecutive nodes (2,3) are inserted between nodes 5 and 6, thus obtaining a new route (1-4-5-2-3-6-7);
[0132] Exchange operator: Exchange two different nodes in the current route. For example, exchange nodes 2 and 6 in the route (1-2-3-4-5-6-7) to get the new route (1-6-3-4-5-2-7).
[0133] S225: performing evaporation processing for the pheromone values on all paths, and updating the pheromone concentrations on the paths according to the paths of all ants in this iteration, including pheromone volatilization, pheromone increase, and additional pheromone rewards;
[0134] In step S225, the pheromone concentration on the path is updated according to the path taken by the ants, including three steps: pheromone volatilization, pheromone increase, and adding additional pheromone rewards:
[0135] Pheromone volatilization: After each iteration, the pheromone concentration on all paths will be reduced by a certain proportion, τ ij (t) represents the pheromone value between i and j at time t, and the formula is as follows:
[0136] τ ij (t+1)=(1-ρ)·τ ij (t)
[0137] Pheromone increase: where Δτ ij is an additional pheromone. When the ant completes the path search, it needs to update the pheromone concentration according to the path it has passed. Q is a constant, which represents the fixed value of the pheromone carried by the ant itself. L k It represents the path taken by ant k in this iteration. The formula is as follows:
[0138]
[0139] Add extra pheromone rewards: After updating the pheromone values of all paths, add an extra reward value Q / bestroute for the optimal path, where bestroute is the optimal path length.
[0140] S226: Determine whether the algorithm has reached the maximum number of iterations MaxIter. If so, output the best solution currently found. If not, Iter=Iter+1, and jump to S222;
[0141] By combining the above models, algorithms and strategies, a periodic community nursing staff scheduling method based on a two-stage heuristic algorithm is obtained. The route map of a nursing staff finally optimized is as follows: Figure 4 shown.
[0142] In another embodiment of the present invention, since there is no standard data set in the literature that is suitable for the periodic scheduling problem of community care workers, this study generates a simulation data set based on the problem characteristics. Specific generation method: The opening time window of the community care center is [0min, 1200min], and the maximum working time of the care worker is 480min per day. In the two-dimensional plane [0, 100] 2 N+1 points are randomly generated on the surface, the first point is the care center, and the remaining points are customer coordinates. The distance between the two points is d ij Defined as the Euclidean straight-line distance and rounded, let the travel time t ij Equal to its distance d ij The time a customer receives service is a random integer with uniform distribution U[60min,90min], and the service start time [e i ,l i ], randomly generate e in uniform distribution U[0min,1110min] i ,l i -e i ≥20. The service frequency is a random integer from 1 to T|, and the data set has 10, 30, 50, and 100 customer points. The corresponding unit travel time cost, unit late penalty cost, and nursing staff fixed cost are 1, 0.5, and 100, respectively.
[0143] In order to reflect the performance of the ESS strategy and the effectiveness of each improved operator, this section solves different scale examples with a decision cycle of 7 days. The result (ESS-IACO) is compared with the solution results of the algorithm without ESS strategy using the daily task balancing strategy HCC (HCC-IACO) and the algorithm without neighborhood search operator (ESS-ACO). Table 1 shows the optimal target value (BEST), average target value (AVG), and operation termination time (CPU) obtained by running each algorithm 20 times in different scale examples. At the same time, taking Example 1 as a representative, Figure 2 The convergence curves of the best solutions of ESS-IACO, HCC-IACO and ESS-ACO with the computation time in Example 100 are given.
[0144] Through Table 1 and Figure 2 You can get:
[0145] Table 1
[0146] (1) The operation time of the three algorithms is similar. The optimal solution and average solution of ESS-IACO are better than those of HCC-IACO, which shows that the ESS strategy is better than the HCC strategy. This is because: for the customer needs served every day, a set is formed.
[0147]
[0148] Then ESS and HCC both have T sets, and the number of T sets of HCC is equal. The set partitioning principle of ESS will maximize some sets. The maximized sets will greatly expand the solution space and make it easier to find a better solution.
[0149] (2) In the same time, the optimal solution and average solution of ESS-IACO are better than those of ESS-ACO, which shows that the neighborhood search operator can help the algorithm escape from the local optimum and converge quickly.
[0150] In summary, ESS-IACO can solve the problem well. ESS can expand the solution space and have a greater chance of obtaining a better solution. The neighborhood search operator can improve the search efficiency and convergence speed of the algorithm.
[0151] The present invention provides a nursing staff periodic scheduling method based on a two-stage heuristic algorithm. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. A nursing staff periodic scheduling method based on a two-stage heuristic algorithm, characterized in that: The following steps are involved: Step 1: Considering the interval service demand, a periodic scheduling model for community nursing staff is constructed; Step 2: Based on the periodic scheduling model of community nursing staff, a two-stage heuristic algorithm is designed to solve the problem and obtain the nursing staff scheduling plan.
2. The method according to claim 1, characterized in that In step 1, the objective function of the community nursing staff periodic scheduling model is: The objective function is used to minimize the sum of the path cost, the fixed cost of the nursing staff, and the penalty cost for lateness, where ct, cc, and cp are the unit time cost, the fixed cost of the nursing staff, and the penalty cost per unit time, respectively. ijct represents the 0-1 decision variable for caregiver c to transfer from client i to client j on day t, u ct w is a 0-1 decision variable indicating that the nursing staff c is served on day t; ict is the delay time cost of caregiver c at customer point i within t days; D represents the date set, C represents the caregiver set, P represents the set of scheduled customers, where customer point i and customer point j are both from the set P, and A represents the set of arcs A={(i,j)|i∈N,j∈N,i≠j}.
3. The method according to claim 2, characterized in that In step 1, the following constraints are set for the objective function: T oct =0 (11) w ict ≥0 (17) Among the above constraints: Constraint (1) means that each customer can be served at most once a day; Constraint (2) means that the number of times served within the decision cycle must be equal to the frequency of demand; Constraint (3) means x ijct and jct The relationship between the two; Constraints (4) and (5) indicate that the caregiver departs from the community care center and returns to the community care center. Constraint (6) means that y ict and u ct The relationship between the two, Constraint (7) states that the inflow is balanced; Constraints (8) and constraints (17) refer to the delay time of the nursing staff; Constraint (9) refers to the transitive relationship between the caregiver and the client. When going from client point i to client point j, M(1-x ijct )=0, the starting time of customer point j must be greater than or equal to the time to reach j. When there is no time from customer point i to customer point j, M(1-x ijct )=M, the equation always holds true; Constraints (10) refer to the limited working hours of nursing staff every day; Constraint (11) means ensuring that the departure time of each caregiver from the community care center is 0; Constraint (12) refers to the condition that each service date interval satisfies, requiring that customer i be served within k and m days, that is, and The service date interval is greater than or equal to Where T is the number of days of the cycle, k>m; Constraints (13)(14)(15)(16) define the range of values of the variables; The problem is described using a complete graph G = (N, A), where the point set N = P ∪ {0, |p+1|}, where 0 and |p+1| both represent a nursing center, the arc set A = {(i, j) | i∈N, j∈N, i≠j}, the date set D is {1, 2, …, T}, where T represents the number of days in the cycle, P represents the set of scheduled customers, C represents the set of nursing staff, R represents the maximum working time of the nursing staff per day, and f i represents the frequency of customer point i receiving service in a cycle, [e i ,l i ] represents the starting service time window range of customer point i, t ij represents the path time between customer point i and customer point j, s i represents the service time required for each service of customer point i, x ijct represents the 0-1 decision variable for caregiver c to go from customer point i to customer point j on day t, x ojct represents the 0-1 decision variable for the caregiver c to travel from the care center to customer point j on day t, x ioct represents the 0-1 decision variable for caregiver c to go from customer point i to the care center on day t; x jict represents the decision variable of the caregiver c from customer point j to customer point i on day t; y ict represents the 0-1 decision variable for the caregiver c to serve customer point i on day t; T ict represents the service start time when the caregiver c arrives at the customer point i on day t, w ict represents the delay time cost of caregiver c at customer point i within t days; u ct A 0-1 decision variable indicating that caregiver c was served on day t.
4. The method according to claim 3, characterized in that Step 2 includes the following steps: Step 2-1, the first stage: Under the condition of considering the service time interval, determine the date combination of the service object based on the strategy of expanding the solution space ESS; Step 2-2, the second stage: Adopt the decoding method based on dynamic programming ideas and use the improved ant colony algorithm to optimize the nursing path for each day.
5. The method according to claim 4, characterized in that Step 2-1 includes the following steps: Step 2-1-1, construct T sets, which are sequentially represented as the first service set, the second service set, ..., the Tth service set; Step 2-1-2: The time interval between the i-th service set and the 1st, ..., i-1st service set is greater than or equal to sky; Step 2-1-3, find all the m service sets, the first service set is arranged on the first day, and the second service set is arranged on the The third service is scheduled on the Days, the mth service is arranged in the sky; Step 2-1-4, randomly arrange the remaining Tm service sets on the remaining Tm days, ensuring that one set is arranged per day; Step 2-1-5, arrange the n service requirements of customer j into the first service set, ..., the nth service set in sequence, and obtain the service date combination of customer j according to the date of the set.
6. The method according to claim 5, characterized in that Step 2-2 includes the following steps: Step 2-2-1, set the maximum number of iterations MaxIter of the ant colony algorithm, the initial information heuristic factor α, the initial expected heuristic factor β, the initial value of the initial pheromone volatility coefficient ρ, the initial number of ants m and the initial pheromone constant Q; Step 2-2-2, for each ant, use the roulette strategy to select the next node according to the pheromone concentration and heuristic information until all ants have walked all paths; Step 2-2-3, apply the path segmentation strategy to decode the path sequence constructed by each ant, evaluate the quality of the solution obtained, and record the best solution in the current iteration; Step 2-2-4, apply the neighborhood search strategy to the optimal solution of the current iteration, randomly select a neighborhood search method, if the new solution in the neighborhood is worse than the current optimal solution, update the optimal solution, if the new solution is not as good as the current solution, continue to select the current solution as the optimal solution; Step 2-2-5, evaporate the pheromone values on all paths, and update the pheromone concentration on the path according to the paths of all ants in this iteration; Step 2-2-6, determine whether the algorithm has reached the maximum number of iterations MaxIter, if so, output the best solution currently found, if not, update Iter = Iter + 1, and jump to step 2-2-2.
7. The method according to claim 6, characterized in that In step 2-2-3, the path segmentation strategy includes the following steps: Step 2-2-3-1, for a given order of n nodes, define two labels V[i] and P[i] for each node, where V[i] represents the minimum total cost to reach node i, i.e., the sum of the minimum path cost, fixed cost of the caregivers, and penalty cost of the late time window generated when all nodes in front of node i and node i are visited and all caregivers have returned to node 0; P[i] represents the immediate predecessor node of node i in the minimum total cost path; node 0 is the nursing center; Step 2-2-3-2, initialization: let V[i]=∞, V[0]=0, P[i]=i-1, i=1; Step 2-2-3-3, initialize the nursing staff’s working time worktime = 0, cost cost = 0, and set j = i; Step 2-2-3-4, evaluate the improvement from node i-1 to node j, j = i, ..., n; Step 2-2-3-5, update the nursing staff working time at node j, the formula is worktime = worktime + s j ; j = i, ..., n; Step 2-2-3-6, update the cost at node j, if j==i, that is, if j is equal to i, then execute step 2-2-3-7, if j>i, then execute step 2-2-3-8, until the route division of node i and its successor nodes is completed; Step 2-2-3-7, when j==i, that is, when j is determined to be equal to i, update the cost: cost=cost+X1, where X1 represents the round-trip cost from node 0 to node i; Step 2-2-3-8, when j>i, then update the cost: cost=cost+X2, where X2 represents the cost of the sub-route (0,i,i+1,.,j-1,j,0); Step 2-2-3-9, if worktime<=X3 and V[j]>V[i-1]+cost, then V[j]=V[i-1]+cost, p[j]=i-1; X3 represents the maximum working time; Step 2-2-3-10, determine whether the routing splitting of node i and the successor node is completed. If worktime>X3 or j>n, then i=i+1, and go to step 2-2-3-3; otherwise, j=j+1, and go to step 2-2-3-5; Step 2-2-3-11, if i>n, the iteration terminates, otherwise i=i+1 and goes to step 2-2-3-3.
8. The method according to claim 7, characterized in that In step 2-2-4, the neighborhood search method includes 2-opt operator, Or-opt operator, and Exchange operator; The 2-opt operator includes: selecting two endpoints in the path and reversing the subpath between the two points to generate a new solution; The Or-opt operator includes: extracting a subpath containing one, two or three consecutive nodes from the current path and inserting it into all possible positions in the path except the atomic path position; The Exchange operator includes: exchanging two different nodes in the current route.
9. The method according to claim 8, characterized in that Step 2-2-5 includes: Pheromone volatilization: After each iteration, use τ ij (t) represents the pheromone value between i and j at time t, and the formula is: t ij (t+1)=(1-ρ)·τ ij (t) Pheromone increase: When the ants complete the path search, the pheromone concentration is updated according to the path the ants have passed. The formula is as follows: where Δτ ij is the additional pheromone, Q is a constant, indicating the fixed value of the pheromone carried by the ant; L k represents the path taken by ant k in this iteration; Add extra pheromone rewards: After updating the pheromone values of all paths, add an extra reward value Q for the optimal path. bestroute , where bestroute is the optimal path length.
10. A storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is run on a computer, the steps of the method according to any one of claims 1 to 9 are executed.
Citation Information
Cited By
Old people accompanying doctor scheduling optimization method considering uncertainty of doctor seeing time
CN119418886A
Route generation method and system of home-based care bath-assisting service center
CN119740716A
Multi-warehouse multi-logistics vehicle path planning method based on adaptive neighborhood ant colony system
CN121032380A
Multi-warehouse multi-vehicle path planning method based on adaptive neighborhood ant colony system
CN121032380B
