OAR Lib: An Open Source Arc Routing Library By Oliver Lum Advised By Professor Bruce Golden 1.

Slides:



Advertisements
Similar presentations
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Advertisements

Introduction to Graphs
Great Theoretical Ideas in Computer Science for Some.
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
Approximating Graphic TSP with Matchings
Graph theory at work.  Examine the procedure utilized by snow plows in Iowa City  Systemize and minimize routes  Review mathematical concepts involved.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Graphs Intro G.Kamberova, Algorithms Graphs Introduction Gerda Kamberova Department of Computer Science Hofstra University.
MIT and James Orlin © Introduction to Networks Eulerian Tours Hamiltonian Tours The Shortest Path Problem Dijkstra’s Algorithm for Solving the Shortest.
An Euler Circuit is a cycle of an undirected graph, that traverses every edge of the graph exactly once, and ends at the same node from which it began.
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
Circuits CSE 373 Data Structures Lecture 22. 3/12/03Circuits - Lecture 222 Readings Reading ›Sections and 9.7.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
OAR Lib: An Open Source Arc Routing Library
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
GRAPH Learning Outcomes Students should be able to:
Management Science 461 Lecture 9 – Arc Routing November 18, 2008.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
V. V. Vazirani. Approximation Algorithms Chapters 3 & 22
Algorithms for Network Optimization Problems This handout: Minimum Spanning Tree Problem Approximation Algorithms Traveling Salesman Problem.
The Traveling Salesperson Problem Algorithms and Networks.
EECS 203: It’s the end of the class and I feel fine. Graphs.
The Traveling Salesman Problem Approximation
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
1 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Compact Routes for the Min-Max K Windy Rural Postman Problem by Oliver Lum 1, Carmine Cerrone 2, Bruce Golden 3, Edward Wasil 4 1. Department of Applied.
COSC 2007 Data Structures II Chapter 14 Graphs III.
May 1, 2002Applied Discrete Mathematics Week 13: Graphs and Trees 1News CSEMS Scholarships for CS and Math students (US citizens only) $3,125 per year.
Representing and Using Graphs
A Two-Stage Partitioning Approach for the Min-Max K Windy Rural Postman Problem Oliver Lum Carmine Cerrone Bruce Golden Edward Wasil 1.
© B.Raghavachari & J.Veerasamy, UTD 1 Euler tours, postman tours and mixed graphs Jeyakesavan Veerasamy* * Joint work with Balaji Raghavachari Samsung.
© B.Raghavachari & J.Veerasamy, UTD 1 Approximation Algorithms for Postman Problems Jeyakesavan Veerasamy* * Joint work withBalaji Raghavachari Samsung.
There is a Postman who delivers mail to a certain neighborhood of streets. The postman is unwilling to walk far so he wants to find the shortest route.
Graph Algorithms Mathematical Structures for Computer Science Chapter 6 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesGraph Algorithms.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
1 Steiner Tree Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
The Colorful Traveling Salesman Problem Yupei Xiong, Goldman, Sachs & Co. Bruce Golden, University of Maryland Edward Wasil, American University Presented.
Data Structures & Algorithms Graphs
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
Topics Paths and Circuits (11.2) A B C D E F G.
Data Structures and Algorithms in Parallel Computing Lecture 2.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Eulerian Paths and Cycles. What is a Eulerian Path Given an graph. Find a path which uses every edge exactly once. This path is called an Eulerian Path.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
M Clements Formal Network Theory. Introduction Practical problem – The Seven Bridges of Königsberg Network graphs Nodes & edges Degrees Rules/ axioms.
NPC.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Routing Through Networks - 1
School of Computing Clemson University Fall, 2012
Maximum Flow - Best algorithms
1.3 Modeling with exponentially many constr.
Graph Algorithm.
ICS 353: Design and Analysis of Algorithms
Objective of This Course
Graph.
Graphs Chapter 13.
Finding Subgraphs with Maximum Total Density and Limited Overlap
1.3 Modeling with exponentially many constr.
Presentation transcript:

OAR Lib: An Open Source Arc Routing Library By Oliver Lum Advised By Professor Bruce Golden 1

What is Arc Routing?  Visit edges, minimize cost  Ubiquitous:  Package Delivery  Snow Plowing  Military Patrols  Various interesting wrinkles:  Time-Windows  Turn Penalties  Asymmetric Costs IntroductionApproachValidationScheduleConclusion 2

Motivation  Provide research community with standard, efficient implementation for ease of comparison.  Reduce start-up overhead for budding operations researchers.  Begin personal research.  Provide a set of Java based tools that can lay the groundwork for easy extensibility. IntroductionApproachValidationScheduleConclusion 3

Definitions  Graphs  Undirected: (V,E)  Directed: (V,A)  Mixed: (V,E,A)  Windy: (V,E)  Vertex  Edge: (i, j)  Degree  Euler Tour  Strongly Connected IntroductionApproachValidationScheduleConclusion 4

Objective  P vs. NP:  The major dividing line in computational tractability.  Asymptotic complexity makes solving all interesting arc routing problems to optimality impossible, (working assumption that P ~= NP).  Heuristics attempt to get close, in polynomial time. IntroductionApproachValidationScheduleConclusion 5

Problems / Algorithms ProblemClassicalModern Undirected Chinese Postman Problem EdmondsN/A Directed Chinese Postman ProblemThimblebyN/A Mixed Chinese Postman Problem FredericksonYaoyuenyeung Windy Chinese Postman ProblemWinBenavent Directed Rural Postman ProblemChristofidesBenavent IntroductionApproachValidationScheduleConclusion 6

The Undirected Chinese Postman  Requirement: Visit every edge in the graph, and return to the starting node (closed).  Graph: (Connected) Only Edges IntroductionApproachValidationScheduleConclusion 7

The Undirected Chinese Postman: Algorithms  Euler Tour Theorem: A connected, undirected graph has a tour visiting each edge exactly once iff every node has even degree.  Idea  Step I: Identify nodes with odd-degree.  Step II: Optimally connect them so that they now have even degree, yielding an augmented graph.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 8

The Undirected Chinese Postman IntroductionApproachValidationScheduleConclusion 9

The Undirected Chinese Postman: Algorithms  Euler Tour Theorem: A connected, undirected graph has a tour visiting each edge exactly once iff every node has even degree.  Idea  Step I: Identify nodes with odd-degree.  Step II: Optimally connect them so that they now have even degree, yielding an augmented graph.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 10

The Undirected Chinese Postman: Algorithms  Euler Tour Theorem: A connected, undirected graph has a tour visiting each edge exactly once iff every node has even degree.  Idea  Step I: Identify nodes with odd-degree.  Step II: Optimally connect them so that they now have even degree, yielding an augmented graph.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 11

The Undirected Chinese Postman: Algorithms  Euler Tour Theorem: A connected, undirected graph has a tour visiting each edge exactly once iff every node has even degree.  Idea  Step I: Identify nodes with odd-degree.  Step II: Optimally connect them so that they now have even degree, yielding an augmented graph.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 12

The Undirected Chinese Postman: Algorithms  Step II:  In order to connect the odd nodes in a least-cost way, we may use any matching algorithm.  Step III:  Once we have an Eulerian graph, we may construct an Euler tour by using Fleury’s algorithm. IntroductionApproachValidationScheduleConclusion 13

The Directed Chinese Postman  Requirement: Visit every edge in the graph, returning to the starting node (closed).  Graph: (Strongly Connected) Only Arcs IntroductionApproachValidationScheduleConclusion 14

The Directed Chinese Postman: Algorithms  Euler Tour Theorem: A strongly connected, directed graph has a tour visiting each edge exactly once iff every node has in-degree = out- degree.  Idea  Step I: Identify nodes with a degree imbalance.  Step II: Optimally add paths between them until they’re all balanced.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 15

The Directed Chinese Postman IntroductionApproachValidationScheduleConclusion 16

The Directed Chinese Postman: Algorithms  Euler Tour Theorem: A strongly connected, directed graph has a tour visiting each edge exactly once iff every node has in-degree = out- degree.  Idea  Step I: Identify nodes with a degree imbalance.  Step II: Optimally add paths between them until they’re all balanced.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 17

The Directed Chinese Postman: Algorithms  Euler Tour Theorem: A strongly connected, directed graph has a tour visiting each edge exactly once iff every node has in-degree = out- degree.  Idea  Step I: Identify nodes with a degree imbalance.  Step II: Optimally add paths between them until they’re all balanced.  Step III: Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 18

The Directed Chinese Postman: Algorithms  Euler Tour Theorem: A strongly connected, directed graph has a tour visiting each edge exactly once iff every node has in-degree = out- degree.  Idea  Step I: Identify nodes with a degree imbalance.  Step II: Optimally add paths between them until they’re all balanced.  Step III : Construct the Euler tour on this augmented graph. IntroductionApproachValidationScheduleConclusion 19

The Mixed Chinese Postman  Requirement: Visit every edge in the graph, and return to the starting node.  Graph: Mix of Edges and Arcs IntroductionApproachValidationScheduleConclusion 20

The Mixed Chinese Postman: Algorithms  Euler Tour Theorem: A strongly connected, mixed graph has a tour visiting each edge exactly once if every node has in-degree = out- degree, and is of even degree.  Phase I: Even Degree  Phase II: In-Out-Degree  Phase III: Even Parity IntroductionApproachValidationScheduleConclusion 21

The Mixed Chinese Postman IntroductionApproachValidationScheduleConclusion 22

The Mixed Chinese Postman: Algorithms  Phase I: Even Degree  Solve the UCPP on the mixed graph, ignoring arc direction. Then, add arcs and edges corresponding to the paths from the matching.  Phase II: In-Out-Degree  Phase III: Even Parity IntroductionApproachValidationScheduleConclusion 23

The Mixed Chinese Postman: Algorithms  Phase I: Even Degree  Phase II: In-Out-Degree  Solve the DCPP on the graph, where each edge is replaced by two arcs (one per direction), keeping track of the flow solution to determine which direction the (original) edges get oriented, and if any other augmentations are needed.  Phase III: Even Parity IntroductionApproachValidationScheduleConclusion 24

The Mixed Chinese Postman: Algorithms  Phase I: Even Degree  Phase II: In-Out-Degree  Phase III: Even Parity  We search for cycles that consist of alternating paths between odd-nodes. Alternating here means switching between paths that are composed of edges left undirected after Phase II, and paths that are composed of added arcs, (irrespective of direction). IntroductionApproachValidationScheduleConclusion 25

The Mixed Chinese Postman: Algorithms  Phase I: Even Degree  Phase II: In-Out-Degree  Phase III: Even Parity  Do the reverse procedure, (symmetry first, then evenness), and pick the better answer. IntroductionApproachValidationScheduleConclusion 26

The Mixed Chinese Postman: Algorithms II  Use Results from Frederickson, along with two observations:  We should replace added arcs or directed edges with shortest paths if they’re less costly.  If we have an edge connecting nodes i and j, and we can construct two paths from i to j that incur savings, then we can simply reverse the orientation of this edge and add the paths. IntroductionApproachValidationScheduleConclusion 27

The Mixed Chinese Postman: Algorithms II  Use Results from Frederickson, along with two observations:  We should replace added arcs or directed edges with shortest paths if they’re less costly.  If we have an edge connecting nodes i and j, and we can construct two paths from i to j that incur savings, then we can simply reverse the orientation of this edge and add the paths. IntroductionApproachValidationScheduleConclusion 28

The Mixed Chinese Postman: Algorithms II  Use Results from Frederickson, along with two observations:  We should replace added arcs or directed edges with shortest paths if they’re less costly.  If we have an edge connecting nodes i and j, and we can construct two paths from i to j that incur savings, then we can simply reverse the orientation of this edge and add the paths. IntroductionApproachValidationScheduleConclusion 29

The Windy Chinese Postman  Requirement: Visit every edge in the graph, and return to the starting node.  Graph: (Connected), Edges only, but can possibly have asymmetric costs (and therefore simulate arcs). IntroductionApproachValidationScheduleConclusion 30

The Windy Chinese Postman: Algorithms  Idea: if G is Eulerian, then there is a polynomial algorithm to determine a min-cost windy tour, so, let’s make it Eulerian! Introduction ApproachValidationScheduleConclusion 31

The Windy Chinese Postman: Algorithms  Idea: if G is Eulerian, then there is a polynomial algorithm to determine a min-cost windy tour, so, let’s make it Eulerian!  Solve the UCPP using average edge costs. Introduction ApproachValidationScheduleConclusion 32

The Windy Chinese Postman IntroductionApproachValidationScheduleConclusion 33

The Windy Chinese Postman: Algorithms  Idea: if G is Eulerian, then there is a polynomial algorithm to determine a min-cost windy tour, so, let’s make it Eulerian!  Solve the UCPP using average edge costs.  Construct the optimal tour over the resulting graph (involves solving a min-cost flow over a digraph where each there is are three arcs per edge, one of them being of average cost). Introduction ApproachValidationScheduleConclusion 34

The Windy Chinese Postman: Algorithms II  Average costs aren’t everything, let’s try giving precedence to edges where the cost asymmetry is highest, (more than 20% of the total average cost).  Direct edges like this in the direction of lowest cost.  Solve a min-cost flow problem where demands are determined only by these high stakes edges.  Edges in the solution are given zero cost when solving the UCPP.  Use some of the local improvement procedures we’ve already seen:  Replace non-required paths with shortest paths.  Get rid of redundant cycles. Introduction ApproachValidationScheduleConclusion 35

The Directed Rural Postman  Requirement: Visit a subset of edges in the graph that are labeled as “required.”  Graph: Only Arcs IntroductionApproachValidationScheduleConclusion 36

The Directed Rural Postman: Algorithms  Idea: Connect the components of the graph induced by the required arcs, and then solve a min-cost flow problem.  Step I: Simplify the graph.  Step II: Find an MST on the collapsed graph.  Step III: Solve a min-cost flow problem on the resulting graph. IntroductionApproachValidationScheduleConclusion 37

The Directed Rural Postman IntroductionApproachValidationScheduleConclusion 38

The Directed Rural Postman: Algorithms  Idea: Connect the components of the graph induced by the required arcs, and then solve a min-cost flow problem.  Step I: Simplify the graph.  Step II: Find an MST on the collapsed graph.  Step III: Solve a min-cost flow problem on the resulting graph. IntroductionApproachValidationScheduleConclusion 39

The Directed Rural Postman: Algorithms  Idea: Connect the components of the graph induced by the required arcs, and then solve a min-cost flow problem.  Step I: Simplify the graph.  Step II: Find an MST on the collapsed graph.  Step III: Solve a min-cost flow problem on the resulting graph. IntroductionApproachValidationScheduleConclusion 40

The Directed Rural Postman: Algorithms  Idea: Connect the components of the graph induced by the required arcs, and then solve a min-cost flow problem.  Step I: Simplify the graph.  Step II: Find an MST on the collapsed graph.  Step III: Solve a min-cost flow problem on the resulting graph.  Repeat Steps II and III, rooting the MST at each of the components, and picking the best solution. IntroductionApproachValidationScheduleConclusion 41

The Directed Rural Postman: Algorithms II  Here, we model the problem as an WRPP, and apply the heuristic of Benavent, except that we first compute an MST over the connected components of the original graph, and add the corresponding edges to the required graph. IntroductionApproachValidationScheduleConclusion 42

Validation / Verification IntroductionApproachValidationScheduleConclusion  For UCPP, DCPP, and DRPP we’ll generate our own test instances for which the optimal solution will be known, or solved for using and IP formulation and an industrial grade solver.  For MCPP, and WPP, test on benchmark instances made public at stancias.htm for which the optimal solution is known. stancias.htm  We shall use Wilcoxon’s Rank Sum test in order to validate the fact that our code is actually implementing the desired heuristic, taking results from the papers in which these are presented, and testing them against our solutions. 43

Databases  For some problems, we shall use instances made public by Angel Corberan:  Instances satisfy the connectivity assumptions of the problem.  Instances have integer costs along the edges.  Instances have no negative cost cycles.  We shall, in general check for these in the code so that our library exhibits predictable failure states.  For the rest of the problems, we shall randomly generate test instances which will also be posted with the other instances, and with the code.  These will be solved to optimality using the IP formulations presented here, and an industrial grade solver like CPLEX or Gurobi.  These will meet the same set of assumptions as Corberan’s instances. IntroductionApproachValidationScheduleConclusion 44

Schedule DCPP / UCPP Exact Solvers September / October MCPP Heuristics November WPP Heuristics December DRPP January Performance Optimization / Tuning February Extensibility (CPLEX / Gurobi, Gephi / Graphviz) March – April Investigate Plowing with Precedence May IntroductionApproachValidationScheduleConclusion 45

Implementation IntroductionApproachValidationScheduleConclusion  The implementation language will be primarily in Java, with the option to write certain pieces in C++ if necessary, (using JNI).  The code will be tested on two different setups, on all major operating systems (Windows, OSX, Linux).  (Desktop) Intel i7 920 Processor, 2.67 GHz, 8GB RAM.  (Laptop) Macbook Air (2012).  Version control using Git. 46

Deliverables  To be hosted at my personal github at  Test instances  All code  Solvers  Graph architecture  Extensible interfaces and abstract classes  integrated utilities.  Documentation (including tutorials and a readme)  Mid-year and Final Report IntroductionApproachValidationScheduleConclusion 47

References 1.Thimbleby, Harold. "The directed chinese postman problem." Software: Practice and Experience (2003): Eiselt, Horst A., Michel Gendreau, and Gilbert Laporte. "Arc routing problems, part I: The Chinese postman problem." Operations Research 43.2 (1995): Yaoyuenyong, Kriangchai, Peerayuth Charnsethikul, and Vira Chankong. "A heuristic algorithm for the mixed Chinese postman problem." Optimization and Engineering 3.2 (2002): Benavent, Enrique, et al. "New heuristic algorithms for the windy rural postman problem." Computers & operations research (2005): Eiselt, Horst A., Michel Gendreau, and Gilbert Laporte. "Arc routing problems, part II: The rural postman problem." Operations Research 43.3 (1995): Campos, V., and J. V. Savall. "A computational study of several heuristics for the DRPP." Computational Optimization and Applications 4.1 (1995): (Replace this with Carmine’s paper when I get it). 8.Dussault, Benjamin, et al. "Plowing with precedence: A variant of the windy postman problem." Computers & Operations Research (2012). 9.Win, Zaw. "On the windy postman problem on Eulerian graphs." Mathematical Programming (1989): Christofides, Nicos, et al. "An algorithm for the rural postman problem on a directed graph." Netflow at Pisa. Springer Berlin Heidelberg, IntroductionApproachValidationScheduleConclusion 48