Spreadsheet-Based Modeling and Optimization of a Bi-Modal Traveling Salesman Problem: Model, Solution, and Case
Total Page:16
File Type:pdf, Size:1020Kb
Bond University Volume 12| Issue 2 | 2020 Spreadsheet-Based Modeling and Optimization of a Bi-Modal Traveling Salesman Problem: Model, Solution, and Case Roger Grinde, Decision Sciences University of New Hampshire [email protected] _______________________________________________________________________ Follow this and additional works at: https://sie.scholasticahq.com This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 4.0 Licence. Spreadsheet-Based Modeling and Optimization of a Bi- Modal Traveling Salesman Problem: Model, Solution, and Case Roger Grinde Decision Sciences, University of New Hampshire [email protected] Abstract This paper presents a bi-modal routing problem and two-phase spreadsheet-based model and solution approach. The problem is the Bi-Modal Covering Salesman Problem, and the context for the problem in this paper is a recreational hiking problem. Two hikers seek to traverse a set of peaks, where they have defined a number of hikes from which to choose. The problem is to a) identify the set of hikes in order to minimize a hiking time objective while ascending all peaks, followed by b) sequencing the chosen hikes in order to minimize a driving distance objective. The problem essentially combines two well- known problems in Operations Research: the Set Covering Problem and the Traveling Salesman Problem. A mathematical programming formulation is presented, followed by a detailed explanation of the Excel™ model and solution approach with Solver™, using linear and evolutionary engines. The model is enhanced using Visual Basic for Applications. In instruction, it can be utilized in many ways, from a classroom discussion example all the way up to a semester long project done in several phases. A case, split into two parts, is provided in the appendix. The full workbook and a template file is available upon request from the author. Keywords: routing, optimization, Operations Research, traveling salesman, spreadsheet, Excel, Solver, VBA, Simplex Method, evolutionary algorithm 1.0 Introduction This paper presents a model and solution of a bi-modal routing problem related to the well-known Traveling Salesman Problem (TSP). It is bi-modal due to vehicular and walking travel and is termed the Bi-Modal Covering Salesman Problem (BCSP). A model formulation, spreadsheet-based solution approach (Excel™ with VBA), and case study are provided. It is suited for courses related to Optimization, Operations Research, Management Science, Business Analytics, and programming at various levels and 2 various programs (e.g., business, engineering, applied mathematics) depending on what aspects of the problem-solving process the instructor wishes to emphasize. From an educational standpoint, the problem has some key differences compared to the TSP, which present questions of how to model it, and then how to find a solution approach. The problem can be used to emphasize the modeling aspect, the spreadsheet implementation, VBA enhancements, or some combination of these. It could also be used as a guided semester-long project where these aspects are emphasized during different phases. The author has used the problem as a case in an MBA course in Management Science with good results. The specific problem arises in hiking, but it is related to some other variations of the TSP and is applicable to some other bi-modal routing situations. There are a number of mountain peaks to climb. For this paper, the specific problem of the 48 mountain peaks above 4000 feet in altitude, in the State of New Hampshire, USA, are used (Smith & Dickerman, 2012). The hikers seek to a) identify the set of hikes to perform which will ascend each peak in the shortest hiking time; and b) sequence the hikes to minimize the driving distance between and within hikes. Appendices C and D contain case studies for classroom use. The method is generalizable to other situations. Briefly, the peaks are reached by one or more trails, each with trailheads. A specific trail may traverse more than one peak and may be a round-trip trail or a one-way trail. Trailheads are connected by a network of roads. Two hikers utilize two vehicles to reach the trailheads, and then hike one or more hikes from that trailhead. In the case of one-way hikes, the hikers must stage a vehicle at each end of the trailhead. In this section, related work is discussed. Section 2 presents the problem formulation and outlines the solution approach. The spreadsheet implementation (in Excel™ and VBA) is explained in Section 3, and Section 4 explores educational value and possible uses. Concluding remarks are provided in Section 5. Appendices contain VBA code and the case study presented, in two parts. The spreadsheet implementation and a template file is available from the author upon request. The TSP and related Vehicle Routing Problem (VRP) have a rich literature due to their many practical applications as well as solution challenges. Examples include Gutin (2007), Applegate et al. (2007), Golden et al. (2008), and Braekers et al (2016). Review of multi-objective problems is done by Jozefowiez et al. (2008). The Covering Tour Problem (CTP) has similarity to the BCSP discussed in this paper, in that there are two node sets. However, in the CTP there is only one mode of transportation. The goal is to find a minimum-cost tour through a subset of the nodes in one set, so that every node in the other set is within some critical distance of a visited nodes (e.g., rural health clinics might be one node set, and towns/villages might be the other node set). Current & Schilling 3 (1989) introduced this problem, and it has been studied by others. The problem most directly related to the BCSP presented in this paper is termed the Walking Line of Travel Problem (WLT). It was studied by Levy & Bodin (1988). The example provided was to schedule postal carriers who drive to a parking area, complete a walking tour delivering mail, and return to the vehicle. It differs from the BCSP in that one-way trips are not allowed, so the BCSP is a more general version of the WLT problem. Grinde (2017) presents a formulation of the BCSP, an heuristic solution approach using traditional optimization software, and computational results. 2.0 Problem Formulation and Solution Approach The BCSP uses two networks, one for each mode of transportation. In the hiking case problem, one network is a set of parking areas (P1, P2, …, Pm) connected by roads. The other network is a set of peaks (“cities” in the traditional TSP language), denoted by (C1, C2, …, Cn) and connected by trails. Some trails have connection points to parking areas. Each of the peaks must be visited at least once. Figure 1 shows an example. The overall objective is to minimize total weighted travel time or distance (driving plus hiking) while visiting each peak at least once. This involves driving from a home base to one of the parking areas, making one or more hikes (either cyclical or chain hikes, to be discussed shortly), driving to another parking area and hiking from there, and returning to the home base after all peaks have been visited. Figure 1. Road and Trail Networks 4 The concept of a single trip visiting one or more peaks (hike in this problem context) is as follows. The car is driven to a parking area Pi. A hike is performed, which visits one or more peaks. Two possibilities exist for the end of the hike. A loop or cyclical hike is when the hikers return to Pi, and then drive to another parking location (or perform another hike from Pi). Figure 2 shows a cyclical hike; Figure 3 a chain hike. A one-way, or chain, hike ends at a different parking area, say Pj. To perform a chain hike, both hikers drive to Pj, the endpoint of the hike, and leave one car. Then they drive to Pi, and depart on the hike. Finishing the hike at Pj, they drive back to Pi to retrieve the other car. Cyclical Trip Illustration Road C2 Trail Parking Area Step 2: Hike C1 Peak C3 P Step 1: Drive 2 Cars Step 3: Drive 2 Cars Figure 2. Cyclical Hike Chain Trip Illustration Road C2 Trail Parking Area Step 3: Hike C1 Peak C3 Step 2: Drive 1 Car to begin of hike P2 (end of hike) P1 (begin of hike) Step 1: Drive 2 Cars from previous hike Step 4: Drive 1 Car to begin of hike Step 5: Drive 2 Cars to next hike Figure 3. Chain Hike 5 Chain hike feasibility depends on the application. In the hiking setting, it is common not only to have two hikers, but also that some hikes are more naturally done as one-way hikes. This has the potential to reduce hiking time considerably. Having two cars increases the total mileage driven, though not necessarily the time. Chain hikes (trips) may be useful in other settings as well, with or without multiple vehicles. For example if the “parking” areas are airports, and customers are to be visited on one-way trips between airports. Another example may occur with bike or car sharing programs, where the pick-up and drop-off locations can be different. Other application notes are discussed as part of Case A (Appendix C). The modeling and solution approach here assumes that possible hiking trips are developed in advance. This is reasonable, as there are many hiking guides available and there tends to be a finite number of reasonable hikes. The problem becomes two-phased: 1) select which hikes to perform, visiting each peak at least once while minimizing the hiking objective; and 2) sequencing the sequencing hikes so the driving objective is optimized.