1 Introduction

Operations research in the domain of agriculture has become increasingly important since it can optimize the whole supply chain process and facilitate decision making (Zhang et al., 1990). Instances in this area include, among others, optimization of forest harvest scheduling (Neto et al., 2017; St. John and Tóth, 2013; Alonso-Ayuso et al., 2011), sugarcane harvest planning (Florentino et al., 2018; Sethanan and Neungmatcha, 2016), and crop cultivation (Aliano Filho et al., 2019). The domain also includes the management of farm and machinery as well as the routing of the machine(s) inside the field (Plà et al., 2014).

Agricultural Routing Planning (ARP) in farm management is intended to design or schedule the movements of machines inside agricultural fields. A good design can minimize the distance of the machine’s tours, thereby leading to cost savings. Hence, it is essential to have an optimized plan for the routing of the machines being used for the agricultural tasks in the field (Jensen et al., 2015).

The focus of this research is on the routing optimization of machines inside multiple agricultural fields. Figure 1 illustrates an agricultural field while Fig. 2 shows the possible graph representation (right) of an ARP problem (left). The field has several established tracks with symmetrically-planted crops. These tracks can be traversed by both agricultural machine(s) and harvesters. The headland area to the North and South of the field is the non-working area (crop-free) where machines perform maneuvers to go to the next track. The farmer needs to determine which sequence of tracks will cover the shortest distance, thereby reducing the overall cost of harvesting.

Fig. 1
figure 1

Illustration of an agricultural field (Utamima et al., 2018)

Fig. 2
figure 2

Illustration of ARP problem (left) with possible graph configurations (right)

To date, most research on ARP has considered only single-field configurations (Bochtis et al., 2015; Conesa-Muñoz et al., 2016; Seyyedhasani and Dvorak, 2018a). Most of the ARP research also utilized a single machine without a capacity constraint (Hameed et al., 2011; Edwards et al., 2017). Therefore, ARP with multiple fields and capacitated machines is still a potential research area. ARP belongs to the class of NP-complete problems; therefore, an exact optimization is too time-consuming and complex to be applied, and a heuristic algorithm is needed (Marinakis et al., 2017). Hence, this research develops the evolutionary neighborhood discovery algorithm (ENDA) to deal with ARP.

Most of the current research focuses on real-world scenarios and utilizes general algorithms rather than addressing unique ARP configurations and algorithm improvements. This study is a continuation of our recent work (Utamima et al., 2019) by extending the ARP problem. This study makes three significant contributions to the literature. First, the mathematical model for the extended ARP is formulated, taking into account multiple fields, barriers, and multiple machines with heterogeneous capacities. Second, seven problem sets for the extended ARP are generated and presented. Third, a hybrid heuristic and a set of experiments are developed in order to compare the proposed heuristics with the Genetic Algorithm and Tabu Search from the previous literature.

This section is followed by a review of the literature pertaining to ARP and the algorithms that have been proposed to solve related problems (Sect. 2). The definition of the problem, the mathematical model, and the proposed algorithm, ENDA, are given in Sect. 3. Section 4 provides the experimental results, including descriptions of the problem set, the parameter settings, numerical results, and the analysis. Finally, Sect. 5 offers suggestions for future research in ARP, and concludes the paper.

2 Literature review

2.1 Agricultural routing planning

The ARP problem involves minimizing the distance traveled by machines when performing field operations inside an agricultural field (Utamima et al., 2018). This problem has been altered and extended in terms of the targets [e.g., improvement of time (Seyyedhasani and Dvorak, 2018b), minimization of the headland distance (Bochtis and Vougioukas, 2008)], specific field operations [e.g. herbicide application (Conesa-Muñoz et al., 2016), potato cultivation (Zhou et al., 2015), or orchard operation (Bochtis et al., 2015)], and limitations [e.g., restricted machine limit (Bakhtiari et al., 2013) and obstacles (Zhou et al., 2014)].

The optimization of the non-working distance, first introduced by (Bochtis and Vougioukas, 2008), is intended to minimize the distance in the headland area. The machine is not performing an agricultural operation while making the turning maneuvers in the headland area. Jensen et al. (2015) extend the problem by using capacity constraints. The model was adapted by Bochtis et al. (2015) for orchard operations, Conesa-Muñoz et al. (2016) for a weed-killing problem and by Seyyedhasani and Dvorak (2018a) for reducing the field work time. Barrientos et al. (2011) and Valente et al. (2013) also applied the same concept to aerial coverage planning.

Utamima et al. (2019) gathered several published ARP datasets from previous publications and presented a mathematical model to generalize the problem. All the datasets are single-field configuration. The collected datasets can be used as validation data for a new method when solving a new ARP problem. The work also conducts a comparative study of several metaheuristic algorithms in order to deal with the collected dataset.

Many of the recent ARP studies focus on a single field. Seyyedhasani and Dvorak (2017), Conesa-Muñoz et al. (2016), Zhou et al. (2014), Bakhtiari et al. (2013), Valente et al. (2013) and Hameed et al. (2011) consider both rectangular and non-convex fields. The rectangular field is the primary type that most researchers use in ARP. Whereas, the non-convex field is closer to actual cases and most farm situations (Zhou et al., 2014).

Currently, research on multiple crop fields is found in sugarcane harvesting (Kittilertpaisan and Pathumnakul, 2017; Sethanan and Neungmatcha, 2016). Sethanan and Neungmatcha (2016) focused on sugarcane field operations that minimized the traveling distance in multiple fields, while Kittilertpaisan and Pathumnakul (2017) focused on improving the planning of the cultivation of a new crop. However, neither study considered the tracks inside the fields and the maneuver of the machines. Hence, this study considers the tracks inside the fields and the machines’ maneuvers to better address the harvesting problem.

2.2 Heuristic algorithms for agricultural routing planning

Previous studies on ARP focused mostly on real cases and solved the related problems with several different algorithms. The most frequently used algorithm is the Genetic Algorithm (GA). GA is an optimisation method based on the concept of genetics and natural selection. GA uses a population formed of individuals to evolve to a state that maximises fitness under the defined selection procedure (Haupt and Haupt, 2004; Karatas et al., 2021). In general, GA simulates a natural evolution process that generates individuals by selecting the best candidates from the current generation to be applied crossovers and mutations.

GA has been adapted for machine routing to decrease the total distance traveled in biomass transportation (Gracia et al., 2014). GA was also used for track sequence optimization in a field, and its solutions have proven to be more efficient compared to the conventional fieldwork patterns (Hameed et al., 2011). Recently, GA has been used in optimizing the scheduling of crop cultivation (Aliano Filho et al., 2019). GA has also been utilized to optimize the sugarcane harvesting plan in order to make the harvesting point as close as possible to the ideal (Florentino et al., 2018).

TS is an algorithm that traverses the solution space by moving iteratively from the current solution to a (best) solution in its neighborhood. TS improves the search by not re-evaluating points already visited in the search space. Such a point is considered ‘tabu’ to be rechecked (for several iterations).This method makes use of flexible memory structures with restrictions and aspiration criteria that exploit the search spaces (Glover and Laguna, 1997).

TS was applied to reduce the fieldwork time in agricultural operations (Seyyedhasani and Dvorak, 2018b). Seyyedhasani and Dvorak (2017, 2018a) utilized TS to improve field efficiency and the dynamic directing of several machines in farming tasks. The results show that TS can optimize the field work time more effectively than do the Clarke-Wright heuristics (Seyyedhasani and Dvorak, 2017). The TS approach was also applied to solve the location problem of a forest harvesting machine (Weintraub, 2007).

Sethanan and Neungmatcha (2016) used Particle Swarm Optimization (PSO) with a different structure for route planning in sugarcane fields, while Valente et al. (2013) employed Harmony Search to optimize coverage path planning in vineyard parcels. A hybrid Simulated Annealing was used for route planning of autonomous vehicles in herbicide application (Conesa-Muñoz et al., 2016). Zhou et al. (2014) utilized Ant Colony Optimization (ACO) to create useful and efficient solutions for a field with obstacles as opposed to manual operations by farmers.

To conclude, there are several research gaps, as indicated earlier. First, there is very limited research on ARP involving multiple fields, and most of the ARP research utilized a single machine without capacity constraints. Hence, this study is the first to address several ARP constraints simultaneously. Second, the results of experiments conducted in this study show that the solutions given for several datasets in previous research can still be improved. Therefore, an improved, more efficient algorithm needs to be developed to enhance the quality and management of the solution.

3 Materials and methods

3.1 Problem description

Fig. 3
figure 3

Illustration of problem with three fields configurations

Fig. 4
figure 4

Illustration of a machine’s tour and its maneuvers

Figure 3 illustrates the problem with three fields. The blue lines indicate the tracks while the red lines are the field border. Each track is differentiated by a number. Field 1 has 18 tracks (West to East, 1 to 18), Field 2 has 22 tracks (West to East, 19 to 40), and Field 3 has 16 tracks (South to North, 41 to 56). The barriers in the problem are the field borders and the rocks, which cannot be traversed by the machine. The proposed algorithm addresses the barriers by limiting the connection between different fields. Therefore, the machines can enter or exit a field or move from one field to another only from a specific location/entrance.

In Fig. 3, the machines can enter the field only through the field’s entrance (green square). The machine’s tour starts from and ends at the Depot (red square). The goal is to discover the minimum length of the non-working distance in all tours for a set of machines to harvest all tracks. The non-working distance in this study refers to the distance traveled by the machines outside the tracks when making maneuvers, going to or from the entrances and going from and returning to the Depot.

This research assumes that there are several available machines with different capacities to harvest several fields. The optimization will assign machines to the given routes, taking their capacities into consideration. If a machine reaches the maximum amount of crop it can hold, it needs to return to the Depot to unload the harvested crop. This study assumes a uniform amount of harvest per traveled distance. Hence, the machine capacity can be described as the maximum distance it can travel on tracks on one trip.

Figure 4 depicts a machine’s trip in two fields and its maneuvers. There are two adjacent fields in Fig. 4 where the field in the North can be entered only through the field in the South. The non-working distance is visualized with green lines. The numbers (near the green lines in Fig. 4) indicate the sequence of tracks that the machine uses. The non-working distances can be differentiated by the maneuvers (3 to 6 and 9) and movements between Depot and entrances or the tracks to the entrances (1, 2, 7, 8, 10, 11, 12 and 13).

The machine starts from the Depot and traverses the south field’s entrance first (1) before harvests several tracks in the southern field (2–6). The machine then goes to the northern field’s entrance (7), harvests two tracks in the northern field (8–9), and returns to the entrance (10). Next, the machine harvests a track in the southern field (11) before going back to the Depot via the southern field’s entrance (12).

Figure 4 also depicts the four kinds of maneuvers that are considered in this study. The assumption in Fig. 4 is that the machine needs to skip at least one track to make a flat turn. Hence, if a machine’s next track is directly besides the current track, then the bulb or bulb\(\Theta \) turns will be made. In Fig. 4, the maneuvers are flat (4, 6), bulb (9), flat\(\Theta \) (3) and bulb\(\Theta \) (5). The flat\(\Theta \) and bulb\(\Theta \) turns are made when the current and next track are aligned with an acute angle \(\theta (\theta < 90^{\circ })\), while the flat and bulb turns are performed when the current and the next track are aligned with an acute angle \(\theta (\theta = 90^{\circ })\) and have the same Y-axis coordinate in the maneuver’s area. The conditions of these maneuvers are listed in Constraint 1 in Sect. 3.2 and adapted from Utamima et al. (2019) and Jin and Tang (2010).

3.2 Mathematical model

Table 1 Parameters
Table 2 Decision variables

The mathematical model used to solve the extended ARP is formulated as an integer programming model. The group of tracks in the fields are assumed to be a set of vertices and edges in Graph G. Table 1 describes the parameters used in the mathematical model. The decision variables are listed in Table 2.

Equations 15, adapted from Jin and Tang (2010) and Utamima et al. (2019), are used to compute the distance the machine travels in order to make a turning maneuver in the headland area. The description of each notations is given in Table 1.

$$\begin{aligned} g_{ij\psi }= & {} {\left\{ \begin{array}{ll} \Pi (i, j,\theta _{ij\psi }), &{}\quad \text {if} \,|i-j| \le \frac{2 r}{w} \wedge \theta _{ij\psi } = 90^{\circ } \\ \Omega (i, j, \theta _{ij\psi }), &{}\quad \text {if} \,|i-j|> \frac{2 r}{w} \wedge \theta _{ij\psi } = 90^{\circ } \\ \Pi \theta (i, j, \theta _{ij\psi }), &{}\quad \text {if} \,|i-j| \ge \frac{2 r}{w} \wedge \theta _{ij\psi }< 90^{\circ } \\ \Omega \theta (i, j, \theta _{ij\psi }),&{}\quad \text {if}\, |i-j| > \frac{2 r}{w} \wedge \theta _{ij\psi } < 90^{\circ } \\ \end{array}\right. } \end{aligned}$$
(1)
$$\begin{aligned} \Pi (g_{ij\psi })= & {} |i-j|w + r(\pi -2) \end{aligned}$$
(2)
$$\begin{aligned} \Omega (g_{ij\psi })= & {} r \left( 3 \pi -4 \sin ^{-1} \left( \frac{2 r+|i-j|w}{4 r}\right) \right) \end{aligned}$$
(3)
$$\begin{aligned} \Pi \theta (g_{ij\psi })= & {} |i-j| w(1+\cot \theta _{ij\psi })+r(\pi -2) \end{aligned}$$
(4)
$$\begin{aligned} \Omega \theta (g_{ij\psi })= & {} \pi r +\frac{4 r^{2}-|i-j| w(4r+w \cot ^{2} \theta _{ij\psi }+w)}{4 r-2 w} \nonumber \\&\quad \times \, \sin ^{-1} \frac{|i-j| w(4 r \cot \theta _{ij\psi }-2 w \cot \theta _{ij\psi })}{4 r^{2}-|i-j| w(4r+w \cot ^{2} \theta _{ij\psi }+w)} \end{aligned}$$
(5)

The objective function is given in Eq. 6 which is to minimize the sum of all included edges in the solution, the distance of the tour between fields, the distance traveled by each machine to and from the Depot, and the distance between the entrance to the first and last track to be harvested. Meanwhile, Constraints 712 are the restrictions related to the tour between tracks inside a field. Constraint 7 and 8 specify that each route should start and end at the Depot (Vertex 0). Constraints 9 and 10 ensure that each node is visited only once.

Constraint 11 ensures that when a machine enters a vertex, it will also leave that vertex. Constraint 12 is a sub-tour limitation that eliminates any disjoint sub-tours from a solution. Then, Constraint 13 ensures that the amount of harvested crop does not exceed the capacity of a machine. The distance traveled inside the track has the same dimension as the capacity of a machine. The assumption is that when a machine traverses a track, it completely harvests that track, so the maximum distance inside the track will depend on the maximum capacity of a machine. Finally, Constraints 14 and 15 ensure that each field is visited only once.

$$\begin{aligned} \begin{aligned} z&= \mathrm{Min} \Bigg (\sum _{f \in F} \sum _{i \in V} \sum _{j \in V} \sum _{k \in K} g_{i j\psi } x_{f i j}^{k} + \sum _{a \in F} \sum _{b \in F} d_{a b} y_{a b} h_{a b} \\&\quad +\, \sum _{f \in F} \sum _{k \in K} D_{f} (s_{f}^{k} + \tau _{f}^{k} ) + \sum _{f \in F} \sum _{t \in T} z_{ft}\delta _{ft}\Bigg ) \end{aligned} \end{aligned}$$
(6)

subject to:

$$\begin{aligned}&\sum _{j \in V} x_{f 0, j}^{k}=1, \quad \forall k \in K,\forall f \in F \end{aligned}$$
(7)
$$\begin{aligned}&\sum _{i \in V} x_{f i, 0}^{k}=1, \quad \forall k \in K,\forall f \in F \end{aligned}$$
(8)
$$\begin{aligned}&\sum _{k \in K} \sum _{i \in V} x_{f i j}^{k}=1, \quad i, j \ne 0, \forall j \in V: i \ne j, \forall f \in F \end{aligned}$$
(9)
$$\begin{aligned}&\sum _{k \in K} \sum _{j \in V} x_{f i j}^{k}=1, \quad i, j \ne 0, \forall i \in V: i \ne j, \forall f \in F \end{aligned}$$
(10)
$$\begin{aligned}&\sum _{k \in K} \sum _{i \in V} x_{f i j}^{k}=\sum _{k \in K} \sum _{j \in V} x_{f j i}^{k}, \quad i, j \ne 0, \forall j \in V, \forall f \in F \end{aligned}$$
(11)
$$\begin{aligned}&\sum _{i \in S} \sum _{j \in S} x_{f i j}^{k} \le \Vert S\Vert -1, \forall S \subseteq V, \Vert S\Vert \ge 1, \quad \forall k \in K, \forall f \in F \end{aligned}$$
(12)
$$\begin{aligned}&\sum _{f \in F} \sum _{i \in V} \sum _{j \in V} P_{f t} x_{f i j}^{k}<Q_{k}, \quad \forall k \in K, \forall t \in T \end{aligned}$$
(13)
$$\begin{aligned}&\sum _{a \in F} y_{a b}=1, \quad \forall b \in F : a \ne b \end{aligned}$$
(14)
$$\begin{aligned}&\sum _{b \in F} y_{a b}=1, \quad \forall a \in F : a \ne b \end{aligned}$$
(15)

The total distance traveled for harvesting the crop fields is found with Eq. 16 which is the sum of the distance between the fields, the length of each track in each field, and the objective function.

$$\begin{aligned} \mathrm{dist} = \sum _{f \in F} \sum _{t \in T} l_{f t} + z \end{aligned}$$
(16)

3.3 Proposed algorithm

This study builds a new hybrid algorithm, named ENDA, to solve ARP. Algorithm 1 lists the ENDA pseudocode. ENDA has two main stages: the exploration stage that searches the solution among the individuals in a population, and the exploitation stage that searches for the best solution found so far. ENDA is a hybrid of three kinds of heuristics, namely distribution search, inter-neighborhood discovery, and intra-neighborhood discovery. The exploration stage consists of distribution search and inter-neighborhood discovery, while the exploitation stage contains the intra-neighborhood discovery procedure. The individuals are the candidate solution to the problem; the population refers to the group of individuals in the algorithm. The representation of an individual with 8 tracks is illustrated in Fig. 5.

Fig. 5
figure 5

Representation of individual

figure a

First, the parameters of the ENDA are initialized. The parameter settings are explained in more detail in Sect. 4.3. The details of the machines (number of machines, their various capacities, and turning radius) are also initialized at this point. Then, the algorithm reads the field data that contains the track coordinates, the distance between each entrance and the Depot, and the length of each track. The iterations start with the computation of the objective function of every individual. The exploration stage of ENDA will perform the distribution search according to either the rate or the neighborhood discovery.

The distribution search (Algorithm 1, Line 5–7) will build the new population according to the probability of the order of tracks for the selected individuals. The distribution search will run if the DistributionSearch_rate (the probability rate to execute the procedure) is met. The selected individuals are the group of individuals with a better objective function (H is set of selected individuals) that are labeled \(h_1, h_2, h_3, \ldots , h_n (h \in H)\). Equation 17 calculates the sum of every track being placed in an order. The graphical illustration of the calculation of \(\Re \) is shown in Fig. 6. In Eq. 17, \(\Gamma _{t p}^{h}\) is set to 1 if track t is visited at order p, otherwise, it is set to 0 (\(t \in T, p \in P\) ; P is set of tracks’ order). The size of T and P is equal to the number of tracks in the fields. The distribution search function will update each individual in the population by selecting the order of track proportionally according to \(\Re \).

Next, the inter-neighborhood discovery procedure is listed in Line 9–20 of Algorithm 1. The procedure is adapted from Hansen et al. (2010) and Utamima et al. (2019). The procedure runs for discovery_iteration times. At the beginning of every iteration, the roulette wheel selection is performed, and an individual is selected (S). The roulette wheel selection expects that the higher the fitness of an individual implies the greater is the chance of its survival. The fitness function that is used in the Roulette Wheel selection is listed in Eq. 18 which is the inverse of the objective function (mentioned in Eq. 1). The chance of selection in this approach is proportional to the fitness of an individual.

Fig. 6
figure 6

Illustration of the contruction of \(\Re \)

$$\begin{aligned}&\Re _{t p}=\sum _{h \in H} \sum _{t \in T} \sum _{p \in \mathrm {P}} \Gamma _{t p}^{h} \end{aligned}$$
(17)
$$\begin{aligned}&fn = \frac{1}{z} \end{aligned}$$
(18)
Table 3 Description of operators used in ENDA

After selection, the algorithm chooses two points randomly from S and performs between flip, guided swap, or inversion operators. The details of the operators are listed in Table 3. Next, the new population is updated from the results of the inter-neighborhood discovery.

The objective function calculation evaluates the fitness of the new population and finds the current best solution in the population (Algorithm 1, Line 23). This solution is checked to determine whether it can replace the global best solution (the best solution found so far among generations). If the current best solution is not better than the global best solution (globalBest), then the second stage of ENDA is implemented (Algorithm 1, Line 28–33). In this stage, the intra-neighborhood discovery searches inside the globalBest to find a better solution. The procedure is adapted from the local search in Song et al. (2019). In this stage, the interchange and reverse operators are employed until no further improvement can be made. The operators are described in Table 3.

If the solution of the intra-neighborhood discovery(ndSol) is better than globalBest, then ndSol will become the globalBest. Next, the Elitism procedure is run to retain ten percent of the best individuals through generations in order to protect prospective solutions (Nouri and Ladhari, 2018). The recorded individuals are copied to the new population and are sent to the next generation.

3.4 Genetic algorithm and Tabu search

This study also re-coded GA and TS to solve the extended ARP problem set. GA and TS are chosen because both algorithms have been implemented recently in optimization in the agriculture domain (Florentino et al., 2018; Seyyedhasani and Dvorak, 2018a). The input and the fitness calculation are configured to meet the standard procedure of the algorithms. The number of generation and the size of population in GA and TS are set to be the same as those in ENDA.

Generally, GA starts from the generation of a new population and continues with the selection of chromosomes with a better fitness value. The higher the fit of a chromosome, the higher its chances to be selected. Crossover and mutation are applied to the chosen chromosomes with a given probability rate. The crossover process cuts two chromosomes at one point, and the halves are spliced together to create new chromosomes. Meanwhile, the mutation process changes the value of genes in a small group of chromosomes. After crossover and mutation, the fitness evaluation detects the best solution, which is recorded. The whole process is repeated until a stopping criterion (i.e. maximum iteration) is met. The process of evolution in a population of chromosomes over multiple generations represents a search for a good and feasible solution.

Meanwhile, TS constructs several moves (candidate solution) in the neighborhood. The representation of the neighborhood structure in S is like the one provided in Table 5. A move in TS is using Swap techniques between two points (randomly chosen) in the neighborhood.

Next, TS picks a move and checks whether the move is tabu (the move is tabu if it is listed in the tabu list). If the move is not tabu, TS accepts the move. Otherwise, TS checks the aspiration criteria of the move. If a tabu move meets the aspiration criteria, the move will be accepted, otherwise, the move will be refused. If the new solution from an accepted move is better than the current solution, the solution will be updated. The decision process will be repeated for a number of iterations (Ji and Tang, 2004).

4 Experimental results and analysis

4.1 Validation of the mathematical model

In order to validate the mathematical model, it was implemented using General Algebraic Modeling System (GAMS) software. Two small problems are tested, and consist of multiple fields and multiple machines with different capacities. Each problem involves two fields with tracks measuring 4 meters in width, and two machines available with a turning radius of 3 meters.

Table 4 The solution comparison of GAMS and ENDA

Table 4 shows a comparison of the results of GAMS and ENDA (coded with MATLAB). Both GAMS and ENDA can obtain the same solution for the two problems as well as the same tours of machine 1 and machine 2.

The experiments show that the running time of ENDA is six times faster than that of GAMS. If the size of the problem is increased, the running time is expected to grow exponentially for the GAMS implementation. Therefore, the utilization of ENDA is required for both small and large problems because it can achieve a good solution with a faster running time.

Based on previous research by Bochtis and Sørensen (2009) and Utamima et al. (2018), ARP is similar to Vehicle Routing Problem (VRP) in the agricultural field. VRP itself is an NP-Complete problem (Toth and Vigo, 2002), hence ARP can also be considered as NP-complete. Therefore, finding exact solutions as done by GAMS is restricted to smaller instances as the running time is growing exponentially. Metaheuristics and evolutionary algorithms like ENDA are used on larger instances to achieve near-optimal solutions with short running times.

4.2 Problem sets description

The experiments conducted in this study are comprised of two steps. The first step involves the validation of the proposed algorithm by using the data in the literature. The datasets are gathered from published studies and by contacting the corresponding authors. Table 5 shows a description of the data. In Table 5, the first and second columns are the instance code and the total number of tracks in that instance, respectively. The track widths and lengths (meters), turning radii (meters), shapes, and machines used are listed in Column 3 to 6 in Table 5. The last column in Table 5 contains the references to the problem instances, and the details are listed immediately below the table.

Table 5 Description of previous datasets

In the second step, experiments are run using the extended ARP datasets. Table 6 gives the attributes of the datasets that are used in this study. There are seven datasets with multiple fields and different shapes. The problems are generated and vary in terms of the total number of tracks, their width (meters), and turning radius (meters). The number of fields ranges from two to five, with total tracks ranging from 30 to 112. The machines used (Table 7) have different capacities (ranging from 700 to 3000 m). As indicated earlier, this study assumes a uniform measure of harvest per traveled distance. Hence, the machine capacity is depicted with the maximum distance it can travel on one trip.

Figure 7 illustrates the seven problem instances: 2A(a), 2B(b), 3A(c), 3B(d), 4A(e), 4B(f), and 5A(g). The number in the middle of each field is the field number, and the small number near the track is the track number. These numbers are used to give a better understanding of the output of the program that is shown later in Table 12.

4.3 Parameters settings

The parameter set-up is acquired by directing a two-level factorial plan with four elements. Each factor joins high and low dimensions (Montgomery, 2013). The algorithm is run ten times to make up for the non-deterministic nature of the heuristics (Guan and Lin, 2016). Table 8 lists factors and the levels of each set-up. To adjust to the extent of the problem, the settings use n, which is the number of tracks in the fields. A larger problem requires a bigger population and more generations. The value shown in bold indicates the better setting for ENDA. The selected settings for the number of generations and the size of the population are also applied to GA and TS.

4.4 Numerical results

The results of the conducted experiments are listed in Tables 91011 and 12. Table 9 shows details of the first step of the experiments, while Table 10 lists the results of the second step of the tests. Table 11 presents the running time of all algorithms when solving the second step of the experiments. Table 12 lists the solution of ENDA in the second step of the tests that contains the order of tracks in the fields.

Table 6 Description of the extended ARP problem set
Table 7 Machines provided
Fig. 7
figure 7

Illustration of Problem 2A to 5A (ag)

Table 9 shows details of the non-working distance of six published data. In Table 9, the first and second columns show the problem code and the associated references. The third column is the best-known solution to date obtained from the latest publication (Conesa-Muñoz et al., 2016; Seyyedhasani and Dvorak, 2018a), while the last column shows the results obtained by ENDA. The bold values in the third and fourth columns refer to the minimum value in that row. As shown by the results, ENDA can obtain the same solution for four instances (8rt, 12rta, 12rtb, 20rt) and achieve better solutions in two instances (37nc, 74nc). These results indicate that ENDA can achieve the expected results for ARP instances.

Table 10 presents the non-working distance of multiple field data with multiple machines of the extended ARP data. In Table 10, the first column lists the problem code, the second column specifies the number of tours required to complete all tracks in the fields, and the third, fourth, and fifth columns list the solutions obtained by ENDA, GA, and TS, respectively. The values in bold refers to the minimum value in that row. The last column in Table 10 is the average distance savings obtained by ENDA compared to those of GA and TS for every problem, while the last row in bold is the average of the distance savings for all problems. ENDA successfully achieves the shortest non-working distance for all problem sets compared to the performances of GA and TS. The GA solutions are better than TS in four instances (2B, 3B, 4B, 5A), while the TS solutions for the remaining three instances (2A, 3A, 4A) are better than those obtained by GA. In terms of average distance savings, ENDA successfully saves 11.72% of the non-working distance compared to other algorithms.

Table 8 Factor settings for ENDA
Table 9 The non-working distance of the published data (single field)
Table 10 The non-working distance of the extended ARP problem set (multiple fields)
Table 11 The running time of ENDA, GA, and TS for all problem set
Table 12 The details of every tour in each problem set obtained by ENDA

Table 11 shows the running time of all the algorithms for each problem set. The running time of ENDA is the fastest compared to those of GA and TS. On the other hand, the runtimes of TS are faster than GA in five instances, while those for two problems (2B, 3B) are slower than GA.

Table 12 lists the details of the ENDA solution for each problem set. In Table 12, the first column lists the problem code, and the second column shows the tours and the maximum in-track distance of the machine. The last column is the order of tracks in the fields and lists the field number and the order of the tracks that correspond to Fig. 7. For example, problem 2A needs two machines (with maximum distance inside the tracks are 3000m and 2500m, respectively) to harvest the fields. The first machine goes to Field 1 and harvests 14 tracks in the order of [10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 13, 14, 12, 11] and then goes to Field 2 and harvests four tracks [29, 27, 28, 30]. Next, the second machine goes to Field 2 and harvests 12 tracks in the order of [24, 26, 25, 23, 22, 20, 21, 19, 18, 16, 17, 15]. Note that every machine must start from the Depot and return to the Depot.

Figure 8 illustrates the maneuver of the machines in Problem 5A. In Fig. 8, the field number is in the center of each field, and the track numbers are indicated by the small number in the corner of each field. Each of the six tours of the machines is represented by a different colored line. In this problem, the turning radius (r) is 3.9 and the tracks’ width (w) is 5. Thus, according to Constraint 1 in Sect. 3.2, the machine can perform a flat turn by skipping at least one track in order to go to the next track. As shown in Fig. 8, the predominant type of maneuver is the flat turn.

5 Conclusion

It is anticipated that this research will improve the planning of conventional machinery systems by producing better routing designs. The reduction of resources such as machines, fuel, and personnel can result in a competitive advantage and access to markets in a lower price sector. Subsequently, this contributes to addressing the issue of sustainability in agriculture. The scope of this research comprises ARP for a harvesting problem with the tracks inside several fields on a flat surface. This study also assumes that the machine capacity is the maximum distance covered on tracks during the trip.

Fig. 8
figure 8

Illustration of the tours and the maneuvers in five fields

This study presents the extended ARP by considering multiple constraints simultaneously in order to better generalize the harvesting problem. This research also presents seven problem sets for the extended ARP. Furthermore, it recommends the application of a new hybrid algorithm (ENDA) that outperforms GA and TS. The experimental results demonstrate that during the validation process with the previous ARP dataset, ENDA can achieve the same best solution in four instances, and produces a better solution for the other two instances. Moreover, ENDA successfully achieves the best objective function by saving an average of 11.72% of non-working distance compared to other algorithms in the seven problem sets of the extended ARP. ENDA also achieves the fastest running time for all the given problems.

The validation of the mathematical model with GAMS software is also provided in this research. Future research can focus on more experiments regarding the capacities of machines with different field layouts.