Introduction

Tourism in Indonesia has a promising future. Data from the Indonesian Ministry of Tourism (2017) show tourism generated 205.04 trillion rupiah in foreign currency while attracting 14.04 million international tourists and 277 million domestic tourists. Encouraging travel and spending is one of strategic targets of the ministry especially for domestic tourists. To encourage travel, the itineraries must be planned well so that it covers tourists’ favorite destinations without using up too much time. Activities that are included initinerary preparation are choosing favorite destinations and arranging them while considering the destinations’ operational times and tourists’ limited time, then making it into a schedule to follow. The combination becomes more complex with more destinations, constraints, and objectives. This condition has been categorized as a tourism routing problem by previous researchers. This research is interesting because it attempts to fulfill tourists’ needs, arrange tourists’ favorite destinations, and guarantee the minimum time without breaking the constraints.

The Traveling Salesman Problem (TSP) is a basic routing arrangement that also applies to routing for tourism itineraries. TSP with profit is one of the TSP developments that considers every destination to have score or profit in order to prioritize visitations. The Orienteering Problem (OP) starts with a similar principle to TSP with its scores and profit for destinations, but with OP the different scores become the objective. This problem is more complex because it has constraints like time windows at each destination that must be followed to make the itinerary feasible. This condition is similar with tourism industry because tourists will visit their favorite destination or destinations with higher scores. OP is a basic model that is applicated widely in addressing tourism routing problems. There are many developments that arise so that it conforms to tourism situations. For example, the Orienteering Problem with Time Window (OPTW) is an OP model that considers destinations’ operational times, or the Team Orienteering Problem (TOP) will apply to group traveling situations.

Previous research has focused on maximizing scores to guarantee that the favorite destinations are the priority of an itinerary. Unfortunately, time can be ineffective because such an itinerary reduces productive hours that can be used to visit other favorite destinations. The previous objective is maximizing scores which guarantees the favorite destinations are inserted in the itinerary, but the effect is a longer time spent traveling and some destinations cannot be visited. This research will combine two objectives: maximizing the score and minimizing the time. The previous models only used one objective. The metaheuristic method replaces the random phase in the heuristic construction to reduce the possibility of an ineffective result. The contribution of this research is more effective and efficient routing for tourists. It is referred to as more effective because it will contain more destinations, while more efficiency is achieved because it can save time for the tourists. The contribution of this model is a better result according to route development by modifying the Team Orienteering Problem with Time Window (TOPTW) model and metaheuristics method, Iterated Local Search (ILS). This modification is needed in order to accommodate another objective, which is minimum time. With ILS, it will start with an adjustment in the heuristic construction before it will perturb randomly.

This paper will be start with an introduction that shows problem and also the gap in previous research. The second section is a literature review to help design state of the art research that links the previous research and the proposed research. The third section is the methodology for the research steps. The results will be laid out in the fourth section along with the analysis. Then the fifth section will consist of the conclusions based on this research.

Literature review

Most of the routing algorithms for the tourism problem use the Orienteering Problem (OP) as a base model, then they are modified to adjust then to certain conditions. The OP is an algorithm that arranges a set of possible destinations with various scores and has a goal of maximizing the total score of the visited destinations. Tsiligirides (1984) approached two heuristics for OP: they are stochastic and deterministic algorithms. OP can be formulated as follows: G =(V, E) is an edge-weighted graph with a score for the destination, s is a starting location, t is a terminal location, T is a positive time limit budget, and the goal is finding a path from s to t (or tour if s ≡ t) with a duration of, at most, T. The objective is collecting a maximum total profit from the visited destinations. Souffriau et al. (2008) said OP is the simplest routing model in which each destination has its own score and the objective is to create a single route that will maximize the collected score within a limited time. Li and Fu (2012) developed an equation with the objective of maximizing total profit (1). Let pi be tourists’ preference value or profit for destination Vi, while xij(t) is 1 or 0, depending on it is visited or not. Si is the set of successor destinations of destination Vi and Pi is set of predecessors. Equation (2.2) and (2.3) explain the flow conversion in model. Equation (2.4) ensures every destination is visited no more than once. Equation (2.5) and (2.6) guarantee that, if one destination is visited, the arrival time in that destination is the sum of preceding arrival time, service time, and travel time between those destinations. vt is visiting time on node Vi. Equation (2.7) consists of the start time and end time constraint. If t0 is starting time, ti is arrival time at node Vi. In this equation, t0 is equal to t1 means V1 is the starting location and time starts from there. Equation (2.8) and (2.9) are variables constraints. The result for this model is a route that satisfies tourist preference and limitation, and follows the destinations’ time windows.

$$ Max\mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{i = 2}^{n - 1} \mathop \sum \limits_{j \in S(i)}^{{}} p_{i} x_{ij} (t) $$
(2.1)
$$ \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{j \in S\left( 1 \right)}^{{}} x_{ij} \left( t \right) = \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{i \in P(n)}^{{}} x_{1n} (t) = 1 $$
(2.2)
$$ \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{i \in P(k)}^{{}} x_{1k} (t) = \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{j \in S(k)}^{{}} x_{kj} , \quad \forall k = 2, \ldots ,n - 1 $$
(2.3)
$$ \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{j \in S\left( 1 \right)}^{{}} x_{ij} (t) \le 1, \quad \forall i = 2, \ldots ,n - 1 $$
(2.4)
$$ \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{i \in P(j)}^{{}} \left( {t + t_{ij} (t)} \right)x_{ij} (t) = t_{j} ,\quad \forall j = 2, \ldots ,n $$
(2.5)
$$ \mathop \sum \limits_{{t = t_{0} }}^{T} \mathop \sum \limits_{j \in S(i)}^{{}} tx_{1j} (t) = t_{i} + vt_{i} ,\quad \forall i = 1, \ldots ,n - 1 $$
(2.6)
$$ t_{1} = t_{0} ,\quad t_{n} \le T $$
(2.7)
$$ t_{i} > 0,\quad \forall i = 1, \ldots ,n $$
(2.8)
$$ x_{ij} (t) = 0,1,\quad \forall e_{ij} \in E, \quad \forall t = 1, \ldots ,T $$
(2.9)

OP can be adjusted to many situations; it can be continued to the metaheuristic method for the optimality, consider many constraints, and has faster computer time. Herzog and Wörndl (2014) defined OP as a score system based on collected scores for chosen destinations while considering the constraints. OP is related to the Knapsack Problem, The Maximum Collection Problem, and The Bank Robber Problem (Li and Fu 2012). A regular heuristic method cannot be used because considering all the constraints takes longer in terms of process time and has a greater possibility of yielding an infeasible result. Hence, the metaheuristic method will be used to run the algorithm. The metaheuristic method concerns efficiency in time and has the flexibility to consider the preferences and limitations of the tourists.

OP development has expanded it widely but OP has remained as the basic model. If OP is usually for single route, the Team Orienteering Problem (TOP) that was developed by Vansteenwegen et al. (2011a, b) will produce multi-routes. Some models can be used to generate single or multi-routes. For example, the Orienteering Problem with Time Windows (OPTW) is for arranging a single route while considering operational hours of destinations (Tsitsiklis 1992; Kantor and Rosenwein 1992; Gendreau et al. 1998a, b; Bansal et al. 2004; Chekuri and Kumar 2004; Chekuri and Pal 2005; Righini and Salani 2009; Vansteenwegen et al. 2011a). OPTW can transform into the Team Orienteering Problem with Time Windows (TOPTW) for multi-routes (Vansteenwegen 2008; Vansteenwegen et al. 2009a; Lin and Yu 2012; Gunawan et al. 2015a). Both OPTW and TOPTW transform into many research topics because of their flexibility (Vansteenwegen et al. 2011b). A moving 2-opt is needed to get a qualified result for OP, but in the limited time this process cannot be implemented efficiently to solve the (T)OPTW model. The solution approach for (T)OPTW is the same as for (T)OP. This concept was confirmed by Tricoire et al. (2010) who modified (T)OP problem solving with limited time to get better results. Model TOPTW was used in Vansteenwegen et al. (2009b) paper, Vansteenwegen et al. (2009c), Labadie et al. (2010), Montemanni et al. (2011), Lin and Yu (2012), Hu and Lim (2014), Cura (2014), Gunawan et al. (2015a), and Gunawan et al. (2015b). The reason why the researchers used the same model was because they can compare the performance of the metaheuristic method in terms of result quality and run time. They used the same case as found here: http://www.mech.kuleuven.be/en/cib/op.

Vansteenwegen et al. (2009b) explained that TOPTW is generally like OP with m-route. For m-route, TOP must determine route m which starts from destination 1 and ends at destination n will maximize score for all routes. The equation for OPTW consists of a variable for each location i = 1,, n is assigned to a score Si, has visiting time Ti and a time window [Oi, Ci]. The starting point and the end point in every tour are the same and fixed. The time that is needed to travel from location i to j is known for all locations as tij. Every destination has their own score and total time from traveling and visiting time inside route m cannot exceed the limited time that is already determined as Tmax.. Each location can be visited at most once and formulated as an integer program (xijd= 1 if included is in a route, a visit to location i is followed by a visit to location j, 0 otherwise; yid= 1 if location i is in a route, 0 otherwise; sid is the start of the service at location i in route, and M is a large constant).

$$ Max\mathop \sum \limits_{d = 1}^{m} \mathop \sum \limits_{i = 2}^{n - 1} S_{i} y_{id} , $$
(2.10)
$$ \mathop \sum \limits_{d = 1}^{m} \mathop \sum \limits_{j = 2}^{n - 1} x_{1jd} = \mathop \sum \limits_{d = 1}^{m} \mathop \sum \limits_{i = 2}^{n - 1} x_{ind} = m $$
(2.11)
$$ \mathop \sum \limits_{i = 1}^{n - 1} x_{ikd} = \mathop \sum \limits_{j = 2}^{n} x_{kjd} = y_{kd} \left( {k = 2, \ldots ,n - 1,;d = 1, \ldots ,m} \right) $$
(2.12)
$$ s_{id} + T_{i} + c_{ij} - s_{jd} \le M\left( {1 - x_{ijd} } \right) \left( {i,j = 1, \ldots ,n;d = 1, \ldots ,m} \right) $$
(2.13)
$$ \mathop \sum \limits_{d = 1}^{m} y_{kd} \le 1\quad (k = 2, \ldots ,n - 1) $$
(2.14)
$$ \mathop \sum \limits_{i = 1}^{n - 1} \left( {T_{i} y_{id} + \mathop \sum \limits_{j = 2}^{n} c_{ij} x_{ijd} } \right) \le T_{\hbox{max} } \left( {d = 1, \ldots ,m} \right) $$
(2.15)
$$ O_{i} \le s_{id} \left( {i = 1, \ldots ,n;vd = 1, \ldots ,m} \right) $$
(2.16)
$$ s_{id} \le C_{i} \left( {i = 1, \ldots ,n;vd = 1, \ldots ,m} \right) $$
(2.17)
$$ x_{ijd} y_{id} \in \left\{ {0,1} \right\} \left( {i,j = 1, \ldots ,n; d = 1, \ldots ,m} \right) $$
(2.18)

Objective (2.10) maximizes the total score that is collected. Equation (2.11) guarantees that a route that starts at destination 1 will be ended at location n. Equation (2.12) and (2.13) determine the relationship and timeline of each tour. Equation (2.14) assures that each destination will be visited once. Equation (2.15) explains that each route will finish in limited time. Equations (2.16) and (2.17) guarantee every visit will start during operational hours. Equation (2.18) prevents same route planning.

Gendreau and Lourenco (2003) said that a metaheuristic method gets solutions by combining interaction between local improvement procedures and higher strategy to get an effective process. This process can escape from local optimal results and give better results from a bigger searching area. In the existing method, this has done but it created a trap in local optimal results. In a complex searching area, especially when using one or more neighborhoods to move from one solution to other solution, it could be a constructive or destructive process. To solve this problem, it needs an optimal method that will yield results immediately like metaheuristic methods do. Talbi (2009) divided metaheuristic methods into several groups: one of them is the most developed single-solution metaheuristics like Simulated Annealing, Tabu Search, Variable Neighborhood Search, Iterated Local Search, and Guided Local Search. Population-based metaheuristics is another common group like Genetic Algorithm, Ant Colony, and Particle Swarm. Labadi et al. (2010) proposed a method that combines the Greedy Randomized Adaptive Search Procedure (GRASP) and the Evolutionary Local Search (ELS). This approach gives solutions with equal quality and reduces computer time significantly compared to the Ant Colony System. When GRASP-ELS compared to ILS, it gives better quality results but has a longer process time. Lin dan Yu (2012) used a heuristic algorithm for TOPTW with Simulated Annealing, and they modified it become Multi-Start Simulated Annealing (Lin and Yu 2017). Gunawan et al. (2016) stated the better solution of the TOPTW model is an equilibrium solution compared to an optimal solution that is centered. They said that models like Local Search and Simulated Annealing (Hu and Lim 2014), Artificial Bee Colony (Cura 2014), and Simulated Annealing and Iterated Local Search (SAILS) (Gunawan et al. 2015a) have worse results than the Well-Tuned—Iterated Local Search that they had designed (Gunawan et al. 2015b). Well-tuned ILS will yield improved solutions with short computerization. This is in line with the survey by Gavalas et al. (2013a) that said Iterated Local Search (ILS), Greedy Randomized Adaptive Search Procedure and Evolutionary Local Search (GRASP-ELS), Ant Colony Systems (ACS) and Iterative Three Components Heuristics (I3CH) can give satisfactory results for problems in TOPTW. Before those pieces of research, Vansteenwegen et al. (2011b) conducted a survey to compare the results of ILS and ACS. Gavalas et al. (2013b) said that TOPTW is a NP-hard problem and that the most efficient metaheuristic method is ILS. Vansteenwegen et al. (2009c) also made same statement because ILS also offers a fair compromise between execution time and a good quality traveling route.

The Iterated Local Search is the fastest algorithm to solve a TOPTW problem with good quality. According to Labadie et al. (2010), ILS has two steps. First, ILS will not take the initial phase randomly. ILS will keep the local optimal score temporarily and choose a new location around the local optimal one. Second, when ILS finds a new local optimal, ILS will decide whether to maintain the initial local optimal or adopt the new one as the basis. If the new one is adopted, it means exploration. If the existing one is used because it is better, it means exploitation. ILS mostly takes the result between the two. This pseudo code below is ILS algorithm with random phase.

figure a

ILS combines an insertion step and a shaking step to avoid the optimum solution being local. ILS was developed by Lourenço et al. (2013) for the Traveling Salesman Problem and Scheduling Problem. A set of local solutions is developed rather than repeating a local search randomly. Good balancing between improvement and shaking the intermediate solution is the important thing. These two important steps in ILS, as seen in Vansteenwegen et al. (2009b), are Insertion and Shaking. The first step, Insertion, is a local heuristic step to add new destinations to a route one by one. Before adding the visit to a destination to a route, the verification for all the visitations to other destination must be conducted, thus the arrangement can follow the operational time after the insertion. To get a fast heuristic, there needs to be a fast evaluation for every possibility. The problem is this checking will take a lot of time. For every insertion of a visitation, the minimum insertion time will be determined. The second step, Shake, is needed to exit from the local optimal. As long as this step is one, one or more visitations will be removed. The shake uses two parameters as inputs, with first parameter indicating how many visitations in the sequence will be removed from each route and position in every route to start the removal process. If in the removal process the last destination is reached, removal still continues after the starting point. After the removal, all visitations that are removed will be diverted to the front as much as possible to avoid unimportant waiting time. If it reaches the final destination, removal will continue after the starting point.

From previous research, we knew the problem that has not been fulfilled is the addition of another objective to the previous model TOPTW, making a multi-objective model with two objectives, which are maximizing score and minimizing time. This additional objective is needed because it will make the itinerary more effective and efficient. Effective because it can accommodate the tourists’ favorite destinations, and efficient because it can save the tourists time. The novelty of this research is the modification of the model by using a mathematical formula. This formula will help to achieve the optimal result by considering the real situation or reducing the assumptions. Another novelty is the design of the adjustment to the ILS, because it has a construction phase to replace the random phase. The heuristic construction will give better preparation by producing better results and faster that tourist only needs few time to wait for the result.

Methodology

This research methodology consists of three steps. The first step is analyzing and modifying the previous TOPTW model, second is modifying the ILS method, and third is validating and comparing the result. The new TOPTW model will accommodate multi-objectives, which are the maximum score and minimum time for finding the shortest total time that contains visiting time Vi and traveling time Tij. Constraints will be added to make sure the starting time si, and visiting time Vi at a destination will not pass the Tmax. A complete directed network is G = (k,i), where k = {1,2,…,m} is the set of destinations in a route; destinations {(i j,}: i ≠ j, i jN} are the set of arcs. Destination 0 is the starting location in each route. Destination i(i =1,…, n) is a tourism destination with a nonnegative score Si, a nonnegative visiting time Vi, and a time window [Oi, Ci] in each node. Each path must start from and end at node 0. The traveling time from destination i to destination j is known as Tij for each pair of destinations i and j. The maximum time in a route cannot exceed the budget time Tmax. Every destination can be visited only once. The objective is maximizing the total score from visiting the destinations, and minimizing the time spent. The minimum time is found by adding the visiting and traveling times for all destinations and routes that are visited, and the traveling time from the starting location to the first location. FTOPTW can be modeled as a mixed integer linear program as follows.

Decision Variables:

  • yik = 1 if destination i is visited in route k, 0 otherwise

  • xijk = 1 if in route k, a visitation to destination i is followed by a visit to destination j, 0 otherwise

Parameters:

  • i: number of destinations.

  • k: number of routes.

  • Si: score of customer i.

  • Tmax: budget time in a route.

  • Tij: traveling time from destination i to destination j.

  • si: arrival time for destination i.

  • Vi: visiting time for destination i.

  • Oi: opening time in the time window for destination i.

  • Ci: closing time in the time window for destination i.

  • L: Large constants.

Model:

$$ Max\mathop \sum \limits_{k = 1}^{m} \mathop \sum \limits_{i = 1}^{n} S_{i} y_{ik} $$
(3.1)
$$ Min\mathop \sum \limits_{k = 1}^{m} \mathop \sum \limits_{i = 1}^{n} s_{ik} + V_{i} $$
(3.2)
$$ \mathop \sum \limits_{k = 1}^{m} \mathop \sum \limits_{i = 1}^{n} x_{ijk} = \mathop \sum \limits_{k = 1}^{m} \mathop \sum \limits_{i = 1}^{n} x_{jik} = m $$
(3.3)
$$ \mathop \sum \limits_{i = 1, i \ne l }^{n} x_{ilk} = \mathop \sum \limits_{j = 1, j \ne l}^{n} x_{ljk} = y_{lk} \quad \forall l = 1, \ldots ,n;\quad \forall k = 1, \ldots ,m $$
(3.4)
$$ s_{ik} + V_{i} + T_{ij} - s_{jk} \le L \left( {1 - x_{ijk} } \right)\quad \forall i,j = 1, \ldots ,n;\quad \forall k = 1, \ldots ,m $$
(3.5)
$$ \mathop \sum \limits_{i = 1}^{n} \mathop \sum \limits_{d = 1}^{m} y_{ik} \le 1 $$
(3.6)
$$ \mathop \sum \limits_{k = 1}^{m } \mathop \sum \limits_{i = 1}^{n} \left( {V_{i} y_{ik} + \mathop \sum \limits_{j = 1}^{n} T_{ij} x_{ijk} } \right) \le T_{\hbox{max} } $$
(3.7)
$$ O_{i} y_{ik} \le s_{ik} \quad \forall i = 1, \ldots ,n; \quad \forall k = 1, \ldots ,m $$
(3.8)
$$ C_{i} y_{ik} \ge s_{ik} \quad \forall i = 1, \ldots ,n;\quad \forall k = 1, \ldots ,m $$
(3.9)
$$ s_{ik} + V_{i} \le T_{\hbox{max} } \quad \forall i = 1, \ldots ,n;\quad \forall k = 1, \ldots ,m $$
(3.10)
$$ x_{ijk,} y_{ik} \in \forall \left\{ {0,1} \right\};\quad i,j = 1, \ldots ,n; \quad \forall k = 1, \ldots ,m $$
(3.11)

The objective function (3.1) maximizes the total score and (3.2) minimizes the time. The total score comes from the score that is summed from every destination that is in the schedule. Total time comes from all the starting times and all the visiting time spent at the places visited. Maximum total score is the priority before continuing with the minimum total time. Constraint (3.3) determines the number of routes used. Constraints (3.4) and (3.5) maintain the connectivity and keep track of the timeline of each route. Constraint (3.6) makes sure that every destination is visited at most once. Constraint (3.7) guarantees that the time budget of each route is not violated. Constraints (3.8) and (3.9) are time window constraints. Constraint (3.10) guarantees that the starting time and visiting time for each destination is not greater than the time budget. Constraint (3.11) specifies that all variables are binary. To make sure this formulation is feasible to run, we used a case study with 16 tourism destinations in East Java.

The second step is analyzing and modifying the previous ILS method. The previous metaheuristics method still uses a random phase at the beginning, which makes the probability of getting feasible results small. For modifying the existing model, we replaced the random phase with a heuristic construction that considers all the constraints, to make a more feasible result and become a candidate for optimization. The Adjusted Iterated Local Search (AILS) pseudo code can be read as below.

figure b

In the beginning, AILS will take visiting and traveling times from the database, then the destination with the biggest score will be allocated to each route without violating the maximum time Tmax and operational hours [Oi, Ci] of the destination. Permutation will guarantee every destination has the same probability of contributing the best solution. The maximum score (Total Score or TS) and minimum time (Total Time or TT) become BS1. BS1 continues to the second process, reverse, in which we will flip the sequence in every route, and recount the TT. If this is less than BS1 and fulfills the time requirement, the result will be placed into BS2. Otherwise, BS1 will become BS2. Repeat this step until all the routes have been flipped. The last step is Perturbation for all the routes. Based on the percentage, the destinations will be moved to another route randomly. If there is a better TT, it could be BS3. If they are getting worse, BS2 will be set as BS3.

The third step is comparing the metaheuristics AILS with other methods in previous papers. Some researches proposed multi-objective team orienteering problem to maximize various profit from each destinations (Martín-Moreno and Vega-Rodríguez 2018; Schilde et al. 2009; Rezki and Aghezzaf 2017), while Hu et al. (2018) developed it with time windows. Mirzaei et al. (2017) research has objective to balance the profit among the routes. Another multi-objective for time dependent orienteering problem was designed by Mei et al. 2016). Multi-objective that is combined maximum profit and minimum travel cost was developed by Bederina and Hifi (2017) as proposed multi-objective team orienteering problem without time windows. This research is focused with multi-objective orienteering problem with time window, and the objectives are maximum profit and minimum time. The previous multi-objectives research did not use single profit for each destination and did not have time window, while this research will compare with single objective research, because they presented the multi-result like total destination visited, total profit, total time, and running time. AILS will compare to other methods like MSA, SA and ABC in Lin and Yu (2017) and ILS in Vansteenwegen et al. (2009b). There is a calibration parameter that is required before we run AILS. There are 17 problem instances, each consisting of 100 destinations, from Solomon’s datasets (Lin and Yu 2017). The percentage will be set at 20%, 40%, 60% and 80% to find out which one will give the shorter running time. The comparison that will be used is total score, visited destination and running time. All the result for each problem are recorded and the gap for the running time is calculated as the average (RTBSRTAILS)/RTAILS where RTBS is the best solution running time in comparing methods and RTAILS is the running time from the AILS method. It will do the same for Visited Destination (VD) and Total Score (TS). Other methods that will be compared are Multi-Start Simulated Annealing (MSA) (Lin and Yu 2017), Simulated Annealing (SA) (Lin and Yu 2012), Artificial Bee Colony (ABC) (Cura 2014), and Iterated Local Search (ILS) (Vansteenwegen et al. 2009b). We use the same case study from Solomon’s datasets, and follow the number of routes previous papers used, for a fair comparison.

Algorithm and metaheuristic

This section will describe the calculation process and solution that is obtained from mathematic formulation for the TOPTW algorithm. However, the proposed TOPTW has more objectives. In this new algorithm, the objectives are to maximize the score and minimize the time. The addition objectives make the optimization program perform it as two serial process. When we run the program in Lingo 17 with 16 destinations in Mixed Integer Linear Programming, the program runs for more than 45 min to get the global optimum total score. This time is too long for tourists, who need a very short time to give them a result. The program’s running time must be limited, at most to just 1 s, to get a maximum score and minimum time. That is why we need a metaheuristics method like the Adjustment Iterated Local Search (AILS) to speed up the algorithm to get a solution that is near the global optimal. Because the objective of the program is to minimize its running time, so the tourist is only waiting a short time, we will focus on this. But to make sure the program is good enough, compared to other methods, we also record the total score and number of visited destinations.

Solution representation

A solution for FTOPTW is started by sorting the priority destinations in descending order. The sorting of n destinations (1,2,…,n) and m routes. Destination 1 is the starting and ending destination as the route will return to the same destination it began at. Each destination has the score Si which represents the priorities to visit. Destinations with the highest scores will be distributed in each route. For example, the 16 destinations with the highest scores are shown in Table 1. Because tourists only have 2 days to complete their journey, there are 2 routes. The allocation would be destination 2 in route 1; destination 8 in route 2, destination 6 in route 1, and so on. If the score is the same, the destination can be chosen arbitrarily. The allocation will be based on minimum visiting times spent in each route, and continue until it almost reaches the maximum time Tmax. Traveling time between destinations will be inserted, then it continues with checking Tmax, to return destinations with the lowest scores back to the list. Time window constraints [Oi, Ci] will be checked to make sure there is no violation. For every destination that is returned to the list, and there is still some time remaining in a route, it could be replaced with another destination that has a visiting time which is less than the remaining time. Every time a new destination is inserted, the process to check Tmax and [Oi, Ci] will be repeated.

Table 1 A FTOPTW example with 16 destinations

Illustration of solution representation

Table 1 gives a FTOPTW instance with 16 tourism destinations in East Java, and a tourist decides to do the journey in 2 days or two routes. Each destination has coordinates (X, Y), visiting time (V), score (S), opening time (O) and closing time (C) for its time window. All the information is taken from Google Maps.

An example of a solution for this FTOPTW is given in Fig. 1. First the destinations will be arranged, based on the highest score to the lowest. Then one by one the destinations will be included in each route by considering their visiting time, to make sure it will not violate the time budget or Tmax. The number of days is the same as the number of routes, so how many days the tourists want to spend is the same as the number of routes that will be created. Each pair of destinations has X and Y coordinates that include the traveling time that comes multiplied by the Euclidian distances with the vehicle’s speed. For running the formulation in Lingo 17, we used the traveling times provided in Google Maps.

Fig. 1
figure 1

The FTOPTW result

As can be seen in Fig. 1, the first destination in the first route is destination 2. Line represents traveling time, bar represents visiting time for each destination. It needs 52 min to reach destination 2 from destination 1 (the starting point). It takes 120 min to visit destination 2. Then it continues to destination 4, which takes 12 min, so the starting time at destination 4 is 184 min. The visitation then goes on to destinations 9 and then 12. The time budget Tmax will end after or equal with end of the visiting time at the last destination. After the last destination, the tourist will return to destination 1. All the visited destinations must be checked for not violating the time window. The second route will do the same. The total score of a given initial solution can be easily calculated from the total score collected in all the routes.

The AILS procedure in Fig. 2 is started with the permutation. All the destinations in one route will get pairwise exchanges and for each exchange the total time must be counted. Total scores are not an issue anymore because all the destinations that are included in the route are already the highest scoring ones. After all the exchanges then every sequence that is created is compared, then it will choose the minimum total time. Checking must be done for the time window, because the time budget is already guaranteed at the beginning. For example the permutation process gives the same result as the optimization. The second step is to reverse the sequence for each route. For example in route 1, the first sequence is 2–4–9–12. When reversed, the sequence becomes 12–9–4–2. Then it must be checked for the time budget and time window, and if it is appropriate, it will continue with comparing which one has the minimum total time. We will use the sequence with the new minimum time, otherwise it will be back to the previous sequence. As we can see in Fig. 3, the reverse has a better result so we continue with this sequence. For the third process, Perturbation, there is a certain percentage that represents the number of destinations that will be moved randomly. For example in our case study, there are 16 destinations. If we use 20%, it means 3.2 destinations. This must be rounded up to an even number, so there are 4 destinations that must be moved. The moving could be inside one route or across to another route. In our example destination 9 in route 1, and originally in the second sequence, is moved to route 2 and becomes a third sequence. Destination 17 from route 2 will replace destination 9 in route 1. Time budgets and time windows must be checked for every route, and if they give a better total time the route will change. Figure 3 shows the illustration how the route can change. The red pin shows the starting point and ending point. In the left figure, there are two routes and each is distinguish by the line style, solid for route 1 and dashes for route 2. Then in the right figure, the routes are changed.

Fig. 2
figure 2

The AILS procedure

Fig. 3
figure 3

A visual illustration of the example solution given in

Experimental results and discussion

The proposed FTOPTW algorithm and AILS method was implemented in Java by Eclipse. The experiments are carry out on a computer with an Intel Core m51.10 GHz CPU. To demonstrate the applicability of the FTOPTW algorithm, 94 (17 + 56 + 21) problem instances are generated, based on Solomon’s datasets. These problems can be classified as the problems for parameter calibration, comparing problems with Simulated Annealing (MSA and SA) and Artificial Bee Colony (ABC), and the last is comparing problems with Iterated Local Search (ILS). Each instances consists of 100 destinations with coordinates, visiting times, scores and time windows.

Parameter calibration

Since the computational results of the FTOPTW algorithm are affected by the parameter settings, the parameter calibration used 17 problem instances. In the experiment, several values of the perturbation percentages are used. Each parameter has four levels (20%, 40%, 60% and 80%) so 68 values were generated. We compared the running times as the important factor to achieve. As presented in Table 2, the 40% perturbation has the minimum average time from the 68 trials. It has a 1.159 s running time for each instance that has 100 destinations that could be visited. It means a lower perturbation does not guarantee a shorter running time. Many factors may influence the computational running time, including CPU speed, memory size, operating system, compiler, computer program, and precision.

Table 2 Parameter values tested in the calibration

Comparing results obtained by AILS, MSA, SA, ABC and ILS

Computational experiments were carried out on a large problem set to compare the performance of AILS with the other metaheuristic methods like MSA, SA, ABC, and ILS. Given the computational complexity of FTOPTW, a global optimal solution needs 45 min to solve for 16 destinations. Because it is done in sequence, the total score is first achieved with the global optimum, then followed by the minimum time. But in an iterated local search, the total score is near optimal, and the total time will be adjusted. The sequence will be exchanged to find the minimum time.

The best solutions obtained by AILS, MSA, SA, and ABC for each instance are shown in Table 3. In this table, the instance column displays the name of the problem instance, while the numbers are number of routes, total score, number of visited destinations, and running time in seconds. With this number of tours, it should be feasible to visit every location, and hence the optimal result equals the sum of all the scores. Because this is an orienteering problem, it is possible not to visit all the locations. It tries to select as many visits as possible, and to design a feasible route between them. The difficulty of solving instances is not only related to the number of locations that can be visited in each route, but also to the number of routes that can be generated. Table 3 compares the score obtained by the AILS with the best known solution from comparing the other methods. The best know result for each instance is either the optimal solution or the best result of the runs of the method. Columns 1 and 2 give the instance’s name and total score. The third column presents the score obtained by the AILS. In the next column the number of visited locations in the solutions is presented and the running time in the last column is expressed in seconds.

Table 3 Computational results for AILS, MSA, SA and ABC method

There are three kinds of gaps that we will measure, they are the gaps for the number of Visited Destinations (VD), Total Score (TS), and Running Time (RT). The gap for the running time is calculated as the average (RTBSRTAILS)/RTAILS where RTBS is the best solution running time in the compared method and RTAILS is the running time from the AILS method. The same formula can also be done for the VD gap and TS gap. Then all the instances’ gaps will be averaged again and converted into a percentage. The percentage could be positive because the other methods have a higher result, or negative because the other methods have a lower result. In comparison with Table 3, the VD gap is 4.752%. It means the other methods visited more destinations than AILS. But if we compare it with the TS gap, it has − 8.744%, showing AILS has a higher score than the other methods. It means even though the other methods visited more destinations, they were not effective journeys because they only visited more lower scoring destinations. AILS will give a more effective journey by visiting only the higher ones, so tourist spend less time traveling. The percentage of total time gives a very good result, the difference being 3836.877%. It means the AILS running time is much more efficient than that of the other methods.

In comparison with ILS, we also measured the gaps for the number of visited destinations, total score and running time. Because there are three routes (m = 2, m = 3, m = 4) the gap is obtained from the average gap of all the routes. In comparison with Table 4, the number of visited destinations has a 5.656% difference. It means ILS visited more destinations than AILS. The total score difference is 56.291% higher for ILS, thus ILS can visit more destinations and collect higher scores. But if we compare this with the running times, ILS needs more time to give a good result, the different being 375.961%. It means the AILS running time is more efficient than ILS, and this is important for the tourist that has no time to wait for the program to load.

Table 4 Computational results for AILS and ILS method

Conclusion and future research

The main contribution of this paper is an algorithm that solves the Team Orienteering Problem with Time Windows (TOPTW) fast and effectively. This work concerns the FTOPTW, which is a challenging extension of TOPTW. To reduce the gap between theory and industrial practice, this work develops an MILP model of FTOPTW, which incorporates the maximum score and minimum time. In a small set the algorithm can give a global optimal, based on the maximum score and minimum time. But because the running time was more than 45 min, it will not be suitable as a tourist’s mobile application. There are calibration parameters, a small case test using Mixed Integer Linear Programming, and a large case test comparing AILS with MSA, SA, ABC and ILS. On a large set of test instances, AILS is faster than MSA, SA, ABC and ILS, which will satisfy the tourist. This is achieved by the permutation of all the destinations, that guarantees the best pairwise will be found, which can be reversed as an alternative to get an even better result, and perturbation with a certain percentage will move the destination randomly between routes. The gap for the number of destinations visited is better than MSA, SA, and ABC, but slightly lower than the ILS result.

For future research, having an algorithm that has a near global optimum and a minimum running time is needed to make tourists more satisfied. Combining the algorithm with a metaheuristic method, or hybridize other algorithms is good, but the best fit must pass much research to achieve the objective. The constraints, such as the number of destinations, the number of routes, time budget and operating hours determine the difficulties in arranging the instances.