Mix-opt: A new route operator for optimal coverage path planning for a fleet in an agricultural environment

Mix-opt: A new route operator for optimal coverage path planning for a fleet in an agricultural environment

Expert Systems With Applications 54 (2016) 364–378 Contents lists available at ScienceDirect Expert Systems With Applications journal homepage: www...

6MB Sizes 0 Downloads 11 Views

Expert Systems With Applications 54 (2016) 364–378

Contents lists available at ScienceDirect

Expert Systems With Applications journal homepage: www.elsevier.com/locate/eswa

Mix-opt: A new route operator for optimal coverage path planning for a fleet in an agricultural environment Jesus Conesa-Muñoz a, Gonzalo Pajares b, Angela Ribeiro a,∗ a b

Centre for Automation and Robotics (CSIC-UPM), Ctra. Campo Real Km 0.2, Arganda del Rey, 28500 Madrid, Spain Facultad de informática, Universidad Complutense de Madrid, C/ Profesor José García Santesmases, 28040 Madrid, Spain

a r t i c l e

i n f o

Keywords: Coverage path planning Metaheuristic operator Vehicle fleet Simulated annealing CVRP

a b s t r a c t To accomplish agriculture tasks, a field is usually divided into tracks based on the implement width. The order in which the crop tracks are covered during this process is critical because it directly affects the distances travelled by the agricultural machines while completing the task and, consequently, soil compaction and inputs. Identifying the best tracks for a set of vehicles to completely cover a field can be formulated as a capacitated vehicle routing problem (CVRP), in which tracks can be viewed as the customers of the CVRP problem. In other words, given a set of n tracks and m vehicles, the objective is to determine a set of routes such that each track is covered exactly once by any of the involved vehicles while minimizing the total cost of covering all the tracks. There are many metaheuristic optimisation methods that address the CVRP problem by using operators to iteratively improve the routes. Most of these operators consist of easy elementary operations such as relocations, swaps or inversions of the order in which customers in the route are visited. In this paper, a new operator, named Mix-opt, is proposed with the aim of accelerating the convergence of metaheuristic optimisation methods and make them less dependent on the operator chosen on routing problems. The proposed operator combines and extends some of the features of the most commonly used route operators by integrating the best-performing elementary operations on which they are based. Further variants of those elementary operations were tested, such as the use of different numbers of elements in the relocations or swaps or reverse orders as well as combining the operations with local searches. The best variants were selected for integration into the proposed operator. Furthermore, Mix-opt was compared against well-established operators by integrating each of them into a Simulated Annealing algorithm and solving well-known CVRP benchmarks and a typical and complex agricultural routing problem. Finally, the proposed operator was applied to be integrated into an agricultural route planner to identify the best routes in some illustrative agricultural problems. All tests demonstrated that Mix-opt, on average, outperforms existing approaches for solving general routing problems as well as a broad spectrum of agricultural routing situations. This helps to better route plan in agricultural contexts, even better than other approaches in a very short time, which is interesting to route plan in real time, for example, because one vehicle may fail during the execution and then it is necessary to route the plan again and very fast to distribute the remaining part of the global task among the rest of the vehicles in the fleet. © 2016 Elsevier Ltd. All rights reserved.

1. Introduction Planning the routes to be taken by one or more vehicles in a crop field is essential to efficiently complete an agricultural task. The travelled distances directly affect important aspects such as production costs (inputs) and the soil compaction due to the weight of agricultural machinery (Hamza & Anderson, 2005). ∗

Corresponding author. Tel.: +34918717050. E-mail addresses: [email protected] (J. Conesa-Muñoz), [email protected] (G. Pajares), [email protected] (A. Ribeiro).

http://dx.doi.org/10.1016/j.eswa.2015.12.047 0957-4174/© 2016 Elsevier Ltd. All rights reserved.

To identify the best routes, many methods rely on the division of the field into crop tracks, which are long strips (oriented by crop rows) that the vehicles follow from start to end to avoid damaging the crop. In treatment tasks, the tracks are identical in width to the implement and must be covered exactly once to guarantee full treatment without overlaps. Thus, the best route for a vehicle is the sequence of tracks that minimizes the travelled distance and, consequently, the time spent and fuel consumed. The problem of finding the best sequence for a set of vehicles is similar to the classic combinatorial multiple Travelling Salesman Problem (mTSP), which is a generalization of the well known Travelling

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Salesman Problem (TSP) (Applegate, Bixby, Chvatal, & Cook, 2011), in which more than one salesman is allowed in the solution. For example, given a list of cities, the distances between each pair of cities, and a set of salesmen, the mTSP aims to find the shortest possible routes that visit each city exactly once. In the agricultural case, however, total inputs must also be considered in determining the best routes. For example, in pest treatment tasks such as weed treatment, it is important to consider the size of the tank transporting the agrochemical product. In a Precision Agriculture framework, in which weeds are treated based on a risk map previously generated to the treatment task, the amount of treatment required for each track depends on its infestation level (Barnett et al., 2007). Furthermore, crop fields are usually large, and the sprayer tanks are not sufficiently large to spray the entire field without refilling. When a tractor fleet is used, the reallocation of tracks among the vehicles may avoid empty tanks in the middle of a track. Considering tank size converts the current problem to a Capacitated Vehicle Routing Problem (CVRP) (Dantzig & Ramser, 1959), in which a fleet of vehicles must deliver goods to customers (in this case, crop tracks) and all customers must be supplied exactly once with the total number of goods ordered. In other words, it is not possible to supply only part of the goods expected and complete the request by visiting the same customer several times. The CVRP can be formulated as an extension of the mTSP in which the vehicles have a storage capacity and must satisfy a delivery constraint. Combinatorial optimisation problems in general (and mTSP and CVRP in particular) can be suitably tackled using metaheuristic optimisation methods (Donald, 2011). Many of these methods start by randomly generating initial solutions and building new and improved solutions through iterative modification. Some examples are Simulated Annealing (Kirkpatrick, Gelatt, & Vecchi, 1983), Genetic Algorithms (Goldberg & Holland, 1988) and Ant Colony Optimization (Dorigo & Gambardella, 1997). These methods explore the space of possible solutions (the search space) by building new solutions and replacing existing ones. The mechanisms these methods use to build solutions are known as operators. Some of the most common operators in route optimisation problems are based on relocations, swaps or reversals of the order elements are visited. For example, the relocate operator (Affenzeller, Wagner, Winkler, & Beham, 2009) removes one element on the route and inserts it into a random position. The swap operator (Oliver, Smith, & Holland, 1987) simply interchanges two elements. The simple inversion operator (Holland, 1975) divides the route into three parts, reverses the order of the middle part, and reconnects them. The cut inversion operator (Larrañaga, Kuijpers, Murga, Inza, & Dizdarevic, 1999) is similar to the simple inversion but inserts the reversed part into a random position instead of the same place. The or-opt operator (Or, 1976) deletes a group of consecutive elements and inserts the group again at another position. The scramble operator (Syswerda, 1991) selects a subset of the elements on the route and simply permutes those elements. Finally, the LSM operator (Or, 1976) implements a local search by using a group of consecutive elements at attempting to place it at different locations until the route is improved. Some of these operators (or some of their underlying operations, at least) have been used to find routes in agricultural fields with successful results (Bochtis, Vougioukas, Tsatsarelis, & Ampatzidis, 2007; Conesa-Munoz, Ribeiro, Andujar, FernandezQuintanilla, & Dorado, 2012; Hameed, Bochtis, & Sorensen, 2011; Ryerson & Zhang, 2007). However, the operators have different behaviours and, depending on the characteristics of the problem, convergence to the optimum may accelerate or slow the exploration of the search space, even leading to stagnation. In addition, most of these operators are based on a number of simple elementary operations, such as relocations, swaps, cuts, and reversals, and

365

differ very little from each other. For example, relocate and or-opt operators only differ by the number of elements they displace, and simple inversion and cut-inversion only differ in the displacement of the segment reversed. Consequently, additional questions arise, such as the optimum number of elements to use in the elementary operations, whether it is better to displace the elements directly or by reversing their order and whether it is better to apply relocations or swaps (a swap can be expressed as two relocations). This paper proposes a new operator, Mix-opt, that mixes and gathers the elementary operations of some of the most common operators and extends them to additional variants, such as relocating or swapping one or several elements, relocating or swapping them directly or reversing their order, and relocating or swapping them in several places and retaining the permutations that produce the best route (local search). In this manner a unique operator is able to implement any change provided by the studied operators. As will be explained in the following sections, Mix-opt is composed of the most promising of these variants and applies them according to specific weights assigned to each operation based on their relevance. The idea is to not limit the way of building new solutions to only one type of modification, because, as it is shown in Abdoun, Tajani, and Abouchabaka (2012), the way of changing the solutions affects significantly the convergence. Furthermore, Osaba, Carballedo, Diaz, and Perallos (2013) concludes that the mutation stage is the most important phase of Genetic Algorithms when applied to solve routing problems such as the TSP and the CVRP, and the proposed operator can be used as a mutation operator in this kind of metaheuristic methods. Building a new operator able to implement any change provided by the most common literature operators is expected to produce better results on routing problems in speed convergence and to become the optimization technique selected less dependent on the modifying operator chosen. Nevertheless, the higher complexity of the new operator increases the computational time required to modify the solutions and may produce a performance not as good as expected. Thus, several tests were carried out to determine precisely all these issues. The proposed operator was compared against the typical literature-referenced operators by integrating them into a Simulated Annealing algorithm and solving some well-known CVRP benchmark problems (Christofides & Eilon’s Instances, 2015) as well as common agricultural routing problems. As we will see below the proposed operator outperformed previous approaches results for both types of problems. It was even able to outperform in real time the results obtained by an agricultural route planner proposed in other work, which might lead to use the new operator to route plan in real time. The paper is summarized as follows. Section 2 formulates the problem of route planning in agriculture using fleet of vehicles as the CVRP. Section 3 proposes a new modifying operator to be used into metaheuristic methods to solve the agricultural routing problem stated. Section 4 validates the new operator in classical and agricultural CVRP problems. Furthermore, the operator is integrated in conjunction with a Simulated Annealing algorithm into an expert system for agricultural planning and it is compared against another approach. Finally, Section 5 summarizes the conclusions and the remaining future work. 2. Formulating the agricultural route planning problem into CVRP terms As explained above, agricultural vehicles usually perform tasks by following parallel routes that move alternately from one extreme of the field to the other, following the crop row direction and turning in the headlands (the outer areas of the field). These parallel strips are called tracks and are identical in width to the

366

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

can be calculated using the expression (2). Otherwise, the shortest trajectory is a -turn and can be calculated as (3). In both (2) and (3), expressions i and j are, respectively, the indices of the outgoing and incoming tracks, w is the track width, and rmin is the turning radius. Finally, expression (4) is the more general rule that covers both previous cases and determines the distance d(i, j) needed to  travel from the ith to the jth track, regardless of whether a -turn or a -turn is appropriate.



Fig. 1. Field divided into tracks.

(i, j ) = |i − j|w + (π − 2 )rmin

 (i, j ) = rmin 3π − 4 sin

 −1

2rmin + |i − j|w 4r

(2)

 (3)

 d (i, j ) =

Fig. 2. Turning manoeuvres for a vehicle of turning radius rmin . (a) -turn.

 -turn and (b)

implement or working width. Fig. 1 illustrates the division of a crop field into tracks. Thus, the entire cover of a crop field can be envisaged as a two-stage process in which the field is first divided into tracks based on the crop direction and the working width and the track sequence that best optimises some cost criteria is then obtained. Because all tracks must be covered strictly once to avoid overlapping, the problem is equivalent to the CVRP, with tracks instead of customers. Moreover, the specification that the same track cannot appear more than once in the sequence can be expressed as a permutation of set T that contains all tracks ti of the field to be covered. In addition, because the track coverage can be accomplished using several vehicles, some separator elements si ∈ S must be included in the permutations to distinguish the tracks covered by each vehicle. More specifically, n − 1 extra elements are required, where n is the number of vehicles in the fleet. Therefore, the set of elements to permute is T ∪ S, where S = {s1 , . . . sn−1 }, and in mathematical terms, the problem can be expressed by Eq. (1).

σ ∗ = arg min f (σ ) σ

(1)

In this equation, f(σ ) is the function that measures the cost of the routes associated with a permutation σ of the set T∪S, and σ ∗ denotes the permutation that minimizes the cost. In most cases in this work, the cost is expressed as the distance associated with the routes. However, the operator proposed may be used for optimizing any other criteria, such as the time to complete the task when following the routes in σ . Because the problem focuses on real agricultural route planning, some vehicle constraints that may limit the trajectories codified into the routes must be considered. Given a permutationσ , the trajectories inside the tracks can be easily decoded into inner straight lines parallel to the tracks, but the trajectories that connect the tracks rely on turns that are limited by the minimum turning radii of the vehicles. Considering regular field shapes and taking advantage of the fact that the tracks are parallel and the vehicles have to change their orientation by exactly 180º, (Bochtis et al., 2007) describe the shortest path to connect the ending point of one track and the starting point of another track for a vehicle of  minimum turning radius rmin as either a -turn or a -turn trajectory (illustrated in Fig. 2). If the distance from the outgoing point to the incoming point is greater than or equal to twice the minimum turning radius of the  vehicle, then the shortest trajectory is a -turn, and the distance

(i, j ), i f |i − j|w ≥ 2rmin (i, j ), else |i − j|w < 2rmin

(4)

The expressions (2–4) assume some simplifications, such as a rectangular field and variations in the direction of the vehicle’s outgoing and incoming movement of 180º. However, the problem can be easily extended to account for any shape field or any vehicle’s movement directions by calculating the trajectories and distances using the general rules detailed in Shkel and Lumelsky (2001). For the sake of clarity, however, only regularly shaped fields (and simplified expressions) have been used in this work. 3. The proposed approach To find the permutation that best minimizes the cost, the Simulated Annealing algorithm (SA) was used as the metaheuristic optimisation method in this work. This method was proposed in 1983 (Kirkpatrick et al., 1983) to find the global minimum of a cost function that may have several local minima, and it is widely used to address large search spaces. The method was inspired by a metallurgy physical process in which a solid is heated and slowly cooled in a controlled manner to increase the size of crystals and reduce their defects. Similarly, the SA algorithm interprets the slow cooling as a slow decrease in the probability of accepting worse solutions, that is, the SA is constantly generating new solutions from the current solution, which are used to replace the current solution if they are superior. However, a worse solution may be selected with a probability that decreases over time. In this manner, inferior solutions can also be accepted, which is a behaviour fundamental to the metaheuristic methods used to escape from local minima. The SA probability that decreases over time is analogous to the temperature in the metallurgic process that ultimately leads the process to a lower energy state. The SA repeats these two steps, solution generation and solution replacement, until reaching an acceptable solution or until another computational criterion, such as surpassing a previously defined time or number of iterations, is satisfied. The SA used in this work was set to undergo re-annealing when the optimisation value became stuck for some time, a strategy that has been used successfully in previous works (Ingber, 1989). The re-annealing consists of an increase in the SA temperature variable that drives the search. In this manner, the exploration can avoid local minima when the temperature cools and the algorithm is still far from the solution. During the search process, new solutions are produced after altering the current working solution in a well-defined way. If the space of solutions is formed by all possible routes (i.e., all track permutations), the operators described below are the most widelyused and well-defined ways to alter the solutions. Some evolutionary methods such as Genetic Algorithms were also considered and even tested as optimisation method but SA tests showed a better performance. This is in line with what is

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

367

Table 1 Most common permutation operators. Name

Description

Relocate or insertion (Affenzeller et al., 2009) (Michalewicz, 1996) Or-opt or displacement (Or, 1976) (Michalewicz, 1996) Swap or exchange (Oliver et al., 1987) (Banzhaf, 1990) Simple Inversion or 2-opt swap (Holland, 1975) (Lin, 1965) Cut Inversion or inversion (Larrañaga et al., 1999) (Fogel, 1993) Scramble (Syswerda, 1991) LSM (Or, 1976)

Relocates one element to a random position Relocates several consecutive elements to a random position Interchanges two elements Reverses several consecutive elements to the same position Reverses several consecutive elements and relocates them to a random position Picks a random subset of elements and changes them randomly Implements a local search by applying several or-opt exchanges until a local optimum is reached

explained in Osaba et al. (2013), where it is said that it is more effective to use methods based only on mutations to deal with routing problems, and Genetic Algorithms also use crossovers to generate new solutions, whereas SA algorithm only uses the neighbourhood operator, which is similar to the mutation operators on evolutionary approaches. 3.1. Operators A list of the most common permutation operators and a brief description of each are presented in Table 1. All operators were first designed for the TSP, a specific case of the mTSP sub-problem (and, consequently, of the CVRP) that uses only 1 vehicle. In the case of the TSP, the relocations and swaps always change elements inside the same vehicle sequence. To tackle the most general CVRP problem, in which more than one vehicle is managed and, as a result, more than one route must be obtained, these operators can be extended by either of the following strategies: (1) restricting the actions of operations to only the elements inside of the same vehicle route or (2) allowing the operators to manage any element, intra- as well as inter-route. The current work focuses on the second strategy, which does not limit the capability of the operators in the generation of new solutions. All these operators were presented long time ago, but they are still widely used for many vehicle routing problems because of their good behaviour, so they can be seen as classical operators. For instance, the Relocate or Insertion, Simple Inversion and Swap operators are used as mutation operations in (de Oliveira & Vasconcelos, 2010), (Ursani, Essam, Cornforth, & Stocker, 2011) and (Nazif & Lee, 2012); a local search similar to the LSM is used in (Yu, Yang, & Yao, 2009); the Or-opt is applied in (Wu, 2012); Scramble in (de Oliveira & Vasconcelos, 2010), and an operation similar to the Cut Inversion in (Haj-Rachid, Ramdane Cherif, Chatonnay, & Bloch, 2010). 3.2. The Mix-opt As explained above, the aim of the proposed operator is to summarize into a unique operator the more promising features of the operators defined in Table 1. Specifically, the proposed operator is designed to contain the following. (1) A single relocation: random relocation of one element. (2) A single swap: random exchange of two elements. (3) A segment relocation: random relocation of a group of consecutive elements or a segment. (4) A segment swap: random exchange of two groups of consecutive elements or a segment. (5) An inter-vehicle segment relocation: random relocation to a different vehicle route of a group of consecutive elements or a segment that contains the same vehicle route. Every time that the operator is applied, one of the described operations is executed. The probability of applying a given opera-

 tion i is wi /( 5i=1 wi ), where wi is the weight assigned to the operation i. Eq. (5) mathematically expresses the proposed operator.

mix − opt (x )

=

⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨

singl e rel ocation(x ), i f r ≤

1

wi 2

i=1

single swap(x ), else i f r ≤

i=1

3

wi

segment relocation(x ), else i f r ≤ i=1 wi  ⎪ segment swap(x ), else i f r ≤ 4i=1 wi ⎪ ⎪ ⎪ ⎪ ⎪ (x ), else r ⎪ ⎩inter − vehicl e segment rel ocation 5 ≤

i=1

wi

(5) 5

where r ∈ [0, i=1 wi ] is a randomly generated number. The weights wi must be adjusted according to the importance attached to each operation. The goal is to allow the new operator to execute different sets of operations, each of which may be useful at different search stages, instead of always applying the same set of operations. For example, the proposed single relocation and the single swap are similar to relocate and swap operators in the literature and are usually effective at the final stages of the search, when it is interesting to refine the solutions by small changes. By contrast, the segment operations are useful at early stages, when the solutions require many large changes to ensure extensive search space exploration, and thus these operations use several elements. Segment relocation is similar to the or-opt operator. The segment swap was introduced to provide an operation capable of applying even more changes than segment relocation because a segment swap can be expressed as two segment relocations. The intervehicle segment relocation was included because several vehicles are used and a mechanism for easily transferring routes from one vehicle to another is of interest. This operation will be very useful for optimizing the routes if the criterion cost is time instead of distance because it enables quick track transfer among vehicles and parallelization of the agricultural task. An inter-vehicle segment swap was ruled out because the number of vehicles is usually much smaller than the number of tracks, and thus the transfer of tracks from vehicle to vehicle may siphon execution time from other operations. The swap operators create larger modifications in the sequences than relocation operators, and segment operations create more modifications than single operations. Most operators that involve several elements do not specify an exact number of elements to use, but the quantity of elements may affect the convergence because, as previously noted, longer segments create larger changes and accelerate earlier search stages, whereas shorter segments benefit later stages. Because the optimal segment length is not clear in advance, this value must be set by the user before using the operator. In addition to the length of the segments, the operator must specify whether the segment operations can use reversed segments or not. Taking reversed segments into consideration, the features of the simple inversion and the cut inversion operators are also integrated into Mix-opt.

368

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Table 2 Parameters of the Mix-opt operator and their ranges of values. Name

Length of the segments ∈ [0, 100%)

Nº attempts∈ [0, ∞ ) ∪{all }

Reverse ∈ {false, true}

Weight ∈ [0, ∞)

Single relocation Single swap Segment relocation Segment swap Inter-vehicle Segment relocation

l1 (= 1 element) l2 (= 1 element) l3 l4

a1 a2 a3 a4

r1 (= false) r2 (= false) r3 r4

w1 w2 w3 w4

l5

a5

r5

w5

Finally, to make use of the features of the LSM operator, local searches can be specified. Each operation is associated with a number of attempts such that, when selected, the operation is executed the specified number of times and the best solution is chosen among all generated solutions. Incorporating all of these alternatives, Mix-opt can perform much like any of the operators in Eq. (5) by properly setting the parameters listed in Table 2. Since now the convergence process does not depend on only one kind of change that may become the process very slow, as happens for some operators in Abdoun et al. (2012), it is much more stable on average. The richer variety of changes is best suited for the different convergence requirements over time (earlier stages demand large changes whereas later phases demand small modifications). Finally, the Mix-opt also allows reaching more distant search space regions in few jumps, which is very interesting to skip local minima/maxima. Suppose that the unique available modifying operator is Relocate operator and the current solution is in a strong local minimum, in such a way that it is not possible to skip it changing only the position of one element, then, it would be difficult to leave that situation, that is it would depend on the metaheuristic strategy to deal with these issues. Using an operator that can implement deeper changes helps to avoid these cases. Parameter setting is a very important stage that can directly affect the convergence of the solution search process. Here, li specifies the maximum size of the segment with regard to the total number of elements. For example, if li is set to 50%, the number of elements will be fixed at a random number between 1 and half the length of the solution (permutation). In addition, l1 and l2 are set to 1 because single operators always involve only 1 element. The number of new solutions generated when applying the local search is specified by ai and the best one is selected among them. The value all indicates that all possible alternatives will be generated before the selection. For example, if a solution has 10 elements, the chosen operator is single relocation, and the number of attempts is set to value all, then the involved element will be moved to the 9 different available places, and the best configuration will be selected. Parameter ri is set to true when both segments involved are tested in the original order and to false both, original and reverse order. Parameters r1 and r2 are always set to false because the reverse segment of a one-element segment is the same segment. Finally, the weights wi determine the probability to apply each operation. For instance, if w1 is 1 and w2 is 3, it means the second operation will be selected and applied on average 3 times more than the first one. Fig. 3 shows an example of Mix-opt application. 4. Results In this section, the proposed operator is compared to the literature-referenced operators and tested by solving typical agricultural routing problems. The operators and the SA algorithm were implemented in Matlab, although Matlab is considerably slower than other approaches (e.g., C or C++ implementations), because the goal was to compare the operators with each other un-

Fig. 3. Example of Mix-opt application.

der the same conditions and demonstrate the validity of the proposed approach for agricultural applications, rather than obtaining results as quickly as possible. The tests were conducted on an Intel Core i5-2500 CPU @ 3.30 GHz with 4 GB RAM, and many of the tests were executed in parallel to reduce the trial time. 4.1. Configuring Mix-opt A statistical study was initially performed to obtain an appropriate, illustrative set of parameter values to be used a posteriori as default values (standard parameter values) for the proposed operator, Mix-opt. Different configurations (sets of parameter values) were tested with the aim of ultimately selecting one among those producing the best results. Each configuration was run 10 times for 60 s using SA as the optimisation algorithm. The agricultural problem type defined for the study was a field of 40 tracks and a fleet of 5 small vehicles. The track width was set to 0.75 m, or the standard inter-row distance for maize crops. The minimum turning radius of the vehicles was set to 1 m. Larger vehicles able to simultaneously cover several contiguous streets could also have been considered but would not have affected the results. For the sake of clarity, small vehicles were chosen so that the travelled streets and covered tracks were identical, simplifying the explanation. The fleet had to fully cover the field while reducing the total distance as much as possible and performing a selective weed treatment. The vehicles therefore had tanks able to store 100 doses of herbicide. Fig. 4 shows the assumed weed patch distribution, represented in a grid with 75 cm × 75 cm cells in green to represent a weed infestation. Every weed-infested cell required one herbicide dose, and because the total number of infested cells was 240, at least 3 vehicles were needed to represent any feasible solutions. This value is supported by the established tank capacity and the fact that vehicles can treat a track if and only if there is sufficient agrochemical in the tank to guarantee the entire treatment of the track without refilling. Table 3 gathers the tested values for the Mix-opt parameters configuration process. The values for the maximum segment length were selected to allow working segment operations with different segment sizes: small (up to 10%), regular (up to 25%), large (up to 50%) and very large segments (up to 100%). The numbers of attempts were chosen to implement no local search (1 attempt), slight local search (2), normal (5), exhaustive (10) and complete (all). Finally, the selected values for the weights were 1, 5 and 10

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

369

Fig. 4. Input field for the Mix-opt parameters configuration process. Green cells represent weed-infested cells.

Table 3 Tested values for the Mix-opt parameters configuration process. Variables

Tested values

l ( = l3 = l4 = l5 ) ∈ L a ( = a1 = a2 = a3 = a4 = a5 ) ∈ A r ( = r3 = r4 = r5 ) ∈ R w1 , w2 , w3 , w4 , w5 ∈ W

L = {10%, 25%, 50%, 100%} A = {1, 2, 5, 10, all} R = { f alse, true} W = {1, 5, 10}

to allow operations being applied 5 and 10 times more than others (or twice for those operations with weight 10 with regard to those ones with 5). No more values could be tested because the number of possible configurations rises dramatically, as it is explained below. Anyway, the idea was to find some guiding values to make a first well balanced tune process, rather than just use and blindly compose the operations. A total of 9720 configurations were tested, corresponding to |L| · |A| · |R| · |W |5 = 4 · 5 · 2 · 35 . All executions were parallelised on 10 computers because a total of 10 executions per minute were run for each configuration. A total of 6.75 days (= 162 h = 9, 720 · 6010·10 s) were required to compute the whole study. In addition, only the weights of the operations were analysed with different values during the operation, while the length of the segments, the number of attempts and the reverse option were set to the same value for all operations. Otherwise, the computation time to complete the study would be nearly intractable (approx. several months). Because each test only lasted 60 s, the field was designed to contain only 40 tracks because this allowed the search to pass over all convergence stages. Normally, in any search with iterative improvement, there is an initial stage of high improvement (because the initial solutions were generated randomly and are easily improvable) and a second stage of slower convergence (because there may be local minima and because the changes must be more precise). Using a field with 40 tracks, 1 min is sufficient to pass over these stages. A larger field or a shorter test time would produce a result in which all configurations exhibit a continuous high improvement stage upon convergence and would therefore all appear successful. Fig. 5 shows the mean distance values of the solutions obtained for each configuration. The distance values were normalised be-

tween 0 and 1 to produce a more comprehensible representation of the results, with 0 as the lower bound of the minimum distance and 1 the upper bound of the maximum distance. This representation facilitates the assessment of how close to optimum the results are, which is very close in some cases (such as the bluest cells in Fig. 5). The best configuration found was w1 = 5, w2 = 5, w3 = 10, w4 = 10, w5 = 5, a = 5, l = 25% and r = true. In general, it is better to use the reverse option, 25% is the apparent maximum segment length to obtain the best results, and the best number of attempts is 5. The columns with these parameters are generally darker blue than the adjacent ones. With respect to the weights, configurations with w3 = 1 and w4 = 1 yield worse results (see the lighter blue horizontal rows, particularly when Reverse = true). These values are small, and the weights correspond to segment operations; therefore the operator does not have the opportunity to implement large changes in the solutions when required. The best configuration found was selected as the default parameter configuration for Mix-opt, but it may vary for different search times or depending on the number of tracks, so it must be considered simply an orientation that avoids very poor initial values (e.g., a = 1 or l = 100%) and not a final configuration for any problem. Depending on the problem, better results for solutions of the Mix-opt may be obtained with slightly different values, as shown in the next section, where some variants of the proposed operator were also tested.

4.2. Mix-opt vs. literature-referenced CVRP operators Once a good configuration was established, the proposed operator was compared to other operators referenced in the literature for solving some CVRP benchmark problems (Christofides & Eilon’s Instances, 2015). In particular, 10 of the 15 instances of the set (from 22 to 101 customers and from 4 to 14 vehicles) were tested 100 times for 1 h. Because they were equivalent to previously selected instances and did not provide any extra test information, 5 of the 10 instances were discarded. Re-annealing of the SA was specified when the optimisation value remained unchanged for 10 s. The 10-s value was established after testing the convergence for several values using a statistical process similar to the one applied while obtaining the default operator configuration.

370

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Fig. 5. Mean normalised distance values of the solutions obtained for each configuration.

In addition to the literature operators, some variants of the proposed operator were also tested to determine the extent to which proper performance of the operator is dependent on the configuration. The variants consisted of versions of Mix-opt lacking some of its internal operations, such as removing single relocation or lacking single operations (including neither single relocation nor single swap). To obtain those variants, the weights associated with the discarded operations were set to 0. This procedure also tested whether the operations contributed to accelerate convergence or if some were unnecessary and could be ruled out. Note that this issue could have been studied during the configuration search process by including the 0 value into the set of weights W, but the number of configurations to evaluate would have then been much higher, and the computation time to evaluate them would have increased to several weeks. The results, shown in Table 4, are calculated as the difference between the average

length of the routes, which are codified in the solutions, and the optimum, which is expressed as a percentage of the optimal value (gap). The optimal values are also provided by Christofides and Eilon’s Instances (2015). The names of the benchmark instances use the notation E-nX-kY, where X specifies the number of customers and Y the number of vehicles. Table 5 shows the 90% confidence level intervals for the results obtained and showed in Table 4. Fig. 6 presents the differences between the values obtained by each operator for each analysed CVRP problem and 0, the lowest possible gap. Most of the Mix-opt variants exhibit similar performance. Among the literature-referenced operators, only the simple inversion and the cut inversion are relatively close to the proposed operator. In addition, Table 6 presents the average results sorted by the improvement for all benchmark instances tested for each operator.

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

371

Table 4 Mean values obtained with each operator for 10 selected CVRP cases. The shaded rows correspond to the results obtained for Mix-opt and its variants. Benchmark Instances/Operators

E-n22-k4

E-n23-k3

E-n30-k3

E-n33-k4

E-n51-k5

E-n76-k7

E-n76-k10

E-n76-k14

E-n101-k8

E-n101-k14

Mix-opt Simple inversion Cut inversion LSM Or-opt Relocate Scramble Swap Mix-opt w/o inter-veh. seg. relocation Mix-opt w/o relocations Mix-opt w/o segment operations1 Mix-opt w/o segment relocation Mix-opt w/o segment swap Mix-opt w/o single operations1 Mix-opt w/o single relocation Mix-opt w/o single swap Mix-opt w/o Swaps

0.004 0.024 0.022 0.424 0.129 0.273 0.097 0.157 0.002 0.001 0.11 0.002 0.012 0.002 0.002 0.003 0.011

0 0.001 0 0.074 0 0.042 0.108 0.139 0 0 0.034 0 0 0 0 0 0

0.008 0.042 0.028 0.295 0.143 0.163 0.184 0.251 0.008 0.007 0.113 0.007 0.01 0.007 0.007 0.007 0.011

0.004 0.022 0.029 0.137 0.053 0.069 0.092 0.101 0.005 0.005 0.052 0.005 0.008 0.004 0.004 0.004 0.007

0.031 0.088 0.096 0.618 0.296 0.427 0.353 0.294 0.035 0.033 0.207 0.03 0.062 0.03 0.035 0.04 0.068

0.045 0.056 0.057 0.147 0.082 0.122 0.377 0.326 0.047 0.055 0.119 0.043 0.037 0.053 0.05 0.046 0.042

0.059 0.107 0.114 0.795 0.278 0.711 0.368 0.308 0.06 0.07 0.214 0.058 0.081 0.068 0.061 0.066 0.104

0.063 0.102 0.112 0.757 0.259 0.717 0.286 0.246 0.061 0.069 0.176 0.059 0.081 0.074 0.066 0.07 0.11

0.069 0.066 0.074 0.186 0.112 0.154 0.47 0.393 0.071 0.092 0.145 0.068 0.057 0.092 0.08 0.071 0.064

0.097 0.088 0.101 0.224 0.149 0.18 0.392 0.346 0.1 0.111 0.133 0.091 0.085 0.115 0.099 0.103 0.095

1

Operations represent both relocations and swaps.

Table 5 90% confidence level intervals for the results shown in Table 4. Benchmark Instances/Operators Mix-opt Simple Inversion Cut Inversion LSM Or-opt Relocate Scramble Swap Mix-opt w/o inter-veh. segm. reloc. Mix-opt w/o Relocations Mix-opt w/o seg.operations1 Mix-opt w/o Mix-opt w/o Mix-opt w/o operations1 Mix-opt w/o Mix-opt w/o Mix-opt w/o 1

E-n22-k4

E-n23-k3

E-n30-k3

E-n33-k4

E-n51-k5

E-n76-k7

E-n76-k10

E-n76-k14

E-n101-k8

E-n101-k14

0.0 03-0.0 06

0-0

0.0 07-0.0 08

0.0 03-0.0 04

0.028-0.034

0.043-0.048

0.056-0.062

0.06-0.065

0.065-0.073

0.093-0.101

0.018-0.03

0-0.003

0.031-0.052

0.019-0.024

0.081-0.095

0.053-0.06

0.103-0.112

0.097-0.107

0.062-0.069

0.085-0.091

0.017-0.026 0.401-0.447 0.116-0.141 0.253-0.293 0.086-0.108 0.141-0.173 0.0 01-0.0 03

0-0 0.062-0.085 0-0.001 0.033-0.052 0.097-0.119 0.125-0.153 0-0

0.024-0.032 0.278-0.312 0.128-0.159 0.145-0.181 0.164-0.203 0.232-0.269 0.0 07-0.0 08

0.026-0.031 0.131-0.144 0.049-0.058 0.064-0.075 0.087-0.098 0.095-0.106 0.0 04-0.0 06

0.088-0.104 0.601-0.634 0.283-0.309 0.413-0.441 0.341-0.365 0.282-0.305 0.032-0.039

0.054-0.06 0.137-0.156 0.077-0.087 0.112-0.131 0.363-0.392 0.311-0.341 0.044-0.05

0.109-0.119 0.78-0.811 0.268-0.287 0.691-0.731 0.356-0.381 0.297-0.319 0.057-0.063

0.107-0.117 0.743-0.77 0.25-0.269 0.701-0.733 0.276-0.297 0.237-0.256 0.059-0.064

0.071-0.077 0.175-0.196 0.107-0.117 0.144-0.164 0.455-0.485 0.379-0.408 0.068-0.075

0.097-0.104 0.213-0.234 0.145-0.153 0.173-0.187 0.378-0.407 0.33-0.362 0.096-0.103

0.0 01-0.0 01

0-0

0.0 07-0.0 07

0.0 04-0.0 05

0.03-0.035

0.052-0.058

0.067-0.072

0.066-0.072

0.088-0.097

0.107-0.116

seg. relocation segment swap single

0.095-0.124 0.0 01-0.0 03 0.009-0.014 0.0 01-0.0 02

0.026-0.042 0-0 0-0 0-0

0.098-0.129 0.0 07-0.0 08 0.009-0.011 0.0 07-0.0 08

0.047-0.057 0.0 04-0.0 06 0.007-0.01 0.0 04-0.0 05

0.196-0.217 0.027-0.033 0.056-0.067 0.027-0.033

0.109-0.129 0.041-0.045 0.035-0.039 0.05-0.056

0.205-0.224 0.055-0.061 0.077-0.086 0.064-0.071

0.166-0.185 0.056-0.062 0.077-0.084 0.071-0.078

0.136-0.154 0.064-0.071 0.054-0.06 0.086-0.096

0.126-0.14 0.088-0.094 0.082-0.088 0.111-0.12

single reloc. single swap swaps

0.0 01-0.0 03 0.0 02-0.0 04 0.009-0.013

0-0 0-0 0-0

0.0 07-0.0 08 0.0 07-0.0 08 0.009-0.012

0.0 03-0.0 05 0.0 03-0.0 04 0.0 06-0.0 08

0.032-0.038 0.037-0.043 0.063-0.073

0.047-0.053 0.043-0.049 0.039-0.044

0.058-0.063 0.062-0.069 0.099-0.109

0.063-0.069 0.067-0.073 0.105-0.115

0.076-0.084 0.068-0.075 0.06-0.067

0.094-0.103 0.098-0.108 0.092-0.098

Operations represent both relocations and swaps.

Fig. 6. Gaps for the operators in each CVRP problem.

372

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Table 6 Sorted mean results and improvements for each operator with regard to the best literature operator. The shaded rows correspond to the obtained results for the Mix-opt operator and its variants.



Operator

Mean results gap

Improvement vs.the best literature operator (%) (Simple inversion)

Mix-opt w/o segment relocation Mix-opt Mix-opt w/o inter-vehicle segment relocation Mix-opt w/o single relocation Mix-opt w/o single swap Mix-opt w/o segment swap Mix-opt w/o relocations Mix-opt w/o single operations Mix-opt w/o swaps Simple inversion Cut inversion Mix-opt w/o segment operations Or-Opt Swap Scramble Relocate LSM

0.0362 0.0379 0.0389 0.0403 0.0409 0.0432 0.0441 0.0444 0.0511 0.0596 0.0632 0.1302 0.1502 0.256 0.2728 0.2858 0.3655

39.2708 36.4214 34.6973 32.3806 31.3858 27.5585 25.9838 25.4586 14.2871 0 −6.0595 −118.5478 −152.0314 −329.5752 −357.8298 −379.5912 −513.4059

Negative percentages indicate a decrease in the improvement with regard to the best literature operator.

Table 7 Sorted mean gaps and mean improvements for each operator relative to the best literature operator for tests lasting 60, 30, 15, 7.5 and 1 min. The shaded rows correspond to the results obtained using the Mix-opt operator and its variants. 60 Min Operator

Gap

(%)

Mix-opt w/o segment relocation Mix-opt

0.036

39.3

0.038

36.4

Mix-opt w/o inter-vehicle segment relocation Mix-opt w/o single relocation

0.039

34.7

0.04

Mix-opt w/o single swap

Gap

(%)

Mix-opt w/o segment relocation Mix-opt w/o inter-vehicle segment relocation Mix-opt

0.047

35.1

0.05

31

0.05

30.9

32.4

Mix-opt w/o Single relocation

0.051

29.3

0.041

31.4

Mix-opt w/o single swap

0.056

23.4

Mix-opt w/o segment swap Mix-opt w/o relocations Mix-opt w/o single operations

0.043

27.6

23.1

26

0.057

21

0.044

25.5

Mix-opt w/o relocations Mix-opt w/o segment swap Mix-opt w/o single operations

0.056

0.044

0.058

19.5

Mix-opt w/o swaps

0.051

14.3

Mix-opt w/o swaps

0.068

6

Simple inversion∗ Cut inversion

0.06

0

Simple inversion∗ Cut inversion

0.073

0

0.075

−3.5

0.151

−108

0.174 0.287 0.295 0.306 0.366

−139.4 −295.9 −306.7 −322.6 −404.8

Mix-opt w/o segment operations Or-Opt Swap Scramble Relocate LSM ∗∗

30 Min Operator

0.063

−6.1

0.13

−118.5

0.15 0.256 0.273 0.286 0.366

−152 −329.6 −357.8 −379.6 −513.4

Mix-opt w/o segment operations Or-Opt Swap Scramble Relocate LSM

15 Min Operator

Gap

(%)

0.063

25.9

0.07

18

0.07

17.5

Mix-opt w/o single relocation Mix-opt w/o relocations

0.071

Mix-opt w/o single swap Mix-opt w/o segment swap Mix-opt w/o single operations Simple inversion∗

7.5 Min Operator

1 Min Operator

Gap

(%)

Gap

(%)

0.096

2.6

Simple inversion∗

0.271

0

0.098

0

Mix-opt w/o segment operations

0.375

−38.3

Mix-opt w/o inter-vehicle segment reloc.

0.102

−3.7

Mix-opt w/o segment relocation

0.388

−43.2

16.3

Mix-opt

0.104

−5.9

Mix-opt w/o segment swap

0.399

−47.3

0.074

12.8

Mix-opt w/o single relocation

0.104

−5.9

0.411

−51.4

0.076

10.8

0.105

−7.2

0.413

−52.1

0.081

5

0.11

−12.6

−54.2

4.6

0.115

−17.3

0.425

−56.8

0.085

0

0.116

−18.1

0.431

−59

Cut inversion

0.097

−14

Mix-opt w/o single operations Cut inversion

0.139

−42.1

0.439

−61.8

Mix-opt w/o swaps Mix-opt w/o segment operations Or-Opt Swap Relocate Scramble LSM

0.097

−14.3

0.141

−43.3

0.454

−67.6

0.17

−100.1

0.192

−95.6

Mix-opt w/o relocations Mix-opt w/o single relocation Mix-opt w/o single operations Mix-opt w/o single swap Mix-opt w/o swaps Swap

0.418

0.081

Mix-opt w/o relocations Mix-opt w/o single swap Mix-opt w/o segment swap

Mix-opt w/o inter-vehicle segment relocation Mix-opt

0.481

−77.5

0.218 0.313 0.324 0.326 0.37

−157.2 −269.1 −282 −284.2 −335.9

0.29 0.337 0.345 0.381 0.388

−195.6 −243.7 −252.1 −288.4 −295.4

Cut inversion Relocate LSM Or-Opt Scramble

0.496 0.505 0.675 0.697 0.782

−83 −86.3 −148.8 −157 −188.3

Mix-opt w/o segment relocation Mix-opt w/o inter-vehicle segment relocation Mix-opt

Mix-opt w/o segment relocation Simple inversion∗

Mix-opt w/o swaps Mix-opt w/o segment operations Or-Opt Swap Relocate Scramble LSM

Negative percentages indicate a decrease in improvement relative to the best literature operator.4.3. Mix-opt to solve routing problems in an agricultural environment. ∗ Best literature operator.

The Mix-opt and its variants are highlighted by the shaded rows in the table. Nine of the 10 first positions are held by Mix-opt and its variants; the only variant outperformed by some literature reference operators is the proposed operator’s configuration without the segment operations because this variant discards all segment operations and cannot make large changes to the solutions in a few steps. The default configuration of the Mix-opt operator takes second place because little time was spent in the configuration process, which only guarantees a good general configuration and cannot always be extrapolated to much more complex problems than

that chosen in the configuration phase of the Mix-opt. However, the first place is occupied by a variant of the proposed operator, indicating a trend in which Mix-opt clearly outperforms literature operators. The same process was tested over 1, 7.5, 15 and 30 min, and the proposed operator and most of its variants outperformed the literature operators in all cases apart from 1 min (Table 7). In the 7.5min tests, Mix-opt and its variants were already equivalent to the best literature operator. The 1-min behaviour reflects the absence of later stages in the search process in which smaller changes

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

373

Fig. 7. Mean gaps of the operators for 1, 7.5, 15, 30 and 60 min.

Fig. 8. Convergence of the literature operators, Mix-opt and its variants in an agricultural routing problem. A logarithmic scale is used in both axes.

are usually required to improve the solutions. The search process mainly spent time on the first stages, where large changes, such as those produced by the simple inversion operator, are suitable. Conversely, the proposed operator applies to all types of operations because it has been designed to cover all stages that lead to

convergence. Fig. 7 graphically illustrates the results presented in Table 7. After confirming the suitability of Mix-opt for CVRP benchmark problems, an extra test was performed to analyse the performance of Mix-opt and its variants in a generic agricultural routing

374

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Table 8 Results for the agricultural routing problem for each operator, sorted by improvement. The shaded rows correspond to the results for Mix-opt and its variants.



Operator

Mean results

Improvement vs.best literature operator (%) (Simple inversion)

Mix-opt w/o inter-vehicle segment relocation Mix-opt w/o single relocation Mix-opt w/o single swap Mix-opt w/o swaps Mix-opt w/o single operations Mix-opt Mix-opt w/o segment relocation Mix-opt w/o segment swap Mix-opt w/o relocations Simple inversion LSM Mix-opt w/o segment operations Or-Opt Relocate Cut inversion Swap Scramble

0.0012 0.0013 0.0013 0.0013 0.0013 0.0014 0.0018 0.0018 0.0029 0.0033 0.0042 0.0048 0.0059 0.0064 0.0066 0.0188 0.0455

62.1657 60.7172 60.5568 59.8889 59.7836 56.9703 45.6791 45.3147 9.824 0 −29.5485 −47.5175 −79.9498 −94.529 −100.3365 −475.4766 −1292.01

Negative percentages indicate a decrease in the improvement relative to the best literature operator.

Fig. 9. Comparison of the (a) routes obtained by Hameed’s approach and the (b) routes obtained by the proposed approach. The field used was described by Hameed et al. (2011).

problem. For this study, 50 executions were conducted. Each execution lasted 1 day. In this time, the SA had to solve fields with 200 tracks using a fleet of 5 vehicles. The minimum turning radius was 3 m, and the track width was 2 m. Agricultural fields are usually shaped in such a way that the tracks are oriented by the longest side; thus, assuming a track width of 2 m and 200 total tracks, the smallest field would be a square of 16 ha ((2 · 200)2 m2 ), which is a good representative of a real agricultural field.

Notice that the largest difference between solutions (the sequence of tracks for each vehicle) corresponds to the distance travelled by the vehicles in the headlands; the distance travelled inside of the field is always the same because, by definition, the vehicles must visit all the tracks exactly once. Fig. 8 shows the average results obtained depending on time processed. A logarithmic scale is used in both axes to better illustrate the convergence. A long duration, 1 day, was chosen to guarantee the search process would pass over all the convergence stages. The SA was configured to re-anneal the temperature when the method was stuck for 20 min. The results were normalized using previously calculated lower and upper bounds of the problem, instead of using the gap assessment, because in this case the optimum value was not known in advance. Normalizing between a lower and an upper bound shows not only how close the solutions are to the optimum but also how far they are from the worst possible value. To calculate the lower bound, the shortest transition the vehicles could make with their turning radii was considered. For a 3-m turning radius and a 2-m track width, the shortest turn could be accomplished by skipping 2 tracks (starting from track i and arriving at i + 3). From Eq. 4 , this distance is 9.4248 m, and because there are at least 199 tracks that require a transition (every track except the starting one), the lower bound can be approximated as 1, 875.53 m (= 9.4248 · 199). The upper bound was calculated considering the worst possible transition track sequence (200, 1, 199, 2, 198, 3, . . . , 101, 100). If only straights lines were considered, the total distance would be ntracks 40, 200 m (= i=1 ikwidth ), but because the vehicles had turning radii, the bound was raised to 43, 584.00 m to include the extra semicircle trajectories. Table 8 presents both the mean values obtained after 1 day of optimisation for each operator and their improvements relative to the best literature referenced operator. As shown, the proposed operator and its variants completely outperform the other operators; only the variant of the Mix-opt without segment operations did not outperform the literature operators. Nearly all operators delivered the same result until 3 h passed. The results were even better than those obtained in the CVRP benchmarks analysis; this behaviour can be explained by the use of a longer time for convergence. The Mix-opt operator without inter-vehicle segment relocations was the best option. There were far fewer vehicles than the number of tracks, and thus distributing the vehicles over the tracks was not as important as identifying the best order. Finally, Mix-opt and its best variant outperformed the best literature operator (the Simple Inversion operator) by 56.97% and 62.17%, respectively.

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

375

Fig. 10. Routes using a fleet of 3 vehicles with tank capacities of (a) 90 doses, (b) 45 doses and (c) 30 doses.

Since the Mix-opt variants showed a good performance on both classical and agricultural CVRP problems, it means Mix-opt has a high degree of independence in regard to the weights. This is due to the fact that it is not so important the probabilities to apply each operation, but the higher variety of changes now available. After demonstrating the superior performance of the proposed operator in a generic agricultural routing problem compared with

operators in the literature, the study next aimed to integrate the operator into a SA algorithm to shape an expert system for route planning in agricultural fields, that is, an agricultural route planner. Already proposed agricultural route planners only consider one vehicle and do not take into account the tank capacity, which is very relevant for many agricultural treatments as the herbicide spraying mentioned above. Thus, the proposed expert system had to be compared to a previous approach only using one vehicle and

376

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Fig. 11. Routes assigned using a fleet of 3 vehicles with tank capacities of 10, 110 or 1110 occurrences.

without considering the capacity. The other approach was also based on a metaheuristic method, a Genetic Algorithm that uses the Swap operator as mutation, focused on determining the best order to cover all the field tracks (Hameed et al., 2011). In Hameed’s work this method is used to minimize the distance to cover a field of 37 tracks of 9 m width with a vehicle of a turning radius of 6 m. The best track sequence obtained by this method was (12, 8, 6, 9, 1, 3, 5, 2, 4, 7, 11, 10, 18, 23, 20, 19, 17, 21, 24, 22, 16, 13, 14, 15, 25, 31, 29, 32, 30, 27, 28, 26,…… ,36, 34, 33, 35, 37) and a total distance travelled of 7902.00 m (see Fig. 9a) requiring a computational time of 11.45min. The same field was optimized by using the proposed planner and the obtained solution was (29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10,……, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 31, 33, 32, 34, 35, 37, 36) having a total distance travelled of 7661.60 m (see Fig. 9b) requiring a computational time of 68 s on average (10 tests). It is important to note that the proposed planner only takes 3 s on average (10 tests) to outperform the Hameed’s results, that is, to obtain routes shorter than 7902.00 m. This short time may be used to route plan in real time (in regular size fields as the field in Fig. 9) at least obtaining better results than other approaches. This is interesting because one vehicle may fail and the rest of the fleet should continue the remaining work, which implies the need for a quick re-planning. Due to the lack of agricultural route planners able to work with several vehicles, some illustrative agricultural problems were considered to analyse the suitability of the proposed planner, and by extension the Mix-opt, in finding the best routes in situations involving fleets with limited tank capacities. The strategy used was to consider real cases with particular conditions that would allow approximate predictions of the optimal routes. For clarity, the fields tested in the illustrative cases were small, but similar results were obtained with larger fields.

4.3.1. Route for a full-coverage spraying treatment using a fleet of vehicles with the same movement capabilities but tanks with different capacities This test considered a fleet of 3 vehicles performing a spraying treatment. To perform the treatment, the vehicles were equipped with tanks to store herbicide. The herbicide had to be sprayed on the weed patches, and the field was set to contain 90 patches; consequently, 90 herbicide doses were required. The vehicles could only treat a track if they had sufficient herbicide remaining in the tank to spray all weeds on the track. In this framework, the goal was to minimize the distance travelled by the fleet while performing the treatment. Different tank capacities for the vehicles of the fleet were tested: 90, 45 and 30 doses. The aim was to confirm that the shortest path was obtained for each case. Fig. 10 presents the results obtained. In Fig. 10a, the tank used had sufficient capacity to treat the entire field, and thus the solution obtained only involved 1 vehicle, even if 3 vehicles were available. In addition, the vehicles had to start and end at the depot located at the left top corner. Using more vehicles would not have reduced the distance; the extra distance travelled by the additional vehicles from the depot to the field and back would have increased the cost. When the tanks had a 45-dose capacity (Fig. 10b), the solution for the same problem involved 2 vehicles, the minimum number of vehicles required to completely treat the field. As in the previous case, the use of more vehicles would have penalized the solution cost due to the extra distances needed for the round trip to and from the depot. Finally, in the 30-dose case (Fig. 10c), the solution incorporated all 3 vehicles of the fleet. Because the vehicles’ turning radii were sufficiently small to travel from one track to an adjacent one using the shortest ma noeuvres ( -turns), all the routes obtained used this type of transition as much as possible to minimize the total distance, as illustrated in Fig. 10. Longer transitions were only included in the path when there was not sufficient herbicide remaining in the tank to

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

treat the closest track; as an alternative, a more distant but less infested track was then chosen. Many tests were performed under these conditions, and the routes obtained were always the same, with the exception of the vehicle or vehicles used in each case. Because all vehicles had the same movement capabilities, the change in vehicles did not change the solutions. 4.3.2. Route for a full-coverage spraying treatment using a fleet of vehicles in which each has a different tank capability In this case, the problem to be solved had the same characteristics as the previous one, but the fleet vehicles had different movement capabilities and tank capacities. Furthermore, the field used had 30 tracks, of which 10 contained 10 occurrences of weeds (each track contained 1 occurrence), 10 contained 110 weeds (11 weeds per track) and 10 had 1110 occurrences (111 per track). Furthermore, the tanks of the first, second and third vehicle were set to store 10, 110 and 1110 doses, respectively. In this manner, vehicle 1 could only treat the 1-occurrence tracks (it did not have capacity to completely treat any other track), the second vehicle should be focused on the 11-occurrence tracks (because it cannot completely treat the 111-occurrence tracks and should leave the 1occurrence tracks to the first vehicle), and consequently, the third vehicle should be focused on the 111-occurrence tracks. Fig. 11 presents the solution in which all vehicles in the fleet were involved (only the three working jointly would allow complete coverage of the field). Furthermore, vehicles 1, 2 and 3 were focused on the 1-, 11- and 111-occurrence tracks, respectively, as expected. Moreover, similar to the previous illustrative test, the turning radii allowed vehicles to travel between adjacent tracks, which quickly led to use of these transitions whenever there were contiguous tracks allocated to the same vehicle. 5. Conclusions A new operator was proposed and applied to solve agricultural routing problems with a vehicle fleet. The proposed operator integrates the elementary operations found in the most common literature operators, such as relocations, swaps, inversions or local searches, which all exhibit good performance in resolving routing combinatorial problems such as the CVRP and mTSP. The proposed operator, Mix-opt, consists of a weighted mixture of operators, such as a single relocation, a single swap, a segment relocation, a segment swap and an inter-vehicle segment relocation. Any of these operations can be applied whenever the operator is executed, depending on certain weights that estimate the relevance of each operation while developing new and improved solutions. The proposed operator includes both segment operations and single operations that allow fine-tuning of the solutions when close to the optimum. Of course, if only single operations are used, the convergence would be very slow, particularly in the earlier stages when large changes often generate improvements in the solutions. Moreover, the inter-vehicle segment relocation was included in the proposed operator to accelerate the exchange of tracks among vehicles because the solutions actually represent several routes, that is, as many as there are vehicles in the fleet. In this manner, the routes (or part of them) can easily move from one vehicle to another, generating new solutions easily. The variety of changes that the operator can apply makes the performance of the optimization method less dependent on the operator chosen, avoiding slow convergences due to the poverty of the modifying operations, as shown in Abdoun et al. (2012).

377

Because the elementary operations are integrated according to configurable weights and some additional parameters (local search attempts, reversal option, etc.), a configuration process was performed to avoid particularly bad values and to obtain a set of default values with which to at least initially execute the proposed operator. The configuration process consisted of testing 9720 different set of values for the Mix-opt parameters, and the value set that led to the best results was selected as the default values of Mixopt. Mix-opt variants (i.e., other configurations of Mix-opt) were also studied to evaluate the dependence of the proposed operator on the selected configuration. Mix-opt used with default values and some variants (resulting from excluding some of the elementary operations) were compared to literature operators to solve well-known CVRP problems and agricultural routing problems. The results demonstrated that Mix-opt and nearly all of the variants tested outperformed the literature-referenced operators. Since the variants also obtained good results, it was confirmed that the operator is not highly dependent on the configuration and that makes the optimization method less dependent on the operator chosen, Mix-opt was integrated into a SA algorithm to shape an expert system for route planning in agricultural fields. The route planner, and by extension the Mix-opt, outperformed a similar planner based on a different operator, and also exhibited good performance in the proper solutions of a battery of illustrative agricultural problems and found solutions consistent with the routes expected. Even though the proposed operator requires a higher computational time because it may apply more operations, the convergence process lasts less time. Based on all these results, it can be concluded that the operator is a useful approach to accelerate convergence in routing problems when using metaheuristic optimisation methods. In some cases the results are obtained even fast enough to route plan in real time better solutions than other approaches. In future work, additional operations and configuration values should be evaluated for operator enrichment and increased acceleration of convergence. Furthermore, an important step forward may be to apply the operations in a manner depending on the search exploration stage. Mix-opt has been built to apply to any operation at any time, but it may be a good strategy to link operations to the convergence stage, taking advantage of the fact that some operations are more useful than others, depending on the convergence stage. This type of strategy could lead to the application of segment operations at the beginning of the solutions search process, whereas the single operations would be applied in the later stages to refine the solutions. Finally, this work is useful for comparing operators and demonstrating that the proposed approach can be successfully applied to solve agricultural routing problems. Regardless, the Mix-opt operator should be implemented in a faster language to more readily test the results against previous approaches, such as Bochtis et al. (2007); Conesa-Munoz et al. (2012); Ryerson and Zhang (2007). Acknowledgments The Spanish Government and the European Union have provided full and continuing support of this research work through projects AGL2011 - 30442 - C02 – 02 (GroW) and UE - CP IP245986 - 2(RHEA). References Abdoun, O., Tajani, C., & Abouchabaka, J. (2012). Analyzing the performance of mutation operators to solve the traveling salesman problem. International Journal of Emerging Sciences, 2(1), 61–77. Affenzeller, M., Wagner, S., Winkler, S., & Beham, A. (2009). Genetic algorithms and genetic programming: modern concepts and practical applications. CRC Press.

378

J. Conesa-Muñoz et al. / Expert Systems With Applications 54 (2016) 364–378

Applegate, D. L., Bixby, R. E., Chvatal, V., & Cook, W. J. (2011). The traveling salesman problem: a computational study. Princeton University Press. Banzhaf, W. (1990). The “molecular” traveling salesman. Biological Cybernetics, 64(1), 7–14. Barnett, D. T., Stohlgren, T. J., Jarnevich, C. S., Chong, G. W., Ericson, J. A., Davern, T. R., et al. (2007). The art and science of weed mapping. Environmental Monitoring and Assessment, 132(1-3), 235–252. Bochtis, D., Vougioukas, S., Tsatsarelis, C., & Ampatzidis, Y. (2007). Optimal dynamic motion sequence generation for multiple harvesters. Agricultural Engineering International: The CIGR Ejournal, 9(1), 1–9. Christofides & Eilon’s Instances (2015). http://neo.lcc.uma.es/vrp/vrpinstances/capacitated-vrp-instances/ last access: March 2015. Conesa-Munoz, J., Ribeiro, A., Andujar, D., Fernandez-Quintanilla, C., & Dorado, J. (2012). Exploring the effect of turning manoeuvres on the multi-path planning of a robot fleet in agricultural tasks. In Proceedings of the 1st RHEA international conference. Dantzig, G. B., & Ramser, J. H. (1959). The truck dispatching problem. Management science, 6(1), 80–91. de Oliveira, H. C. B., & Vasconcelos, G. C. (2010). A hybrid search method for the vehicle routing problem with time windows. Annals of Operations Research, 180(1), 125–144. Donald, D. (2011). Traveling salesman problem, theory and applications. Dorigo, M., & Gambardella, L. M. (1997). Ant colonies for the travelling salesman problem. BioSystems, 43(2), 73–81. Fogel, D. B. (1993). Applying evolutionary programming to selected traveling salesman problems. Cybernetics and systems, 24(1), 27–36. Goldberg, D. E., & Holland, J. H. (1988). Genetic algorithms and machine learning. Machine learning, 3(2), 95–99. Haj-Rachid, M., Ramdane Cherif, W., Chatonnay, P., & Bloch, C. (2010). Comparing the performance of genetic operators for the vehicle routing problem. In Proceedings of the 5th conference on management and control of production and logistics (pp. 313–319). Hameed, I. A., Bochtis, D. D., & Sorensen, C. G. (2011). Driving angle and track sequence optimization for operational path planning using genetic algorithms. Applied Engineering in Agriculture, 27(6), 1077–1086. Hamza, M. A., & Anderson, W. K. (2005). Soil compaction in cropping systems: a review of the nature, causes and possible solutions. Soil and tillage research, 82(2), 121–145. Holland, J. H. (1975). Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. U Michigan Press.

Ingber, L. (1989). Very fast simulated re-annealing. Mathematical and Computer Modelling, 12(8), 967–973. Kirkpatrick, S., Gelatt, C. D., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220(4598), 671–680. Larrañaga, P., Kuijpers, C. M. H., Murga, R. H., Inza, I., & Dizdarevic, S. (1999). Genetic algorithms for the travelling salesman problem: a review of representations and operators. Artificial Intelligence Review, 13(2), 129–170. Lin, S. (1965). Computer solutions of the traveling salesman problem. Bell System Technical Journal, 44(10), 2245–2269. Michalewicz, Z. (1996). Genetic algorithms+ data structures= evolution programs. Nazif, H., & Lee, L. S. (2012). Optimised crossover genetic algorithm for capacitated vehicle routing problem. Applied Mathematical Modelling, 36(5), 2110–2117. Oliver, I. M., Smith, D., & Holland, J. R. (1987). Study of permutation crossover operators on the traveling salesman problem. In Genetic algorithms and their applications: Proceedings of the second international conference on genetic algorithms: July 28-31, 1987 at the Massachusetts Institute of Technology. Cambridge, MA. Or, I. (1976). Traveling salesman-type combinatorial problems and their relation to the logistics of regional blood banking. Osaba, E., Carballedo, R., Diaz, F., & Perallos, A. (2013). Analysis of the suitability of using blind crossover operators in genetic algorithms for solving routing problems. In Proceedings of the IEEE 8th international symposium on applied computational intelligence and informatics (SACI), 2013 (pp. 17–22). IEEE. Ryerson, A. E., & Zhang, Q. (2007). Vehicle path planning for complete field coverage using genetic algorithms. Agricultural Engineering International: CIGR Journal, 1–11. Shkel, A. M., & Lumelsky, V. (2001). Classification of the Dubins set. Robotics and Autonomous Systems, 34(4), 179–202. Syswerda, G. (1991). Schedule optimization using genetic algorithms. In L. Davis (Ed.), Handbook of genetic algorithms (pp. 332–349). Van Nostrand Reinhold. Ursani, Z., Essam, D., Cornforth, D., & Stocker, R. (2011). Localized genetic algorithm for vehicle routing problem with time windows. Applied Soft Computing, 11(8), 5375–5390. Yu, B., Yang, Z. Z., & Yao, B. (2009). An improved ant colony optimization for vehicle routing problem. European Journal Of Operational Research, 196(1), 171–176. Wu, X. (2012). A two-stage ant colony optimization algorithm for the vehicle routing problem with time windows. International Journal of Advancements in Computing Technology, 4(1), 485–491.