• No se han encontrado resultados

MEDIDAS PARA EL FOMENTO DEL HÁBITO DE LA LECTURA

In document PROGRAMACIÓN CONJUNTO (página 34-39)

MEDIDAS DE ATENCIÓN A LA DIVERSIDAD

MEDIDAS PARA EL FOMENTO DEL HÁBITO DE LA LECTURA

The relaxation method breaks large problems down into smaller, but dependent, sub- problems to be solved successively until optimality is reached. Chen & Chen (2013: 39) stated that a problem must have the following two properties for the relaxation technique to be worth using.

1. There must be an algorithm capable of answering the question “is there a solution to the problem with value better than Z?”, and finding such a solution if one exists.

2. The problem must be such that if there is no solution to the sub-problem with a value better than Z, then there can be no solution to the full problem with a value better than Z.

The classic relaxation algorithm was first suggested by Handler & Mirchandani (1979) and the main steps are summarised in Figure 5.1 (adapted from Chen & Chen (2009)). It begins with an upper bound of infinity and a small subset of demand points. The algorithm determines if a feasible solution can be found for the subset of demand points with a better solution value than the current upper bound. In other words, the minimum number of facilities required to cover all the demand points in the subset within the upper bound is calculated. If this number is ≤ p, then there is a feasible solution for the subset with a solution value less than the current upper bound, and so feasibility for the full problem is checked. If the solution is feasible for the full problem, the upper bound is updated, otherwise another demand point is added to the subset and the process is repeated. If a feasible solution cannot be found for the subset of demand points with a solution value better than the current upper bound, then the current upper bound is taken as the optimal solution value for the entire problem.

1. Set the upper bound to be ∞.

2. Choose a random subset of demand points, Sub.

3. Determine whether Sub has a feasible solution, f easible, with a solution value smaller than the upper bound.

a) If f easible cannot be found, return the current upper bound as the solution value.

b) If f easible can be found, continue to Step 4.

4. Determine whether f easible is feasible for the full problem.

a) If it is, reset the upper bound as the solution value of f easible and go back to Step 3.

b) Otherwise, add another demand point to Sub and go back to Step 3. Figure 5.1: Classic Relaxation based on Chen & Chen (2009: 1648)

Chen & Chen (2009) suggest two enhancements for the classic relaxation algorithm, which will be referred to as the improved classic relaxation algorithm. The first en- hancement updates the upper bound more frequently, and the second adds k demand points at a time to the subset where k > 1. Furthermore, they also developed two other algorithms that were briefly described in Chapter 2. These two algorithms will be referred to as the ‘reverse relaxation’ and the ‘binary relaxation’. For completeness, they are adapted from Chen & Chen (2009: 1649-1650) and described again here in

1. Set the lower bound to be 0.

2. Choose a random subset of demand points, Sub.

3. Determine whether Sub has a feasible solution, f easible, with a solution value smaller than the lower bound.

a) If f easible cannot be found, generate a new lower bound by finding the smallest radius of a covering circle created from Sub that is larger than the current lower bound and go back to Step 3. b) If f easible can be found, continue to Step 4.

4. Determine whether f easible is feasible for the full problem. a) If it is, halt and return f easible as the final solution.

b) Otherwise, add k demand points to Sub and go back to Step 3. Figure 5.2: Reverse Relaxation based on Chen & Chen (2009: 1649) Figures 5.2 and 5.3 respectively.

Although these algorithms are proven to be efficient at solving the discrete p−centre problem, they have not been tested for similar, large data sets as one may expect for the continuous case. For example, Chen & Chen (2009) only record one table of results for one instance only using the TSP-Library data set pr439 for p = 10, . . . , 100 where they found exact solutions for all values of p. This result is promising, and highlights the potential that these type of algorithms may be used to solve larger, more complex problems if revisited.

After studying the computational times, the reverse relaxation algorithm was found to perform the best (i.e. fastest) for p = 10− 30 while the binary relaxation algorithm performed the best for the remaining values of p (i.e. p = 40−100). However, there is little evidence to say which algorithm is the most efficient as the results are strictly based on this one data set. Furthermore, different and specific values of k worked best for each algorithm. Therefore, a further investigative work was carried out in this study to compare these two promising algorithms with an aim to identify the most promising algorithm that we can focus on for further investigations.

1. Set the lower bound (LB) to be 0 and the upper bound (U B) to be ∞. 2. Choose a random subset of demand points, Sub.

3. Set the coverage distance, CD, to be LB+U B2 .

4. Determine whether Sub has a feasible solution, f easible, with a solution value smaller than CD.

a) If not, set LB = CD and go back to Step 3. b) If f easible can be found, continue to Step 5.

5. Determine whether f easible is feasible for the full problem.

a) If not, add k demand points to Sub and go back to Step 4.

b) If so, save f easible as Best Candidate found so far, and update U B to be the solution value of f easible, Z.

If no solution less than Z can be found for Sub, halt and return Best Candidate as the final solution.

Figure 5.3: Binary Relaxation based on Chen & Chen (2009: 1650) Initial Results

Chen & Chen’s investigation was replicated by running both the reverse relaxation algo- rithm and the binary relaxation algorithm for the data set pr439 where p = 10, . . . , 100 and k = 1, . . . , 10. Table 5.1 shows Chen & Chen’s first results for the binary and the reverse relaxation algorithm where k = 6 and 2 respectively. For comparison, our re- sults are also shown for the same k values where Chen & Chen yielded their best results. Furthermore, the k value that required the smallest amount of computational time in our experiment is also reported. The best (i.e. fastest) results for the binary-based method were obtained when k = 8, and for the reverse-based method when k = 3. For clarity, the best results found for each value of p are also highlighted in bold.

When analysing the results, it becomes clear that Chen & Chen’s results cannot be replicated easily, as we had different computational times and found different values of k to be more effective. This is because the algorithms proposed by Chen & Chen are not deterministic, and so the speed and the efficiency of the algorithm relies greatly on the initial subset of the demand points. This highlights the disadvantage of such algorithms, which we wish to examine in this chapter.

Binary Relaxation Reverse Relaxation Chen & Chen’s Results, k⊥= 6 Original Implemen- tation, k⊥= 6 Original Imple- mentation (best), k⊥= 8 Chen & Chen’s Results, k⊥= 2 Original Implemen- tation, k⊥= 2 Original Imple- mentation (Best), k⊥= 3 p Z∗ CPU Time (secs) CPU Time (secs) CPU Time (secs) CPU Time (secs) CPU Time (secs) CPU Time (secs) 10 1716.510 4.53 3.07 9.30 0.84 2.41 4.18 20 1029.715 7.28 11.28 6.15 2.63 3.02 3.22 30 739.193 14.33 49.78 22.04 6.16 7.62 3.75 40 580.005 58.92 104.41 65.82 93.38 66.54 38.69 50 468.542 78.89 194.71 104.30 207.45 95.46 63.62 60 400.195 29.98 35.90 74.86 62.19 161.96 24.49 70 357.946 27.72 25.77 28.77 103.28 461.17 57.12 80 312.500 31.04 35.83 21.51 172.59 68.12 41.62 90 280.903 40.05 39.56 33.45 157.07 49.70 63.24 100 256.680 35.07 42.74 21.98 60.40 68.13 17.32 Average 614.218 32.78 54.31 38.82 86.60 98.41 31.73

Best result for k = 1, . . . , 10.

Table 5.1: Initial Results for the Binary and Reverse Relaxation Algorithms where n = 439

Furthermore, Chen & Chen’s results also suggest that the binary relaxation algorithm is generally the faster of the two. Our results, however, suggest that both algorithms show efficiency, with the reverse relaxation algorithm showing a slightly faster rate on average. As we wish to focus on and enhance one algorithm, we suggest that the reverse relaxation algorithm shows marginally more potential in terms of finding the optimal solution. Therefore, this algorithm is chosen for further development.

It is important to note that the time complexity for both the binary and the reverse relaxation algorithm is bounded by Step 3 as this is NP-hard.

In document PROGRAMACIÓN CONJUNTO (página 34-39)

Documento similar