• No se han encontrado resultados

Problem decomposition is a main process to decrease problem size. It splits a problem into several smaller sub-problems which usually take less time to find solutions. Our problem of interest, the home healthcare problem, has two main parts available for decomposition: required visits and available work- force. Each part has its own decomposing method. Decomposing those two main parts returns a set of sub-problems where each sub-problem is small enough to tackle with the MIP solver.

Visit Partition

Visit partition is basically finding a separation rule to group several related vis- its together. This could fit the definition of capacitated clustering problems which clusters entities into k mutually exclusive and exhaustive group where the size of each group is restricted [96]. We apply a heuristic clustering al- gorithm to find the k clusters. Hence, we use local information for partitioning

Algorithm 8:Repeated Decomposition and Conflict Repair (RDCR)

Data: Problem P = (K, V)where K is a set of workers and

V = D∪T∪D0is a set of nodes

Result: {SolutionPaths} FinalSolution

1 {UnassignedVisits} T0= T; 2 repeat 3 {Nodes} V = D∪T0∪D0; /* Problem Decomposition */ 4 {Problem} S = ProblemDecom(K, V); 5 for sS do 6 sub_sol(s) = cplex.solve(s); 7 end

/* Conflicting Assignments Repair */

8 {Problem} Q = ConflictDetection(sub_sol, S); 9 FinalSolution.add(NonConflictPaths(sub_sol)); 10 for qQ do 11 cRepair_sol(q) = cplex.solve(q); 12 end 13 FinalSolution.add(cRepair_sol); 14 T0= T.notAssignedIn(FinalSolution); 15 Update_AvailableWorkforce(K);

16 until No assignment made;

rules such as location, geographical region, required skills and visit duration. We also use clustering algorithm k-medoids as a main clustering method.

The k-medoids algorithm works in the same way as k-means algorithm [102]. Its goal is to find k clusters based on distance between items. Therefore, the algorithm is suitable to define visit groups where their members are located within relatively smaller distances. Ideally, groups of visits should have equal sizes, which gives the minimum size of the largest sub-problem. However, us- ing a clustering algorithm does not guarantee this since the clustering defin- ition is to find groups of items related to their density. Hence, sub-problems may have dense area which cause some sub-problems to have a larger size.

For RDCR, we propose three variants of visit partition methods.

Location based with uniform partition (LBU)partitions visits according to their location while also aiming to limit the size of each subset. The procedure

Algorithm 9:Visit Partition: Location Based With Uniform Partition (LBU)

Data: {Visits} T, subProblemSize

Result: {{Visits}} TP ={Tn|n =1, . . . ,|S|}; Partition set of visits

1 begin

2 visitsList = GroupByLocation(T);

3 n = 0;

4 for jvisitsList do 5 for m = 1,...,n do

6 if|Tm| <subproblemSize or j.shareLocation(Tm) then

7 Tm.add(j); 8 end 9 end 10 if j.isNotAllocated then 11 n =n+1; 12 Tn.add(j); 13 end 14 end 15 end

is shown in Algorithm 9. First, visits are ordered by location into visitsList and

are processed one at a time. Visit j in visitsList is allocated to subset Tn if the

visit has the same location as any visit already in the subset or if the maximum size of the subset has not been reached. If visit j is not allocated to an existing subset then a new subset is created. We set subproblemSize to 20 visits. Since most of the 42 HHC instances have locations with no more than 5 visits, this LBU procedure mostly generates subsets within or near the size limit.

Region based with k-medoids clustering algorithm (RBK) partitions vis- its according to geographical regions and then splits too large subsets (regions with a high density of visits) using the k-medoids clustering algorithm. The method basically separates visits by geographical regions, then uses a cluster- ing algorithm to partition large regions. The clustering method to be used here is k-medoids clustering algorithm. The k-medoids clustering algorithm separ- ates n visits into k clusters. The algorithm chooses k visits, each become a centre of a cluster, known as core. The other visit will become a member of the cluster where there is the smallest distance between the cluster core and the visit. The

Algorithm 10: Visit Partition: Region Based With k-medoids Clustering Partition (RBK)

Data: {Visits} T, subProblemSize

Result: {{Visits}} TP ={Tn|n =1, . . . ,|S|}; Partition set of visits

1 begin

2 {{Visits}} A = firstPartition(splitVisitByRegion(T));

3 for Ta ∈ A do

4 if|Ta| ≥subProblemSize then

5 {{Visits}} W = kMedoidCluster(Ta,subProblemSize);

6 TP.addAllSetIn(W); 7 else 8 TP.add(Ta); 9 end 10 end 11 end

result after apply k-medoids clustering algorithm is a set of subsets where vis- its within the same subset share the same region and are separated by short travelling distances. The procedure is shown in Algorithm 10. First, visits are

partitioned by geographical regions into A and each subset Ta is processed one

at a time. Then, the k-medoids clustering algorithm is applied to those subsets that have a size larger than subproblemSize (20 visits). The clustering algorithms seek to minimize travelling distance between visits in the same cluster and the

clusters size is calculated by dividing the number of visits in the subset Ta by

subProblemSize.

Skill based with k-medoids clustering algorithm (SBK)is a variant of RBK explained above. The only difference is that the first partitioning level is based on the skills required by visits instead of by geographical regions. Then, in Algorithm 10, we replace splitVisitByRegion at line 2 by splitVisitBySkill. The first partitioning level gives subsets with visits that require the same set of skills. This helps to group visits that may require specialist workers. Such workers with specific skills are usually low in numbers but may be require to cover visits in a wide area. The second partitioning level using k-medoids clustering

is applied next to reduce the size of larger subsets, including those visits that require more general skills.

Workforce Selection

We propose three workforce selection methods described next, to complete the sub-problems in RDCR. The aim is to select a not too large subset of workers that are suitable for the visits already in the sub-problem.

Best Fitness Selection (BF). This procedure finds a set of best workers, where each worker is one of the best candidates for each visit in the subset.

For each visit j in a subset Ta we identify the best worker by partially comput-

ing the objective function (2.14). For this, the assignment of each worker to visit j is evaluated by computing three components of the objective function: mon- etary cost, preferences penalty, and soft constraints penalty. The worker must also have the required skills for the visit. If the best worker identified for visit

j has already been selected for another visit in the same Ta, then the next best

worker is selected and so on. This selection method guarantees that all visits can be assigned unless there is no worker with the required skills for the visit. The resulting sub-problem has at most one worker for each visit.

Suppose z(k, t) is a partial objective function to assign a worker k to make

a visit t, K is a set of all workers and Ka is a set of available workers for sub-

problem a. The BF selection procedure can be outlined in the following steps.

For each t ∈ Ta,

1. Find a worker k∗from a set K who has z(k∗, t) = min(z(k, t)), where k ∈ K,

2. Add the worker k∗ to available worker set Ka,

3. Update the set of workers K by removing the worker k∗from set K.

Best Average Fitness Selection (AF). This procedure finds a set of good av- erage workers, where each worker is a good candidate for all the visits in the

subset. Similar to the BF procedure, for each visit j ∈ Ta and each worker, we

partially compute the objective function (2.14). But instead of selecting the best

worker for the visit, we select the |Ta| best average workers, where |Ta| is a

number of visits in sub-problem a. Workers are listed in decreasing order of their average partial objective function value considering all visits in the subset

Tn. The next available best average worker is selected for the subset until we

have the same number of workers as visits in the subset.

Suppose z(k, t)is a partial objective function to assign a worker k to make a

visit t, K is a set of all workers, Tais a set of visits for sub-problem a and Ka is a

set of available workers for sub-problem a. The AF selection procedure can be outlined in the following steps.

1. Calculate z(k, t)for every t ∈ Ta and k∈ K,

2. Calculate average score z(k) = ∑tTaz(k, t)/|Ta|for each worker k∈ K,

3. Select|Ta| workers who have lowest average score z(k) and add them to

set Ka.

Workers Suitability Selection (WS). This procedure finds a set of suitable workers, based on skills and locations, for all the visits in the subset. All work- ers that have the required skills and location availability for at least one visit in the subset are selected for the subset. This selection procedure results in a larger number of workers for each sub-problem, which would demand more computational time when solving the sub-problems but could result in higher quality solutions.

Repeated Sub-problem Solving

Solving the sub-problems with the MIP solver is carried out iteratively un- til a final solution with a set of valid paths (with no conflicting assignments) is obtained as illustrated in Figure 5.5 and Algorithm 8. As before, the sub- problems generated with the above procedures are defined by the MIP model presented in Chapter 2. There are no conflicting assignments between the paths in the same sub-problem solution, but there might be conflicting assignments between paths in different sub-problems. Instead of using the heuristic assign- ment procedure as in GDCR, only the MIP solver is used in an iterative process of problem decomposition (Section 5.4.1, solving sub-problems, and conflicting assignment repair (Section 5.2.2. Noting that sub-problem solving process is to use the mathematical solver to find an optimal solution of a sub-problem.

In our experiments, smaller instances, i.e. sets A, B and C, required 2 or 3 iterations of RDCR while larger instances required 5 to 6 iterations. The first iteration was always the most time consuming and later ones (repeated repairs) were much faster. On average, the second iteration used about 20% of the first iteration computational times.

5.4.2

Experimental Study on the Sub-problem Generation Meth-

Documento similar