• No results found

Heuristics for the weighted k-Chinese/rural postman problem with a hint of fixed costs with applications to urban snow removal

N/A
N/A
Protected

Academic year: 2021

Share "Heuristics for the weighted k-Chinese/rural postman problem with a hint of fixed costs with applications to urban snow removal"

Copied!
113
0
0

Loading.... (view fulltext now)

Full text

(1)

Department of Mathematics

Heuristics for the Weighted k-Chinese/rural

Postman Problem with a Hint of Fixed Costs

with Applications to Urban Snow Removal

Kaj Holmberg

(2)

Department of Mathematics Link¨oping University S-581 83 Link¨oping, Sweden.

(3)

Heuristics for the weighted k -Chinese/rural postman

problem with a hint of fixed costs with applications to

urban snow removal

Kaj Holmberg

Department of Mathematics Linköping Institute of Technology

SE-581 83 Linköping, Sweden October 22, 2015

Abstract: We describe a weighted version of the k-Chinese or k-rural postman problem that occurs in the context of snow removal. The problem concerns the questions of which vehicle shall do each task and how the vehicles shall travel between tasks. We also consider different numbers of vehicles, in view of a fixed cost for each vehicle. We describe and discuss heuristic solution approaches, based on usable substructures, such as Chinese/rural postman problems, meta-heuristics, k-means clustering and local search improvements by moving cycles. The methods have been implemented and tested on real life examples.

1

Introduction

Snow removal can be an important and costly issue, in certain places at certain times. The yearly amounts of snow has recently varied much in several countries. Some years there is a lot, other years hardly anything. Hence the demand of snow removal varies a lot. Snow removal can be quite difficult and expensive, if there is very much snow. Winters without snow make it difficult to motivate keeping a large fleet of snow removal vehicles available. Complaints from the public about snow removal are common. A conclusion is that one cannot expect to use the plans from last year. New situations require new plans, which require planning tools.

The situation (in Sweden) is as follows. A city is divided into areas, and for each area, a contractor is hired. As the contractors work independently, such an area gives natural borders for the optimization. We therefore consider one such area, and focus on the question how to allocate the streets to the vehicles available.

(4)

In the paper Holmberg (2014), we give a thorough and detailed description of the snow removal problem, which is very difficult. Here we deal with a simplified problem. The treatment of a street includes many details, such as several sweeps, depending on the width of the street, additional clearing at crossings, and even considerations of the fact that it might take a longer time turning a vehicle around than continuing straight ahead. In this paper, we omit all these details, and approximate the work needed to clear a street by one operation. Furthermore, we consider only normal roads, not pedestrian roads and cycling roads, which may require different vehicles.

We assume that the vehicles are identical, and the main task is to decide which links each vehicle should take care of. We don’t use depots, since we don’t know where the vehicles come from. The areas to be treated are often parts of larger areas, so sometimes the vehicles may come from others tasks, and when they are done, the will go to yet other tasks, and we don’t know where these tasks are located. Since there is no time information in our model, the vehicle can enter the tour at any node.

If there was only one vehicle to do all snow removal, the problem would be reduced to a Chinese postman problem, which simply is to find a shortest round trip that covers all links in a graph.

Related problems are the following. The rural postman problem is to find a shortest round trip that covers certain links. This corresponds to one vehicle clearing a subset of the links.

The k-Chinese Postman Problem is to find k shortest round trips that covers all links, which corresponds to k vehicles clearing all links.

The k-Rural Postman Problem is to find k shortest round trips that covers certain links, which corresponds to k vehicles clearing a subset of the links.

Our simplified snow removal planning problem turns out to be a version of the k-Chinese Postman Problem. More precisely, it is a weighted combination of the original k-Chinese Postman Problem, where the total distance is minimized, and the min-max k-Chinese Postman Problem, where the maximal distance traveled by a vehicle is minimized. The two objectives are here simply added together with certain weights. In practical terms, it is a compromise between minimizing the cost for all travel (and equipment) and minimizing the time until all snow is removed.

Furthermore it could well be case of k-rural Postman Problem, since there could be links that not need to be treated. There could be links where the snow already has been removed, or where the responsibility of snow removal lies elsewhere. Our methods will be able to solve such cases just as well.

We also wish to compare the result of using different numbers of (identical) vehicles. Clearly, it is faster to let several vehicles work at the same time, but one has to pay for the vehicles. Each used vehicle has a fixed cost (which does not depend on how much the vehicle is used, only on the fact that it is available).

(5)

clearing. We will assume that the first time a link is used, it is cleared, and the following passes will only be transportation, which is quicker.

However, as motivated more later, this has limited influence on the optimization, since the actual work (snow removal) to be done is constant. If all links have to be cleared, the time needed for this is the total length of all links multiplied with the unit snow removal time. The total time for the whole operation will be this constant plus the time needed for additional transportation, so the optimization can only minimize the transportation time (when not clearing). Therefore the difference in speed will only occur between the snow removal term (which is constant) and the transportation term (which is minimized). Thus this difference does not affect which solution is best, as all feasible solutions have the same constant base. It is only when calculating the final end time this difference must be taken into account.

Summing up, the problem is the following. We have a number of streets in a city network that needs to be cleared from snow, and a limited number of identical vehicles that shall do the job. One main task is to allocate links to vehicles, i.e. decide which subarea each vehicle will take care of. In practice, a driver is allocated to an area, and is then often free to plan the tour by himself. Obviously it could be useful for the driver to have a suggested tour, but it is not certain that this tour will be used. Therefore, the area to be covered by each vehicle is a more important result than how the tours exactly look like. However, we need to find the tours in order to evaluate an allocation. There are several possible objectives for this problem. We could minimize the time when everything is ready, i.e. minimize the maximal time of a vehicle. This leads to the min-max k-Chinese postman problem. We could also minimize total cost for the clearing, i.e. minimize the sum of the times for the vehicles. This leads to the original k-Chinese postman problem.

Another possibility is to minimize the transportation distance, when the vehicles are not clearing. This is more or less the same as minimizing the pollution caused by the vehicles, so this objective is environmentally friendly. It is also in principle the same goal as minimizing the total distance traveled. The best objective function is, we believe, a weighted combination of those above.

We need data for this problem. The street network and all link characteristics can nowa-days be found in different data bases. In this paper we use data from OpenStreetMap. In Holmberg (2015b), we give more details about what data there is and how to extract the data to a useful form.

Times for vehicles are known approximately, as an average speed. This motivates the approximation of combining small tasks into larger.

The operators will in the future be required to equip each vehicle with a GPS. This gives data from which we may extract times for all tasks. So task times will be available with better accuracy. Analyzing the GPS tracks will require map matching, which is described in Holmberg (2015a).

(6)

2

Survey

The Chinese postman problem is a well-known problem where each link in a graph needs to be covered. It can be solved optimally and polynomially by a well-known method, see for example Eiselt, Gendreau, and Laporte (1995a). The rural postman is a similar problem, where however only a subset of the links need to be covered. This problem is NP-hard, but there exist efficient heuristics, Christofides, Campos, Corberán, and Mota (1986), Eiselt, Gendreau, and Laporte (1995b), Cook, Schoenfeld, and Wainwright (1998), Ghiani, Laganá, and Musmanno (2006), Holmberg (2010). The k-Chinese postman problem is treated in Pearn (1994), Ahr and Reinelt (2002), Osterhues and Mariak (2005), Ahr and Reinelt (2006), and the k-rural postman in Benavent, Corberán, Plana, and Sanchis (2009). Other papers on related arc routing problems are Kramberger and Zerovnik (2007), Benavent and Soler (1999), Corberan, Marti, Martinez, and Soler (2002), and Corberán and Prins (2010).

Winter road maintenance is treated in Campbell and Langevin (1995), Labelle, Langevin, and Campbell (2002), Trudel (2005) and Fu, Trudel, and Kim (2009). Rural snow re-moval is discussed in Razmara (2004) and Islam (2010). A comprehensive survey of problems around winter road maintenance is found in papers Perrier, Langevin, and Campbell (2006a), Perrier, Langevin, and Campbell (2006b), Perrier, Langevin, and Campbell (2007a), and Perrier, Langevin, and Campbell (2007b). In Perrier, Langevin, and Amaya (2008) a model for urban snow removal is given.

3

Modeling

An example of a model for the min-max k-rural postman problem is given in Benavent et al. (2009). Here we don’t plan to use MIP-codes for solving the problem, so we will not go into all the details of such a model. However, some parts of the model will help in the description of the heuristic methods.

We will use the following indices: k ∈ Q: the set of vehicles, l ∈ L: the set of links (streets), and i ∈ N: the set of nodes (points, crossings). We will use q = |Q|, n = |N| and m = |L|. The links are assumed to be undirected, i.e. that the combined operation discussed previously can be done in either direction. Link j has length lj, which is

obtained from the digital maps.

The set of links that shall be cleared of snow are denoted LC ⊆ L. Often LC = L, i.e.

all links in the network need to be cleared, but sometimes there are links that will be cleared by another operator, or by other types of vehicles, but still are available to use for transport of our vehicles. As will be clear later, for our method it will not matter much if LC = L or not.

The value of q, the number of vehicles, may be fixed, but we also consider the case when it can be varied. We will not make a model where this parameter is a variable, but will rather do a parametric analysis, i.e. solve the problem for different values of q

(7)

and compare the results, as there are only a few interesting values. We also need the following data.

tj : the time needed for a vehicle to clear link j.

dj : the time needed for driving a vehicle along link j (while not clearing).

We will consider the average speed to be vA m/s, so it will take d

j = lj/vA seconds

to drive the whole street j. The time to clean a road is estimated in average to be p times the length of the road divided by the speed. A value of p = 2 is reasonable for an ordinary street. This time includes two or three sweeps (middle, right side, left side) as well as cleaning of turning space and/or crossroads. All of this is seen as one operation that starts in one end of the street and finishes in the other end. For narrow streets or bicycle paths, p = 1 is more appropriate.

It then takes tj = pdj = plj/vA seconds to clean road j. We will assume that the cost

for driving a vehicle is proportional to the time it is driven, so letting cD be the cost

for driving one second, the cost for cleaning link j is cj = cDtj = cDplj/vA.

The total time needed for clearing is tT OT =P

j∈LCtj, which, as mentioned earlier, is a

constant. As a matter of fact, the optimization will only concern the rest of the solution, which is traveling around with the vehicles without removing snow. That means that the optimization will only deal with the times d. Therefore, the difference between t and d (however big it is) is unimportant when it comes to which solution is best. However, in order to calculate correct times and costs of solutions, we need to take the difference into account.

We will also use the following, when considering the number of vehicles. f : the fixed cost for using a vehicle.

The main variables are the following.

xjk= 1 if vehicle k treats link j, for all j ∈ LC, k ∈ Q.

zjkF the number of times vehicle k is driven forwards on link j, for all j, k. zjkB the number of times vehicle k is driven backwards on link j, for all j, k. We may also use the following variables as an efficient representation of an allocation.

κj : the vehicle (index) that is assigned to task j.

Obviously this means that xjκj = 1. We will also use Sk as the set of links allocated to

vehicle k, i.e. Sk= {j : κj = k} = {j : xjk= 1}.

The main constraints state that each link must be treated by one vehicle. X

k

(8)

The vehicles have to drive on the streets that are treated. zF

jk+ zjkB ≥ zjk for all j ∈ LC, k ∈ Q (2)

We also need node equilibrium constraints, including zF and zB, but we don’t spell

them out here. Slightly more complicated (and numerous) are the constraints that make the tours connected, but we won’t go into the details of this either. All in all we require that z forms connected round trips in the network, which is denoted by

z ∈ R. (3)

Note that constraints 3 must allow subtours, i.e. repeated visits to nodes. Furthermore we need some variables and constraints for times.

vR: the time when all vehicles are ready.

vU

k : the total time vehicle k is used.

vC

k : the total time vehicle k is used for clearing snow.

vL

k : the total time vehicle k is used for transportation.

These times are defined as follows. vCk = X j tjxjk (4) vLk =X j dj(zjkF + zjkB − xjk) (5) vU k = vCk + vLk (6) vR≥ vkU for all k (7)

Some possible objective functions are the following. Minimize final end time:

min vR

This leads to the min-max k-Chinese/rural postman problem. Minimize sum of total times for vehicles:

minX

k

vUk

This leads to the original k-Chinese/rural postman problem. Minimize sum of transport times:

(9)

minX

k

vLk

As there is a fixed proportion between time and cost (cD), the last two objective

func-tions above could just as well be regarded as minimizing the cost. They are often accompanied by a constraint on vR (the snow must be removed within a given time

frame).

In this paper, we will use an objective function that is a weighted sum of the maximal time for a vehicle and the total cost for the whole operation.

min wAvR+ wC(cDX k

vkU+ f q)

where wA and wC are weights reflecting the importance of time relative to cost. If wA

is large, it is important to finish early, i.e. to minimize the total time until all links are cleared, while if wC is large, it is more important to minimize the total costs for the

whole operation.

When we solve the problem, fq will be constant, but we may solve the problem for a couple of different values of q, and compare the results, and then this term will be important.

If we wish to include the number of vehicles explicitly as a variable in the model, we would need to use the variables

yk= 1 if vehicle k is used, 0 if not,

and the constraints xjk≤ ykfor all k

X

k

yk≤ q

0 ≤ q ≤ |Q|, integer.

This is possible, but in practice we are interested in only a few values of q, so it would not be worth while.

4

Lower bounds

We will later describe heuristics for finding feasible solutions. This yields upper bounds on the optimal objective function value. It can then be quite useful to obtain some lower bounds on the optimal objective function value, by solving a relaxation of the problem.

We can then compare the upper and lower bounds, in order to estimate the possible potential for improvement. If we are very lucky, the lower bound may be close enough

(10)

to the upper bound, so that we may conclude that the solution is close enough to the optimum.

A possible use for a relaxation is to construct a branch-and-bound method around it. By branching, the lower bound will get closer to the upper bound, and finally indicate optimality. A possible binary branching is to fix a certain xjk to 1 in one branch and

to 0 in the other. Another possibility is to create q branches for a certain link j, where xjk= 1 in branch k.

The simplest lower bound is obtained by dividing the total work that needs to be done by the number vehicles. Here all transportation is omitted and the need for forming connected cycles is ignored.

l0

= wAt

T OT

q + w

C(cDtT OT + f q)

A slightly better lower bound is to find the cost of one Chinese postman tour, vP, i.e.

the cost for one vehicle to do all, and divide by the number of vehicles. l1 = wAt 1 q + w C(cDt1 + f q) where t1 = v E p + t

T OT, since the extra work, vE = vP − tT OT, is only transportation.

The time for obtaining l0 is negligible, while the time needed to obtain l1 is somewhat

longer, but still much shorter than what is needed for solving the problem, i.e. finding a good feasible solution.

5

Solution methods

We will focus on heuristic solution methods, such as constructive heuristics, local search and metaheuristics. We propose heuristic solution approaches with the following parts: 1. Initial allocation, dividing the tasks among the vehicles.

2. Find a feasible solution, i.e. a route for each vehicle. 3. Improve the routes by local search.

4. Improve the routes by metaheuristics.

We recall that routing a vehicle on a given set of undirected tasks is a rural postman problem, and efficient heuristics for this problem is presented in Holmberg (2010). A practical aspect omitted in the problem formulation is that it may take a longer time to turn a vehicle around than to continue around the block. However, we can do a slight effort to avoid turning as follows.

(11)

When solving a rural postman problem, additional arcs/edges are added, in order to form a graph where an Euler tour exists. The procedure ends by finding an Euler tour in the extended graph. In this stage, the Euler tour is seldom unique. All Euler tours are equally good, so we may choose any one of them. Then it is possible to avoid a U-turn as much as possible, by simply avoiding going back to the recently visited node if possible.

A solution is thus evaluated as follows. The time for each vehicle tour is calculated, vU. (This also gives the cost as cDvU.) The total solution time is then equal to the

maximal time over the vehicles. The total cost is the sum of the costs for the vehicle tours, plus the fixed costs. The total objective function value is then calculated as a weighted combination of the maximal time and the total cost.

5.1 Local search and metaheuristics

A local search method may be used to try to improve the allocation of vehicles to tasks. The neighborhood is defined by the following changes.

• Move a task from one vehicle to another. • Swap tasks between two vehicles.

This can also be used in metaheuristics, such as simulated annealing or tabu search. Even though immediate improvement is not obtained, better solutions might be ob-tained after a number of changes.

The changes can easily be made by explicitly working with κj. A move means changing

one value, from κj = k1 to κj = k2. A swap means changing two, but can also be seen

as changing places of two elements in the vector. (This is interesting only if these two elements do not have the same value.)

When finding the routes for the vehicles, we solve a rural postman problem for each vehicle, and one question is the order in which the vehicles are handled. This is unin-teresting, if the vehicles do not affect each other (in this phase). However, one possible heuristic improvement is the following.

When the tour of the first vehicle is found, one usually finds that the vehicle passes links that are not allocated to be cleared by that vehicle. (This happens when vL

k > 0,

for links where zF

jk+ zjkB > 0 and xjk= 0.)

Then it is possible to “disobey” the allocation, and let that vehicle clear all links it passes. These links are then done, and later vehicles need not pass them. It is not certain that this is a good idea, since it could mean that the first vehicle does a lot of work while the following do less and less. (Here the difference between c and d matters. It is probably a better idea if this difference is small.) It could however be worth to try. Consider the example in figure 1. First we give the allocation for a red and a blue vehicle and then the cycle of the red vehicle. Then we change the allocation of the blue

(12)

Figure 1: Changing allocation.

links that the red vehicle passes to red. After this, the blue cycle only need to cover the middle link. Assuming length 1 of each link, the red cycle has length 6, and the blue cycle length 2, which sums up to 8. In the last picture, we show how long the blue tour would be if the allocation was not changed. Then the blue cycle would get length 6, so the sum of lengths would be 12.

If this is done, the order of the vehicles obviously matters. Therefore we consider changing the order of the vehicles. We let oi be the vehicle that is treated as number i

in the order. Changes that can be done are swapping two elements of o, or shifting o one or more steps to the right or the left.

Some important choices are the following. 1. How to generate the initial allocation.

2. How to change the order and allocation between the iterations. 3. What kind of improvements of the solutions to do.

5.2 Manual interaction

Since the problem addressed in this paper previously was solved completely manually, it is not far-fetched to consider manual interaction with our proposed methods. Our goal here is to find out how much this might help.

Since the street networks are not exceedingly large, it is not impossible to do the initial allocation by hand. We will later describe how one can, in our tool Vineopt, select a set of links and designate that set as allocation for a vehicle. This needs to be done q times, and for rather small areas, the number of vehicles is rather limited.

Another possibility is to modify an existing allocation. If the links in the areas for different vehicles are shown in different colors on a map, it is easier for a human to find promising changes of the allocation. The idea is to move links from vehicles that do much to vehicles that do less.

Informal testing in a project in an advanced course at Linköping university gave the result that manual improvements gave significant improvements, see section 6.3.

(13)

5.3 k-means clustering

Given the coordinates of the nodes N, the k-means clustering problem means finding k centers and allocating each node to a center, so that the sum of distances from each node to its allocated center is minimal. The problem is NP-hard, but efficient heuristics exist, see for example Lloyd (1982).

This can be used for our problem with k = q, i.e. to create one cluster for each vehicle. This gives a partitioning of the nodes to the vehicles. Since we are more interested in the links, we must do the following. If both the starting and ending node of a link belongs to the same cluster, the link is allocated to that cluster. However, if the starting node and the ending node of a link belongs to different clusters, we must decide to which cluster of the two the link should belong. In our computational test, we have tried some simple heuristic ways, namely to allocate the link to the cluster that has the highest index of these two, or to the lowest index, or randomly to one of the two clusters. We have also tried the following. If link j has its two end nodes in different clusters, sj ∈ A and ej ∈ B, we calculate the “cost” of moving each node to the other cluster, as

the distance from each cluster center to the other endpoint of the link. If this distance is large, the vehicle has to travel far from its center to include the link. Obviously this is no exact measure at all, but it may give some indication. We then choose the allocation that minimizes this measure.

Let d(A, sj) denote the distance between center of cluster A and node sj, and d(B, ej)

the distance between center of cluster B and node ej. If node ej is moved to cluster A,

we get the distance d(A, sj)+lj, and if node sj is moved to cluster B, we get the distance

d(B, ej) + lj. Obviously, if d(A, sj) < d(B, ej), then the “cost” is least if we choose the

first alternative. Thus, if d(A, sj) < d(B, ej), then we move node ej to cluster A, and

if d(A, sj) > d(B, ej), then we move node sj to cluster B.

In the rest of the paper, we will use “vehicle” and “cluster” interchangeably, both indexed with k.

One might think that is will never be better to let the different vehicles go into each others clusters. However, in figure 2 we give a red and a blue cycle, with lengths on the paths. Swapping the red and blue vehicles on the shorter paths as shown to the right in the figure, makes the longest cycle, the red one, shorter, so it improves the solution. Thus we see that it may be beneficial to let vehicles cross paths.

5.4 Details of the method

At the heart of the method we have the code for solving a rural postman problem, Holmberg (2010). The set of required links for vehicle k is simply those links that have κj = k.

Two important vectors are o, ord, which is the order in which the vehicles are considered, and κ, vehdo, which states which vehicle should clean each link.

(14)

3 4 10 7 3 4 10 7

Figure 2: Changing allocation. The method contains the following parts.

1. Read the network.

2. Construct a starting order.

3. Construct an initial allocation of links to vehicles. 4. Solve the rural postman problem for each vehicle.

5. Optional: Make a vehicle clean all uncleaned links passed by it, even if they were allocated to another vehicle.

6. Evaluate the objective function.

7. Optional: Improve the solution by moving cycles from one tour to another one. 8. Optional: Change the allocation to the current solution.

9. Change the order for the vehicles.

10. Change the allocation of links to vehicles. 11. Repeat steps 4 - 10.

12. Save the allocation of links to vehicles.

The total cost, which is the sum of the costs for each vehicle’s tour plus the fixed costs for vehicle, is computed at each iteration. Moreover the time for the solution is computed, which is the maximal over the vehicles’ times. The objective function value is then computed as a weighted sum of the cost and the time.

Simulated annealing is used for moving to a new allocation (for κ), i.e. better points are always accepted and worse points are accepted with a certain probability.

Steps 3, 9 and 10 can be done in various ways, as described later. We also have to choose which of the optional steps 5, 7 and 8 to do. Below we give a list of the user-controlled parameters, with abbreviations, and possible values. (SA stands for simulated annealing.)

(15)

Parameter Abbr Description

maxiter MI Number of main iterations

markdone MD Let all passed links be cleared by the vehicle, (0,1) dorevsol RS Change the allocation following the solution, (0,1) startvar SV Variant for starting allocation, (0-16)

movevar MV Variant for changing allocation, (0-7) moalloc MA Number of steps for vehdo to be moved chordvar ChV Variant for changing order, (0-5) moord MO Number of steps for ord to be moved impvar IV Variant for the improvement heuristic, (0-3) cymvar CyV Variant for moving cycles, (0-4)

cymimp CI Move cycles only if if gives improvement, (0,1) tcymvar TC Variant for two cycle move, (0,1)

fixcore FC Use fixed core, (0,1) fixcoredelta FD Fixed core proportion, δF C

unfixext UF Use vehicle area reduction, (0,1) ufixdelta UD Vehicle area reduction proportion, δAR

starttemp ST Starting temperature in SA

intiter II Number of iterations with fixed temperature in SA rcold RC Cooling factor in SA

In the following sections, we will describe these parameters in more detail.

5.4.1 Mark links done

The method first finds a tour for the first vehicle, which passes all links that are allocated for the vehicle. If markdone=1, all links passed by the vehicle are marked as done, i.e. these links do not need to be treated by other vehicles. This may mean that the next vehicle has less work to do. If we change the order in which tours for vehicles are decided, a different solution could be generated.

Therefore the vector ord can be changed to get different solutions. There are several different approaches to (randomly) change ord, see below.

Step 8 in the algorithm is only interesting if step 5 is used. It decides if the changed allocation should be saved for later iterations, or if the old allocation (which was not followed) should be kept.

5.4.2 Starting allocation

It can be very important which starting allocation is used. One possible use of the method is to use only the starting allocation, without subsequent tries to improve it. We work with the vector κ, vehdo. It is controlled by the parameter startvar.

(16)

startvar Action

0 Start from the current allocation (assuming there is one). 1 Create a random allocation.

2 Read a link set from Vineopt and use as a starting allocation. 3 Let vehicle 1 do everything.

4 Sort in x for starting node. 5 Sort in x for ending node.

6 Sort in x for middle point on links. 7 Sort in y for starting node.

8 Sort in y for ending node.

9 Sort in y for middle point on links.

10 Sort by distance from the origin to starting node. 11 Sort by distance from the origin to ending node.

12 Sort by distance from the origin to middle point on links.

13 Use k-means, with boundary links allocated to the highest number. 14 Use k-means, with boundary links allocated to the lowest number. 15 Use k-means, with boundary links randomly allocated.

16 Use k-means, with boundary links allocated to minimize distance to center. Using startvar = 0, we can repeatedly try to improve the current solution, while re-setting the simulated annealing temperature between the runs. The case startvar = 2 enables starting from a previously constructed allocation. This can be used iteratively, to continue with a previous allocation that has been improved by other means (in Vi-neopt). For startvar = 4 - 12, the links are sorted in various ways, and the allocation is made for one vehicle at a time, picking the closest links in order. It can be seen as a kind of (crude) geographical clustering. For startvar = 13 - 16, the nodes are clustered in q groups (with the code kmeans), thereby inducing an allocation of the links for the vehicles. The difference is how boundary links, i.e. links with the end nodes in different clusters, are treated.

An interesting question is if one should try to find the best possible starting solution, or if a worse starting solution may enable the metaheuristics to find even better solutions.

5.4.3 Change allocation

The changes of the allocation of links to vehicles is done in the vector κ, controlled by the parameters movevar and moalloc. The changes are (with one exception) random, intended for a simulated annealing framework, and not aiming towards local improve-ment.

(17)

movevar Action 0 No change.

1 Swap two random links. 2 Change moalloc random links.

3 Move a link from a vehicle that does most to a vehicle that does least. 4 Move a link between two random vehicles that have both nodes in common. 5 Swap a link between two random vehicles that have both nodes in common. 6 Move a link, when one node is in common.

7 Swap a link, when one node is in common.

For movevar = 3, the number of links allocated to each vehicle is calculated, and a link is moved from the vehicle that has the highest number of links to the vehicle that has the least number of links. For movevar = 4 - 7, two random vehicles are chosen, and a change is done if the corresponding tours have one (6, 7) or two (4, 5) nodes in common. The change is either to move a link (4, 6) or to swap the two links (5, 7). In the case of two nodes in common, the previous tours are still feasible, but maybe one of them can be shortened, as the vehicle is not required to clear the link.

5.4.4 Change order of vehicles

To change the order of vehicles, we may swap elements in the vector o (ord), or shift it a number of steps to the left or to the right. In detail, we have the following possibilities, controlled by parameters chordvar and moord.

chordvar Action

0 No change of ord.

1 Swap two random elements in the vector ord. 2 Create a completely new order.

3 Shift the vector ord moord steps to the right. 4 Shift the vector ord moord steps to the left. 5 Swap the most and least used vehicles.

For chordvar = 5, we sum up the number of links allocated to each vehicle, and switch the positions of the vehicle that has the most links allocated to it and the vehicles that has the least. If we are using markdone = 1, this often means swapping places between the first and the last vehicle, and will make a big difference for the next tours.

5.4.5 Improve solutions

In figure 3, we first give two tours, one short red (dashed) and one longer blue. Both vehicles pass the middle node, so one may move the cycle shown in green (dotted) in the middle figure from blue to red, without the need for any vehicle to move to any other node. The total distance is unchanged by this, but the longer cycle becomes shorter, and the shorter cycle becomes longer, so the maximal time is decreased.

Here we try to improve the solution by finding a cycle in a tour, checking if the cycle contains a node in another tour, and then moving the cycle to that tour. Note that this

(18)

Figure 3: Moving cycles.

does not change the total cost for the solution, as precisely the same subtours are used. However, moving a subtour from one vehicle to another may decrease the final time. It is controlled by the parameter impvar.

impvar Action

0 Do not move cycles.

1 Move cycles, one random try.

2 Move cycles, terminate when there is no improvement. 3 Move cycles, try all combinations.

Clearly impvar = 1 is very quick, but usually fails, while impvar = 3 takes quite a long time.

5.4.6 Cycle moving

This procedure is invoked from Improve solution, and performs the actual movement of the cycle. It is controlled by the parameter cymvar.

cymvar Action 0 No change.

1 Try to move a random cycle between two random vehicles. 2 Try to move a cycle from a long tour to a short one. 3 Try to move a cycle between two given vehicles.

4 Try to move a cycle from an expensive tour to a cheap one.

The choice cymvar = 3 is only used for impvar = 3. If cymvar = 4 succeeds, it usually gives improvement.

When two cycles are chosen, one try is done if the parameter tcymvar = 0. If tcymvar = 1, all possible moves are tried.

5.4.7 Fixed core

As the evaluation of all possible changes in a local search or metaheuristic may take a significant time, it is interesting to try to reduce this time by reducing the number of

(19)

should belong to this cluster, and not be moved to another. Therefore we may use a modification called “fixed core”, which simply means that links that lie within a certain distance of the center of the cluster are not moved, i.e. the metaheuristic skips these changes.

First let dF C

jk = max(d(Ck, sj), d(Ck, ej)), where Ckis the center of cluster k and d(Ck, i)

is the distance between Ck and node i. We use dF Cjk as the distance between link j and

the center of cluster k. Now we find the minimal of those, dF Cmin

j = minkdF Cjk , over the

clusters, yielding k1 as argument, and the second minimal, dF Cmin2

j = mink:k6=k1dF Cjk ,

and calculate the quotient between them, δj = dF Cminj /dF Cmin2j . This is compared to

a given value, δF C (called “fixcoredelta”). All links j with δ

j < δF C are considered to

be the fixed core, and we do not consider changing them. In other words, a link is in the fixed core if the closest cluster center is much closer then the second closest, i.e. if dF Cmin

j < δF CdF Cmin2j . Setting δF C = 0.5 would mean that the distance to the second

closest should be more than twice the distance to the closest.

This can be used only when the starting allocation is based on clustering, and the calculations of the distances are only done once, directly after the starting allocation has been decided.

5.4.8 Vehicle area reduction

Another possibility, called “vehicle area reduction”, aims at decreasing the size of the rural postman problems that need to be solved. Recall that a rural postman problem is solved for each vehicle, with required edges those that are allocated to the vehicle. Usually this is done in the whole network. However, if the allocated links lie in a very restricted part of the whole network, it is a fair guess that the vehicle should not wander off into other distant parts of the network. Therefore we omit all links that lie further away from the allocated links than a certain limit. This way the rural postman problems become smaller, and are quicker to solve.

Considering cluster k, we find the minimal distance between links in that cluster, Sk,

and each link j not in that cluster. dARjk = min

j1∈Sk

(min(d(sj1, sj), d(ej1, sj), d(sj1, ej), d(ej1, ej))) for all j 6∈ Sk.

This is compared to the maximal distance within the cluster, where we also take single links into account.

dARmaxk = max

j1∈Sk,j2∈Sk

(max(d(sj1, sj2), d(ej1, sj2), d(sj1, ej2), d(ej1, ej2), lj1, lj2)).

If dAR

jk > δARdARk , link j is considered to lie far away from cluster k, and link j is not

included in the rural postman problem for vehicle k. Values for δAR could be around 2,

which means that the minimal distance between the link and a link in the set is twice as large as the maximal distance between two nodes within the set.

(20)

Figure 4: Node selection in Vineopt

allocation is changed. It is done just before the rural postman problem is solved. Unfortunately it is somewhat time consuming, and if no links with dAR

jk > δARdARk are

found, it is a waste of time.

6

Computational details

6.1 Vineopt

We use the graphic network optimization tool Vineopt, written by Kaj Holmberg in Tcl/Tk, see www.vineopt.com. It has the ability to show networks and allow changes in them, as well as solve various optimization problems in graphs, in this case most notably the Chinese postman problem (optimally) and the rural postman problem (heuristi-cally). (The optimization codes are written in C.)

Vineopt can visualize solutions and link sets (in different colors), over a map background obtained from OpenStreetMap. It also allows manual creation and changes of the link sets. Here the link sets represent the allocations.

We can use the codes within Vineopt for solving the Chinese postman problem and rural postman problem. The allocation of links to vehicles can in Vineopt be done by hand and/or with the help of heuristics.

(21)

6.2 Input data

The street networks have been downloaded from OpenStreetMap and converted to Vi-neopt format (as rural postman problems, undirected graphs with arc costs and possi-bility to define “required” links). The arc costs are equal to the length of road segments measured in meters. See Holmberg (2015b) for details.

In our computational tests, we consider the average speed to be vA= 7.2 km/h, which

is 2 m/s. The time to clean a road is estimated in average to be twice the length of the road divided by the speed, i.e. we use p = 2. With these assumptions, the operation takes exactly one second per meter, i.e. it takes lj seconds to clean street j if it has

length lj. We also give one second the cost of one, so times will be equal to costs. We

assume that the fixed cost is 200 for each vehicle. Therefore the total cost for a solution is the sum of the costs for each vehicle plus number of vehicles times 200. The total objective function value is here the sum of the maximal time and the total cost.

6.3 Preliminary student work

The basis for this work has been used in a project in an advanced course in Opti-mization at Linköping University. The students used a preliminary code, written in Matlab/Octave, called snowplan.

They used a small network, colonia, (student accommodations) with 24 nodes and 36 links, two slightly larger networks, skanninge-n (Skänninge norra), with 62 nodes and 80 links and atvid-s (Åtvidaberg södra), with 68 nodes and 95 links, as well as two larger, studentryd (part of Ryd where students live), with 387 nodes and 519 links and vadstena (a small town with a large castle), with 581 node and 778 links.

The following was done by the students. The small problem colonia was first solved for one vehicle. Then a solution for two vehicles was found by doing link selection/allocation manually in Vineopt. The same was done for three vehicles. Then the best of these solutions was found, first under the assumption that time and cost are of equal impor-tance, i.e. wA= wC, and then under the assumption that time is twice as important as

cost, i.e. wA= 2wC.

Then the same was done with snowplan, without manual intervention.

After this, the same was done for the slightly larger problem skanninge-n (Skänninge norra).

For the problem atvid-s (Åtvidaberg södra), solutions for 1, 2, 3 and 4 vehicles were found using snowplan. The best number of vehicles was then found for the two weight scenarios above.

Finally the goal was to find a very good solution for 6 vehicles for the largest problem vadstena, with equal weights for cost and time. First snowplan was run, and the times for each vehicle noted, especially which vehicle took the longest time. Then this solution was improved in Vineopt, by moving arcs from one set to another. After this,

(22)

the allocation was imported into snowplan, and the program was run again.

The students were encouraged to do this a couple of times, by the announcement of a competition, to see which group produced the best solution. The results were quite varied, and some students did more manual work than others. Unfortunately many groups let snowplan do too few iterations, due to a limited practical experience of metaheuristics. Therefore the manual improvements were significant.

6.4 New implementation

A new implementation has been done in Python, using Numpy and Scipy (providing the code kmeans). The tests were run on an Acer Aspire X3 X3995 3.4GHz, running Linux, Fedora Core 22. The machine has four CPUs, but only one was used in the test runs. For visual aid, Tkinter and networkx were used. For solving the rural postman problems, we use a heuristic method described in Holmberg (2010), implemented in C.

7

Computational tests and evaluation

7.1 Test problems

The methods have been tested on several different problem instances, based on Open-StreetMap-data, obtained from the Internet. See Holmberg (2015b) for details of the data extraction procedure. The networks cover smaller cities around Linköping, and also different parts of Linköping.

A certain filter was applied to the OSM-data, leaving only streets (highways) with the following label: “motorway”, “trunk”, “primary”, “secondary” and “tertiary”, but leaving out “road”, “cycleway”, “living_street”, “pedestrian”, “footway”, “path” and “residental”. These instances are thus based on real life networks, with real life distances, but with certain links removed, and nodes with degree two eliminated by simply adding the two adjacent links into one, summing up the costs. Therefore the curvature of the link is not visible, but the distance is correct.

We have, for practical reasons, divided the set into three parts, depending on the size. The first part contains networks with less than 200 nodes. They are rather small cities or areas, and give rather easy problems. The second part contains networks with between 200 and 400 nodes. These problems are a bit more time consuming to solve. The third part contains the most difficult problems, networks with more than 400 nodes.

In table 1, we give the number of nodes and links, the total distance of all the links (i.e. the total distance to be cleared from snow), the average node degree, and the number of inhabitants for the cities represented in the test set. For the examples based on parts of Linköping, no number of inhabitants can be specified. (The whole of Linköping has around 140 000 inhabitants.)

(23)

After this, we give pictures of some of the networks.

Name Nodes Links Total dist Deg What? Inhab

atvid-s 68 95 2028 1.40 Åtvidaberg, south

-brokind 179 199 2664 1.11 Brokind 502

colonia 24 36 131 1.50 Colonia, student homes

-ekangen 149 184 2629 1.23 Ekängen 2037

mantorp-c 122 145 2243 1.19 Mantorp, central

-mantorp 185 226 4152 1.22 Mantorp 3671

rimforsa-o 94 109 1474 1.16 Rimforsa, east

-skanninge-c 122 152 2292 1.25 Skänninge, central

-skanninge-n 62 80 974 1.29 Skänninge, north

-skanninge 127 158 2322 1.24 Skänninge 3140

studentryd-e 76 104 543 1.37 Ryd E

-sturefors 183 212 3283 1.16 Sturefors 2229

valla-liu 160 213 1183 1.33 Valla, university part

-vikingstad 178 213 3390 1.20 Vikingstad 2096

atvid 220 290 5940 1.32 Åtvidaberg 6859

borensberg 211 257 4994 1.22 Borensberg 2886

kisa 311 359 4541 1.15 Kisa 3687

liu 291 394 2713 1.35 Linköping University

-rimforsa 233 262 2837 1.12 Rimforsa 2238

ryd1 382 508 2200 1.33 Ryd

-studentryd-int 235 316 1494 1.34 Ryd, student part -studentryd 387 519 2920 1.34 Ryd, student part

-linghem 836 1129 6624 1.35 Linghem 518 ljungsbro 812 1024 14013 1.26 Ljungsbro 6620 malmslatt 489 626 6542 1.28 Malmslätt 5214 mjolby 419 524 11894 1.25 Mjölby 12245 ryd-m 1107 1495 10910 1.35 Ryd -ryd 952 1291 7903 1.36 Ryd -ryd2 987 1337 9174 1.35 Ryd -soderkoping 666 910 10998 1.37 Söderköping 6992 vadstena 581 778 7785 1.34 Vadstena 5613 valla 527 707 5583 1.34 Valla

(24)

VINEOPT

Figure 5: Åtvidaberg (atvid), 224 nodes, 294 links.

VINEOPT

(25)

VINEOPT

Figure 7: Kisa, 311 nodes, 359 links.

VINEOPT

(26)

VINEOPT

Figure 9: Ljungsbro, 812 nodes, 1024 links.

VINEOPT

(27)

VINEOPT

Figure 11: Mantorp central (mantorp-c), 122 nodes, 145 links.

VINEOPT

(28)

VINEOPT

Figure 13: Söderköping (soderkoping), 666 nodes, 910 links.

VINEOPT

(29)

VINEOPT

Figure 15: Valla, 527 nodes, 707 links.

VINEOPT

(30)

Figure 17: Mantorp, G30, q = 4.

7.2 Preliminary tests

First we made some preliminary tests, in order to find promising values of the parame-ters.

In figures 17 and 18, we give pictures of allocations, where different vehicles are rep-resented by different colors. One may see parts of the allocations that do not seem to be optimal. In both these examples, the yellow vehicle seems to be driving around too much. However, one cannot be certain of this. If, for example, the yellow vehicle is ready much before the others, it makes sense for it to help with parts that might delay the others. (The pictures are only examples, and not certain to be good solutions.) In the figure 19, we show a preliminary run with Snowplan. In the graph at the bottom of the picture, the blue line denotes the actual objective function value for each iteration, the green cross denotes the objective function value after the improvement procedure, and the dashed red line denotes the best objective function value obtained up to that iteration. The light blue horizontal line denotes the lower bound.

In the top of the picture, one can see the parameters that are possible to change, and their current values. At the top left, the total time for each vehicle is shown. There one can identify the vehicles that takes the longest and the shortest time, and may consider moving links between them. In this example, one may consider moving links from vehicles 1 and 2 to vehicles 3 and/or 4.

(31)

Figure 18: Åtvidaberg, A30, q = 4.

In the middle green part, the best objective function value is shown, together with some more information, such as at which iteration the best value was found, and the lower bound.

In the figures 20 - 22, we show some more runs, mostly to show the curves of objective function values. One can see that there is no monotone improvement. However, this depends on which starting solution was used.

In the figure 23, we show how the network and allocation are brought into Vineopt. Figure 24 shows zooming in, which allows single links to be changed in Vineopt. The resulting allocation can then be saved and used as starting solution in Snowplan. In tables 31 - 32 in the Appendix, we present preliminary tests, made in order to find interesting values of the parameters. The best results are shown ordered in table 33, and a group of faster settings in table 34.

These preliminary computational tests yield several interesting settings. One should remember that the method contains randomness, so all results should be regarded as approximate. In any case, in these tests, the best setting seems to be the following: markdone 1, dorevsol 1, startvar 13, movevar 3, impvar 3, chordvar 5, cymvar 4, cymimp 0, tcymvar 0, fixcore 0, intiter 7, starttemp 1000, rcold 0.3. In words: Mark passed streets done, revise allocation after this, start with k-means, put border links in the highest number set, move a link from a vehicle that does most to one that does least, try all combinations of moving cycles, swap the most and least used vehicles, try to move a cycle from an expensive tour to a cheap one, move a cycle even if it does not give

(32)
(33)

Figure 20: Snowplan: Åtvidaberg, G100, q = 4.

(34)

Figure 22: Snowplan: Åtvidaberg, G100, q = 4.

(35)

Figure 24: 1046: Vadstena l4, Vineopt, zoom, q = 6.

improvement, try once for each pair of vehicles, do not use a fixed core. In simulated annealing, do 7 interior iterations (with the same temperature), use start temperature 1000 och cooling factor 0.3.

We do not claim that these settings are the best, but only consider them a promising possibility. If this tool is to be used on a certain city, one would obviously do additional parameter tuning.

We have chosen a number of interesting settings to try more. They are shown in table 2.

We will also use the notation Ak, Bk etc, which denotes setting A with k iterations. For the setting A1, B1 etc, the method becomes a one-shot heuristic, which however may be rather good. If the starting solution is very good, the succeeding changes may not give much improvement, and the question is how many iterations one should spend on trying to improve the solution. In some cases, one may spend a fair amount of time for quite small improvements or none at all.

We also made some preliminary tests with fixed core and vehicle area reduction on the instance atvid, with q = 4, n = 220 and m = 290. Common settings are in principle A above, but with start variant 15. Preliminary conclusions are that the effect of fixed core is very small, and that vehicle area reduction doesn’t pay off. A disadvantage is that the check of which links to include in the rural postman problem must be redone after each change of the allocation, i.e. each iteration. The gain in time of a smaller rural postman problem is much less the the increase of time needed for the additional calculations.

(36)

Name MD RS SV IV ChV CyV TC II RC A 1 1 13 3 5 4 0 7 0.3 B 1 1 13 3 5 4 0 10 0.5 C 1 1 14 3 5 4 0 7 0.3 D 1 1 15 3 5 4 0 10 0.5 E 1 1 16 3 5 4 0 7 0.3 F 1 1 13 3 5 4 1 7 0.3 G 1 0 13 3 5 4 0 7 0.3 H 1 1 7 3 5 4 0 7 0.3 I 0 0 13 3 5 4 0 7 0.3 J 1 1 10 3 5 4 0 7 0.3 K 1 1 1 0 5 0 0 7 0.3 L 1 1 1 0 2 0 0 7 0.3

Table 2: Settings to try. Additionally MI=30, MV=3, CI=0, FC=0, ST=1000 for all.

Name FC FD UF UD Obj Time

Q 0 - 0 - 10063.39 7.85

R 1 0.5 0 - 10553.78 7.77

S 0 - 1 1.5 10463.08 15.11 T 1 0.5 1 1.5 10667.33 14.55

Table 3: Tests with fixed core and vehicle area reduction on atvid.

7.3 Tests with manual improvements

We have tried manual improvement on the example Vadstena, with q = 6. After the first run of Snowplan, we had the objective function value 12152. We brought the allocation into Vineopt, and move some links from the vehicles that did most, to a vehicle that did much less. When we read this allocation into Snowplan, we got the value 12123. Repeating this several times, gave the values 12002, 12015, 11994, and 11961. We see that it gives significant improvements. However, the improvements are not monotone, since we don’t know exactly how the vehicles will travel after the change. Finally we let Snowplan do several more iterations with the best solution, which improved it to 11934. We also have the lower bound l1

= 11791, so this solution is quite close to the optimal one. The relative error is around 1%.

7.4 Tests of one-step methods

In the tables 35 - 46 in the Appendix, we give the results for the settings with only one iteration, followed by one round of improvements. Here we use four vehicles. In the tables 4 and 6, we give the objective function values of the different settings. In the tables 5 and 7, we give the times. Here we find that the times are very reasonable. In table 8, we give the minimal (best) and maximal (worst) objective function values for each problem, and also give which setting gave this. We do the same with the solution

(37)

Name A1 B1 C1 D1 E1 F1 atvid-s 4292 4202 4098 4043 4002 4097 brokind 5761 5766 5865 5833 6060 6088 colonia 1021 1000 1012 1001 992 1014 ekangen 5077 5712 5653 5736 5567 4999 mantorp-c 4511 4556 4558 4757 4576 4611 mantorp 7598 7869 7974 7502 7685 7685 rimforsa-o 3485 3427 3388 3546 3373 3469 skanninge-c 4492 4673 4649 4642 4668 4688 skanninge-n 2433 2446 2451 2438 2362 2458 skanninge 4712 4810 4486 4772 4610 4834 studentryd-e 1690 1628 1639 1645 1588 1649 sturefors 6477 6633 6449 6576 6449 6495 valla-liu 2718 2676 2607 2686 2864 2676 vikingstad 7180 7178 7456 7647 7723 8918 atvid 10381 10501 11209 10581 10727 10622 borensberg 11423 9851 11940 10360 10761 10389 kisa 9133 9454 9650 9058 9089 8720 liu 5161 5568 5429 5629 5338 5205 rimforsa 6298 6010 6016 6099 5880 6028 ryd1 4110 4085 4352 4094 4073 4380 studentryd-int 3083 2995 2991 3034 3024 3126 studentryd 5439 5396 5545 5446 5498 5438 linghem 11731 11219 11997 11423 11259 11320 ljungsbro 23866 24235 23864 24506 23571 25426 malmslatt 10867 10712 10529 10973 10538 11030 mjolby 21177 21117 21225 23912 21185 21345 ryd-m 17561 17558 16718 17158 17732 17242 ryd 12612 12889 12341 12576 12273 12477 ryd2 14359 14400 14948 14250 14280 15438 soderkoping 18017 18440 18950 18818 17928 18680 vadstena 12548 12603 12799 12504 12531 12843 valla 11094 10217 9928 9733 9709 9713

(38)

Name A1 B1 C1 D1 E1 F1 atvid-s 0.06 0.06 0.06 0.07 0.06 0.07 brokind 0.20 0.20 0.20 0.20 0.20 0.19 colonia 0.04 0.04 0.03 0.03 0.04 0.04 ekangen 0.15 0.20 0.16 0.15 0.15 0.15 mantorp-c 0.11 0.11 0.10 0.11 0.11 0.10 mantorp 0.22 0.24 0.25 0.21 0.22 0.23 rimforsa-o 0.08 0.08 0.08 0.08 0.07 0.08 skanninge-c 0.12 0.13 0.11 0.11 0.10 0.12 skanninge-n 0.07 0.06 0.05 0.05 0.05 0.06 skanninge 0.11 0.11 0.12 0.11 0.11 0.12 studentryd-e 0.07 0.07 0.06 0.06 0.06 0.07 sturefors 0.21 0.27 0.21 0.22 0.21 0.21 valla-liu 0.18 0.17 0.17 0.21 0.17 0.17 vikingstad 0.22 0.21 0.21 0.22 0.22 0.21 atvid 0.33 0.33 0.34 0.32 0.34 0.32 borensberg 0.30 0.28 0.30 0.28 0.34 0.30 kisa 0.87 0.66 0.75 0.70 0.71 0.70 liu 0.63 0.60 0.63 0.60 0.61 0.63 rimforsa 0.36 0.35 0.42 0.35 0.37 0.36 ryd1 1.47 1.45 1.19 1.30 1.28 0.94 studentryd-int 0.43 0.43 0.39 0.38 0.41 0.39 studentryd 1.28 1.37 1.33 1.48 1.36 1.41 linghem 8.74 9.05 8.96 8.80 9.32 8.61 ljungsbro 8.24 8.25 8.24 8.28 8.39 8.16 malmslatt 2.16 2.30 2.11 2.23 2.37 2.11 mjolby 1.38 1.54 1.44 1.53 1.54 1.46 ryd-m 23.15 23.18 23.34 23.28 22.95 23.29 ryd 15.45 14.66 14.58 14.80 15.78 14.87 ryd2 16.52 16.61 16.62 16.61 16.17 16.51 soderkoping 5.03 5.07 4.69 4.61 4.80 5.05 vadstena 4.01 3.49 3.68 3.49 3.74 3.65 valla 2.65 2.50 2.52 2.56 2.55 2.78

(39)

Name G1 H1 I1 J1 K1 L1 atvid-s 4029 4020 4084 4069 4876 5263 brokind 5647 6567 5962 6531 9954 9803 colonia 1007 1011 1002 1024 1071 1065 ekangen 5170 5202 5141 5513 7998 8099 mantorp-c 4692 5018 4642 4906 7403 7247 mantorp 7925 8095 7573 7933 11861 12261 rimforsa-o 3466 3384 3362 3380 4972 5133 skanninge-c 4540 4872 4863 4887 6535 6372 skanninge-n 2438 2475 2476 2501 3083 3366 skanninge 4764 4898 4484 4930 6782 6875 studentryd-e 1694 1641 1666 1619 1936 1873 sturefors 6466 6908 6629 6958 10338 9429 valla-liu 2754 2949 2835 2983 3600 3426 vikingstad 7768 7915 7512 8250 11215 11352 atvid 10355 10650 10620 11035 15662 14978 borensberg 10358 10137 10922 10154 13794 13834 kisa 9491 9550 8942 9530 14403 14554 liu 5184 5274 5516 5298 6838 6845 rimforsa 5842 6747 5898 6612 9653 9807 ryd1 4147 4050 4106 4037 5457 5554 studentryd-int 3085 3158 3172 3151 4118 4206 studentryd 5254 5425 5388 5419 7301 7021 linghem 11764 11212 11564 11178 16745 16872 ljungsbro 24840 23960 23937 24001 36856 36365 malmslatt 11030 11358 11080 11373 16443 15939 mjolby 21076 23044 21775 23045 31275 32309 ryd-m 17744 17340 17491 17201 23525 23316 ryd 12833 12380 12316 12399 17273 17174 ryd2 14952 14774 14293 14984 19164 19687 soderkoping 19067 18081 18624 17976 24275 24289 vadstena 12543 12565 12795 12570 17762 17801 valla 10056 9764 9982 9797 13165 13054

(40)

Name G1 H1 I1 J1 K1 L1 atvid-s 0.05 0.06 0.06 0.06 0.04 0.05 brokind 0.25 0.21 0.17 0.21 0.18 0.19 colonia 0.04 0.03 0.03 0.04 0.03 0.03 ekangen 0.15 0.15 0.12 0.15 0.12 0.13 mantorp-c 0.11 0.11 0.09 0.11 0.08 0.08 mantorp 0.24 0.24 0.18 0.22 0.23 0.18 rimforsa-o 0.09 0.07 0.06 0.08 0.06 0.06 skanninge-c 0.11 0.10 0.08 0.11 0.09 0.08 skanninge-n 0.05 0.06 0.05 0.05 0.04 0.04 skanninge 0.12 0.11 0.10 0.11 0.09 0.09 studentryd-e 0.06 0.07 0.06 0.06 0.05 0.05 sturefors 0.29 0.22 0.18 0.22 0.18 0.18 valla-liu 0.17 0.19 0.15 0.19 0.14 0.13 vikingstad 0.22 0.22 0.18 0.25 0.18 0.18 atvid 0.32 0.34 0.30 0.36 0.33 0.30 borensberg 0.28 0.30 0.25 0.31 0.27 0.25 kisa 0.66 0.73 0.71 0.76 0.72 0.73 liu 0.72 0.61 0.54 0.66 0.67 0.72 rimforsa 0.32 0.39 0.29 0.37 0.32 0.37 ryd1 1.17 1.36 1.28 1.27 1.49 1.46 studentryd-int 0.36 0.40 0.31 0.37 0.39 0.59 studentryd 1.30 1.33 1.33 1.33 1.63 1.42 linghem 8.93 8.97 8.17 8.67 16.14 15.91 ljungsbro 8.20 8.31 7.58 8.44 13.52 14.09 malmslatt 2.18 2.21 2.01 2.16 2.79 2.86 mjolby 1.37 1.43 1.20 1.48 1.73 1.56 ryd-m 22.87 22.93 21.75 23.07 45.44 46.06 ryd 14.17 14.86 13.78 14.90 28.06 27.65 ryd2 16.25 16.44 15.51 16.52 30.60 31.26 soderkoping 4.54 5.02 4.38 4.84 7.79 7.28 vadstena 3.57 3.48 3.25 3.82 4.89 5.24 valla 2.45 2.55 2.27 2.55 3.45 3.37

(41)

Obj Time Lowb

Name Min Max Min Max l0

l1 atvid-s E1 4002 L1 5263 K1 0.04 D1 0.07 3335 3690 brokind G1 5647 K1 9954 I1 0.17 G1 0.25 4130 5225 colonia E1 992 K1 1071 C1 0.03 A1 0.04 964 981 ekangen F1 4999 L1 8099 I1 0.12 B1 0.20 4086 4707 mantorp-c A1 4511 K1 7403 K1 0.08 A1 0.11 3604 4174 mantorp D1 7502 L1 12261 I1 0.18 C1 0.25 5990 6948 rimforsa-o I1 3362 L1 5133 I1 0.06 G1 0.09 2643 3105 skanninge-c A1 4492 K1 6535 I1 0.08 B1 0.13 3665 4259 skanninge-n E1 2362 L1 3366 K1 0.04 A1 0.07 2017 2248 skanninge I1 4484 L1 6875 K1 0.09 C1 0.12 3703 4300 studentryd-e E1 1588 K1 1936 K1 0.05 A1 0.07 1479 1559 sturefors C1 6449 K1 10338 I1 0.18 G1 0.29 4904 5826 valla-liu C1 2607 K1 3600 L1 0.13 D1 0.21 2279 2533 vikingstad B1 7178 L1 11352 I1 0.18 J1 0.25 5038 6341 atvid G1 10355 K1 15662 I1 0.30 J1 0.36 8225 9657 borensberg B1 9851 L1 13834 I1 0.25 E1 0.34 7042 8785 kisa F1 8720 L1 14554 B1 0.66 A1 0.87 6476 7981 liu A1 5161 L1 6845 I1 0.54 G1 0.72 4191 4931 rimforsa G1 5842 L1 9807 I1 0.29 C1 0.42 4346 5266 ryd1 J1 4037 L1 5554 F1 0.94 K1 1.49 3550 3926 studentryd-int C1 2991 L1 4206 I1 0.31 L1 0.59 2668 2926 studentryd G1 5254 K1 7301 A1 1.28 K1 1.63 4450 5074 linghem J1 11178 L1 16872 I1 8.17 K1 16.14 9080 10562 ljungsbro E1 23571 K1 36856 I1 7.58 L1 14.09 18316 22207 malmslatt C1 10529 K1 16443 I1 2.01 L1 2.86 8978 10187 mjolby G1 21076 L1 32309 I1 1.20 K1 1.73 15668 18851 ryd-m C1 16718 K1 23525 I1 21.75 L1 46.06 14437 16159 ryd E1 12273 K1 17273 I1 13.78 K1 28.06 10678 11910 ryd2 D1 14250 L1 19687 I1 15.51 L1 31.26 12268 13707 soderkoping E1 17928 L1 24289 I1 4.38 K1 7.79 14548 16913 vadstena D1 12504 L1 17801 I1 3.25 L1 5.24 10532 12147 valla E1 9709 K1 13165 I1 2.27 K1 3.45 7779 9039

(42)

We find that the settings K1 and L1 give bad solutions, while good solutions are obtained by several other settings. Some solutions are actually close to the lower bound, but most are not very close.

Setting E1 gives the best solution for 8 instances, followed by G1 and C1, both giving the best for 5 instances.

(43)

7.5 Tests with 30 iterations

In the tables 47 - 58 in the Appendix, we present results of our main test with the chosen settings, A - L, using 30 iterations. In tables 9, 10, 11 and 12, we do a comparison for each instance. Name A B C D E F atvid-s 4014 3842 3859 3921 3982 3862 brokind 5916 5761 5810 5701 5810 5748 colonia 1001 1000 1000 995 1009 1000 ekangen 5607 5299 5595 5214 5327 4995 mantorp-c 4557 4662 4481 4590 4672 4509 mantorp 7353 7520 7477 7650 7523 7777 rimforsa-o 3412 3337 3373 3389 3477 3506 skanninge-c 4375 4484 4458 4545 4676 4647 skanninge-n 2373 2370 2409 2376 2366 2372 skanninge 4470 4628 4476 4521 4562 4450 studentryd-e 1608 1604 1623 1623 1621 1599 sturefors 6988 6686 6482 6418 6744 6466 valla-liu 2692 2665 2712 2737 2845 2669 vikingstad 7574 7234 7360 7534 7547 7365 atvid 10444 10489 10594 10623 10595 10501 borensberg 9451 9481 10073 9894 10257 10190 kisa 9146 9519 8903 8962 9495 9459 liu 5236 5320 5249 5343 5323 5150 rimforsa 5875 5724 5981 5813 5872 5792 ryd1 4094 4028 3993 4038 4050 4046 studentryd-int 3102 3113 2995 3160 3087 3051 studentryd 5242 5304 5256 5243 5345 5336 linghem 11955 11336 11668 11542 11423 11236 ljungsbro 23290 23795 24009 24230 24403 23835 malmslatt 10658 10476 10521 10830 10411 10508 mjolby 21041 21524 21063 21446 21229 22548 ryd-m 16994 16920 16971 16996 16868 17226 ryd 12137 12240 12213 12539 12340 12683 ryd2 14876 14184 14087 14242 13948 14238 soderkoping 17566 18020 18621 17821 17659 19055 vadstena 12416 12582 12474 12492 12530 12343 valla 9897 9721 9593 9730 10022 9691

Table 9: Results, objectives, with settings A-F.

In table 13, we give the best and the worst of the results. Checking how many times each setting gave the best objective function value for q = 4 and 30 iterations, we get the following.

A: 8, G: 6, B: 4, C: 4, E: 4, F: 4, D: 2, H: 1, I: 0, J: 0.

The randomness makes it hard to pick one “best” setting, but here A seems to be a good choice, since it gives the best solution for 8 problems.

(44)

Name A B C D E F atvid-s 1.35 1.42 1.31 1.36 1.37 1.38 brokind 4.45 4.40 4.52 4.51 4.77 4.49 colonia 0.77 0.80 0.85 0.80 0.80 0.78 ekangen 3.56 3.72 3.45 3.24 3.41 3.16 mantorp-c 2.43 2.69 2.41 2.46 2.51 2.32 mantorp 4.83 5.52 5.75 5.18 4.88 5.06 rimforsa-o 1.77 1.88 1.76 1.77 1.76 1.93 skanninge-c 2.43 2.76 2.51 2.57 2.55 2.74 skanninge-n 1.18 1.24 1.33 1.36 1.32 1.32 skanninge 2.65 2.96 2.77 3.02 2.53 2.71 studentryd-e 1.46 2.27 1.49 1.54 1.48 1.57 sturefors 4.85 5.10 5.29 4.55 5.43 5.36 valla-liu 3.86 3.87 3.98 4.06 4.15 3.98 vikingstad 4.84 5.69 5.00 4.71 4.60 4.88 atvid 8.05 8.92 8.58 7.98 8.03 7.12 borensberg 6.49 7.11 7.23 6.48 8.54 7.26 kisa 18.09 15.88 17.17 17.34 16.52 15.56 liu 16.81 14.71 18.70 15.87 16.46 15.75 rimforsa 9.05 8.37 9.77 9.02 8.75 8.06 ryd1 30.48 25.58 27.74 30.46 30.17 27.94 studentryd-int 10.03 8.93 9.57 11.16 9.06 8.39 studentryd 30.41 29.56 33.61 30.25 31.41 28.50 linghem 182.20 182.50 179.77 179.49 190.59 190.22 ljungsbro 161.62 165.63 173.87 161.00 163.33 164.44 malmslatt 49.55 46.92 50.32 48.66 46.41 47.04 mjolby 34.11 38.65 37.27 37.98 35.47 34.24 ryd-m 420.20 422.05 416.06 417.10 419.66 416.16 ryd 277.52 270.36 275.99 270.01 269.26 273.43 ryd2 298.73 300.00 297.11 299.23 297.34 297.81 soderkoping 95.51 98.58 105.69 98.41 101.25 98.66 vadstena 69.41 74.77 74.51 79.45 76.18 72.93 valla 58.29 58.94 58.90 58.57 58.02 56.87

(45)

Name G H I J K L atvid-s 3957 3930 4290 4012 4881 4657 brokind 5859 6567 5878 6531 9134 9082 colonia 989 1005 1006 1020 1042 1034 ekangen 4933 5144 5585 5397 6770 7265 mantorp-c 4473 4904 4561 4855 6760 7093 mantorp 7555 7883 7432 7829 11477 11332 rimforsa-o 3441 3344 3435 3380 4686 4704 skanninge-c 4712 4867 4768 4828 6026 6095 skanninge-n 2390 2415 2458 2439 2791 2840 skanninge 4477 4866 4593 4708 6098 5923 studentryd-e 1621 1628 1619 1616 1720 1732 sturefors 6613 6895 6574 6958 8674 9398 valla-liu 2657 2829 2782 2830 3323 3286 vikingstad 7604 7877 8905 7921 10646 10238 atvid 10443 10600 10785 10801 13963 13890 borensberg 9901 10115 10675 9995 12660 12124 kisa 9213 9498 9807 9447 13040 12769 liu 5168 5274 5622 5227 6250 6353 rimforsa 5894 6592 6020 6612 8794 8837 ryd1 4030 4027 4190 4010 4753 4767 studentryd-int 3058 3158 3025 3099 3739 3697 studentryd 5295 5363 5493 5400 6287 6307 linghem 11611 11132 11748 11161 14713 14804 ljungsbro 23584 23960 24786 23878 32700 32543 malmslatt 10593 11306 11031 11250 13933 14130 mjolby 23003 22623 21558 22750 26573 28322 ryd-m 17202 17008 17715 17194 20340 20164 ryd 12367 12380 12582 12336 14486 14262 ryd2 14575 14774 14367 14958 16957 16699 soderkoping 18220 17840 18436 17802 22537 22223 vadstena 12365 12560 12692 12570 15545 15493 valla 9517 9764 9677 9612 11486 11371

(46)

Name G H I J K L atvid-s 1.29 1.34 1.40 1.73 1.00 1.02 brokind 4.31 4.59 4.66 5.12 3.02 3.15 colonia 0.77 0.77 0.79 0.96 0.69 0.77 ekangen 3.20 3.48 3.92 3.76 2.30 2.32 mantorp-c 2.33 3.68 2.43 2.64 1.79 1.67 mantorp 4.69 5.13 4.72 4.97 3.36 3.47 rimforsa-o 1.67 1.73 1.81 1.83 1.28 1.29 skanninge-c 2.35 2.41 3.39 2.47 1.68 1.71 skanninge-n 1.38 1.21 1.33 1.25 0.90 0.88 skanninge 2.52 2.50 2.59 2.88 1.79 1.82 studentryd-e 1.52 3.08 1.69 2.65 1.14 1.03 sturefors 4.11 4.92 5.69 4.92 3.39 3.24 valla-liu 3.90 4.13 4.15 4.56 2.68 2.59 vikingstad 4.85 5.12 5.01 5.21 3.21 3.63 atvid 7.59 8.45 7.77 7.57 5.40 5.40 borensberg 6.04 7.62 7.25 6.67 4.34 4.49 kisa 16.43 17.27 15.78 15.08 15.64 15.06 liu 16.36 19.08 14.78 13.81 14.91 15.69 rimforsa 8.00 8.35 7.89 14.07 6.18 6.84 ryd1 27.62 29.00 24.86 23.80 28.20 26.87 studentryd-int 9.32 8.94 9.20 9.61 7.15 7.22 studentryd 29.76 29.46 24.93 27.88 29.28 29.70 linghem 177.07 182.42 171.83 190.10 274.90 259.57 ljungsbro 166.58 165.24 154.99 185.94 229.68 224.47 malmslatt 45.78 48.02 41.85 45.16 50.67 47.65 mjolby 32.53 34.55 30.22 30.38 34.09 32.29 ryd-m 403.35 413.78 406.10 421.59 787.02 697.96 ryd 263.03 277.56 262.40 271.87 425.07 411.32 ryd2 286.28 302.82 290.70 308.63 522.63 465.33 soderkoping 95.05 100.43 98.56 101.08 131.28 129.88 vadstena 67.97 70.67 61.92 74.79 91.95 84.71 valla 55.48 54.24 49.57 58.56 65.81 63.72

(47)

Obj Time Lowb

Name Min Max Min Max l0

l1 atvid-s B 3842 K 4881 K 1.00 J 1.73 3335 3690 brokind D 5701 K 9134 K 3.02 J 5.12 4130 5225 colonia G 989 K 1042 K 0.69 J 0.96 964 981 ekangen G 4933 L 7265 K 2.30 I 3.92 4086 4707 mantorp-c G 4473 L 7093 L 1.67 H 3.68 3604 4174 mantorp A 7353 K 11477 K 3.36 C 5.75 5990 6948 rimforsa-o B 3337 L 4704 K 1.28 F 1.93 2643 3105 skanninge-c A 4375 L 6095 K 1.68 I 3.39 3665 4259 skanninge-n E 2366 L 2840 L 0.88 G 1.38 2017 2248 skanninge F 4450 K 6098 K 1.79 D 3.02 3703 4300 studentryd-e F 1599 L 1732 L 1.03 H 3.08 1479 1559 sturefors D 6418 L 9398 L 3.24 I 5.69 4904 5826 valla-liu G 2657 K 3323 L 2.59 J 4.56 2279 2533 vikingstad B 7234 K 10646 K 3.21 B 5.69 5038 6341 atvid G 10443 K 13963 K 5.40 B 8.92 8225 9657 borensberg A 9451 K 12660 K 4.34 E 8.54 7042 8785 kisa C 8903 K 13040 L 15.06 A 18.09 6476 7981 liu F 5150 L 6353 J 13.81 H 19.08 4191 4931 rimforsa B 5724 L 8837 K 6.18 J 14.07 4346 5266 ryd1 C 3993 L 4767 J 23.80 A 30.48 3550 3926 studentryd-int C 2995 K 3739 K 7.15 D 11.16 2668 2926 studentryd A 5242 L 6307 I 24.93 C 33.61 4450 5074 linghem H 11132 L 14804 I 171.83 K 274.90 9080 10562 ljungsbro A 23290 K 32700 I 154.99 K 229.68 18316 22207 malmslatt E 10411 L 14130 I 41.85 K 50.67 8978 10187 mjolby A 21041 L 28322 I 30.22 B 38.65 15668 18851 ryd-m E 16868 K 20340 G 403.35 K 787.02 14437 16159 ryd A 12137 K 14486 I 262.40 K 425.07 10678 11910 ryd2 E 13948 K 16957 G 286.28 K 522.63 12268 13707 soderkoping A 17566 K 22537 G 95.05 K 131.28 14548 16913 vadstena F 12343 K 15545 I 61.92 K 91.95 10532 12147 valla G 9517 K 11486 I 49.57 K 65.81 7779 9039

(48)

Times are obviously longer here than with one iteration. However, it is still possible to use the method, from a practical perspective. Probably the planning does not have to be changed every day. If there are circumstances that require a new planning, it is still much faster to use this tool than to do it by hand. One may note that K is fast for small problems, but slow for large, and since in addition gives the worst solution for many problems, it is not the method of our choice.

In table 14, we investigate the setting A30 more thoroughly, by giving the results to-gether with problem sizes, lower bounds and relative errors. The quality of the lower bounds may vary between instances.

Name n m q Obj Time l1 Err

atvid-s 68 95 4 3828.73 1.49 3690.50 0.036 brokind 179 199 4 5766.56 4.24 5225.82 0.094 colonia 24 36 4 1001.79 0.75 981.29 0.020 ekangen 149 184 4 5502.08 3.41 4707.38 0.144 mantorp-c 122 145 4 4612.99 2.36 4174.39 0.095 mantorp 185 226 4 7592.03 4.86 6948.47 0.085 rimforsa-o 94 109 4 3381.52 1.75 3105.75 0.082 skanninge-c 122 152 4 4623.21 2.49 4259.22 0.079 skanninge-n 62 80 4 2324.27 1.31 2248.61 0.033 skanninge 127 158 4 4738.71 2.60 4300.15 0.093 studentryd-e 76 104 4 1602.75 1.45 1559.96 0.027 sturefors 183 212 4 6443.14 4.74 5826.71 0.096 valla-liu 160 213 4 2764.75 4.01 2533.03 0.084 vikingstad 178 213 4 8445.48 4.72 6341.68 0.249 atvid 220 290 4 10753.67 8.41 9657.40 0.102 borensberg 211 257 4 10337.00 6.30 8785.55 0.150 kisa 311 359 4 8765.30 16.63 7981.47 0.089 liu 291 394 4 5335.31 15.18 4931.24 0.076 rimforsa 233 262 4 5893.20 8.07 5266.41 0.106 ryd1 382 508 4 4040.36 29.37 3926.69 0.028 studentryd-int 235 316 4 3062.97 8.91 2926.23 0.045 studentryd 387 519 4 5298.02 28.83 5074.35 0.042 linghem 836 1129 4 11800.73 175.34 10562.68 0.105 ljungsbro 812 1024 4 23566.40 159.42 22207.49 0.058 malmslatt 489 626 4 10450.04 44.52 10187.53 0.025 mjolby 419 524 4 21320.07 31.40 18851.91 0.116 ryd-m 1107 1495 4 17133.13 439.34 16159.83 0.057 ryd 952 1291 4 12610.77 270.47 11910.95 0.055 ryd2 987 1337 4 14768.43 295.82 13707.77 0.072 soderkoping 666 910 4 18538.84 99.72 16913.25 0.088 vadstena 581 778 4 12389.38 74.34 12147.58 0.020 valla 527 707 4 9529.93 58.79 9039.05 0.052

References

Related documents

The idea is based on the assumption that the target in a constant position can be measured with a higher accuracy than the moving optical target; during the motion the points on

For future reference, free seedlings and the carbon payments will be defined as a decrease in investment cost and increased labor costs and reduced rainfall as reductions

Based on evidences from key informants and livelihood trajectories, it is possible to gain an insight about how individuals/households are able to implement

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

Data från Tyskland visar att krav på samverkan leder till ökad patentering, men studien finner inte stöd för att finansiella stöd utan krav på samverkan ökar patentering

To answer the second research question: “What is the interplay between the EV-fleet and the grid, regarding availability for grid services?”, the number of EV:s needed to match

The monk search num- ber decision problem (MSNDP) is to determine, given a monk graph G and an inte- ger k, whether G can be decontaminated in a finite number of steps using k or

The leading question for this study is: Are selling, networking, planning and creative skills attributing to the prosperity of consulting services.. In addition to