The Vehicle Routing Problem Using CP in the real world.

Slides:



Advertisements
Similar presentations
Leena Suhl University of Paderborn, Germany
Advertisements

Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Chapter 1 Strategic Problems: Location. QEM - Chapter 1 Location problems Full truck loadtransportation … CW 1 CW 2 Central warehouse FTL or tourstransportation.
Chapter 7: Transportation Models Skip Ship Routing & Scheduling (pp ) Service Selection Shortest Path Transportation Problem Vehicle Routing &
VEHICLE ROUTING PROBLEM
RESEARCH SEMINAR, MOLDE, JUNE 6th ARILD HOFF MOLDE UNIVERSITY COLLEGE ARNE LØKKETANGEN UROOJ PASHA MILK COLLECTION IN WESTERN NORWAY USING TRUCKS AND TRAILERS.
The Vehicle Routing Problem
An Exact Algorithm for the Vehicle Routing Problem with Backhauls
DOMinant workshop, Molde, September 20-22, 2009
Modeling Rich Vehicle Routing Problems TIEJ601 Postgraduate Seminar Tuukka Puranen October 19 th 2009.
Search by partial solutions. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Random restart General.
Vehicle Routing & Scheduling: Part 1
Vehicle Routing & Scheduling Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.
1.224J Recitation #4 Freight transportation. Topics Homework questions Home Depot MVRP: Multi vehicle routing problem – Applications – Formulation – Heuristics.
Math443/543 Mathematical Modeling and Optimization
CAPS RoutePro Routing Environment. Solution Methods. Backhauls. Dispatcher Interface. Demonstration.
Nature’s Algorithms David C. Uhrig Tiffany Sharrard CS 477R – Fall 2007 Dr. George Bebis.
Vehicle Routing & Scheduling
This material in not in your text (except as exercises) Sequence Comparisons –Problems in molecular biology involve finding the minimum number of edit.
Imagine that I am in a good mood Imagine that I am going to give you some money ! In particular I am going to give you z dollars, after you tell me the.
Linear Programming Applications
Carl Bro a|s - Route 2000 Solving real life vehicle routing problems Carl Bro a|s International consulting engineering company 2100 employees worldwide.
Vehicle Routing & Scheduling: Part 2 Multiple Routes Construction Heuristics –Sweep –Nearest Neighbor, Nearest Insertion, Savings –Cluster Methods Improvement.
CAPS RoutePro CAPS Logistics Overview RoutePro Dispatcher Features.
Programming for Geographical Information Analysis: Advanced Skills Online mini-lecture: Introduction to Networks Dr Andy Evans.
The Traveling Salesperson Problem Algorithms and Networks.
Routing and Scheduling in Transportation. Vehicle Routing Problem Determining the best routes or schedules for pickup/delivery of passengers or goods.
1 1 1-to-Many Distribution Vehicle Routing John H. Vande Vate Spring, 2005.
Vehicle Routing & Scheduling: Developments & Applications in Urban Distribution Assoc. Prof. Russell G. Thompson Department of Infrastructure Engineering.
Search Methods An Annotated Overview Edward Tsang.
MODELING AND ANALYSIS OF MANUFACTURING SYSTEMS Session 12 MACHINE SETUP AND OPERATION SEQUENCING E. Gutierrez-Miravete Spring 2001.
Optimization Problems - Optimization: In the real world, there are many problems (e.g. Traveling Salesman Problem, Playing Chess ) that have numerous possible.
Notes 5IE 3121 Knapsack Model Intuitive idea: what is the most valuable collection of items that can be fit into a backpack?
CSC401: Analysis of Algorithms CSC401 – Analysis of Algorithms Chapter Dynamic Programming Objectives: Present the Dynamic Programming paradigm.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
The Application of The Improved Hybrid Ant Colony Algorithm in Vehicle Routing Optimization Problem International Conference on Future Computer and Communication,
A Hybrid Genetic Algorithm for the Periodic Vehicle Routing Problem with Time Windows Michel Toulouse 1,2 Teodor Gabriel Crainic 2 Phuong Nguyen 2 1 Oklahoma.
Using traveling salesman problem algorithms for evolutionary tree construction Chantal Korostensky and Gaston H. Gonnet Presentation by: Ben Snider.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Bekkjarvik, A Heuristic Solution Method for a Stochastic Vehicle Routing Problem Lars Magnus Hvattum.
Exact and heuristics algorithms
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
© J. Christopher Beck Lecture 25: Workforce Scheduling 3.
Vehicle Routing & Scheduling
Traveling Salesman Problem (TSP)
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Transportation Logistics CEE 498B/599I Professor Goodchild 4/18/07.
1 Inventory Control with Time-Varying Demand. 2  Week 1Introduction to Production Planning and Inventory Control  Week 2Inventory Control – Deterministic.
Optimization Problems
Log Truck Scheduling Problem
Dynamic Programming.  Decomposes a problem into a series of sub- problems  Builds up correct solutions to larger and larger sub- problems  Examples.
Vehicle Routing Problems
Vehicle Routing & Scheduling Cluster Algorithms Improvement Heuristics Time Windows.
Chapter 5. Advanced Search Fall 2011 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Balanced Billing Cycles and Vehicle Routing of Meter Readers by Chris Groër, Bruce Golden, Edward Wasil University of Maryland, College Park American University,
Discrete Optimization MA2827 Fondements de l’optimisation discrète Material from P. Van Hentenryck’s course.
A MapReduced Based Hybrid Genetic Algorithm Using Island Approach for Solving Large Scale Time Dependent Vehicle Routing Problem Rohit Kondekar BT08CSE053.
Online Routing Optimization at a Very Large Scale
T-Share: A Large-Scale Dynamic Taxi Ridesharing Service
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
1.3 Modeling with exponentially many constr.
GEOP 4355 Transportation Routing Models
TransCAD Vehicle Routing 2018/11/29.
Strategic Problems: Location
1.3 Modeling with exponentially many constr.
Planning the transportation of elderly to a daycare center
Efficiently Estimating Travel Time
Chapter 1. Formulations.
Vehicle Routing John H. Vande Vate Fall,
Presentation transcript:

The Vehicle Routing Problem Using CP in the real world

NICTA Copyright 2011From imagination to impact 2/58 Outline Session 1 What is the vehicle routing problem (VRP)? ‘Traditional’ (Non-CP) solution methods A simple CP model Playtime Session 2 A CP model for the VRP Large Neighbourhood Search revisited Propagation More Playtime

NICTA Copyright 2011From imagination to impact 3/58 What is the Vehicle Routing Problem Given a set of customers, and a fleet of vehicles to make deliveries, find a set of routes that services all customers at minimum cost

NICTA Copyright 2011From imagination to impact 4/58 Vehicle Routing Problem

NICTA Copyright 2011From imagination to impact 5/58 Vehicle Routing Problem

NICTA Copyright 2011From imagination to impact 6/58 Why study the VRP? The logistics task is 9% of economic activity in Australia Logistics accounts for 10% of the selling price of goods

NICTA Copyright 2011From imagination to impact 7/58 Vehicle Routing Problem For each customer, we know Quantity required The cost to travel to every other customer For the vehicle fleet, we know The number of vehicles The capacity We must determine which customers each vehicle serves, and in what order, to minimise cost

NICTA Copyright 2011From imagination to impact 8/58 Vehicle Routing Problem Objective function In academic studies, usually a combination: First, minimise number of routes Then minimise total distance or total time In real world A combination of time and distance Must include vehicle- and staff-dependent costs Usually vehicle numbers are fixed

NICTA Copyright 2011From imagination to impact 9/58 Vehicle Routing Problem Might be more than one ‘capacity’ – e.g. limited weight and volume Might be more than one type of vehicle – Different capacities and costs – ‘Heterogeneous Vehicles’

NICTA Copyright 2011From imagination to impact 10/58 MIP formulation Data c ij : Cost of travel from i to j q i : Demand at i Decision var: x ijk : Travel direct from i to j on vehicle k Depot

NICTA Copyright 2011From imagination to impact 11/58 Vehicle Routing Problem In a classic 2-echelon routing problem: Stage 1: Production/warehouse to distribution depots Stage 2: Distribution depots to end customer VRP is primarily concerned with Stage 2 Strategic decision Also study dynamic version

NICTA Copyright 2011From imagination to impact 12/58 History: Travelling Salesman Problem A travelling salesman has to visit a number of cities. He knows the cost of travel between each pair. What order does he visit the cities to minimise cost? Long and well-studied problem (since the 60’s) A sub-problem in many others Used in chip fabrication and many other real-world problems TSP = VRP with 1 vehicle of infinite capacity In vehicle routing - having decided which vehicle will visit which customers, each vehicle route is a travelling salesman problem

NICTA Copyright 2011From imagination to impact 13/58 Travelling Salesman Problem Exact solution are found regularly for problems with cities, and occasionally for problems with 1000 nodes. Some larger problems solved (24,798 cities, towns and villages in Sweden) But – no constraints on the solution Even one constraint, and the whole method is unusable

NICTA Copyright 2011From imagination to impact 14/58 Routing with constraints Each new twist (business rule, practice, limitation) changes which solutions are good, and which are even acceptable The types of constraints that must be observed may impact on the way the problem is solved Many types of constraint studied – but usually in isolation We will look at a few that have been studied in the literature

NICTA Copyright 2011From imagination to impact 15/58 Time window constraints Vehicle routing with Constraints Time Window constraints – A window during which service can start – E.g. only accept delivery 7:30am to 11:00am – Additional input data required Duration of each customer visit Time between each pair of customers (Travel time can be vehicle-dependent or time- dependent) – Makes the route harder to visualise

NICTA Copyright 2011From imagination to impact 16/58 Time Window constraints

NICTA Copyright 2011From imagination to impact 17/58 Pickup and Delivery problems Most routing considers delivery to/from a depot (depots) Pickup and Delivery problems consider FedEx style problem: pickup at location A, deliver to location B Load profile:

NICTA Copyright 2011From imagination to impact 18/58 Pickup and Delivery problems PDPs have two implied constraints: – pickup is before delivery – pickup and delivery are on the same vehicle Usually, completely different methods used to solve this sort of problem Can be quite difficult Standard VRP is in effect a PDP with all stuff picked up at (delivered to) a depot. Not usually solved that way

NICTA Copyright 2011From imagination to impact 19/58 Pickup and Delivery problem Interesting variants Dial-a-ride problem: – Passenger transport – Like a multi-hire taxi – Pickup passenger A, pickup passenger B, drop off B, pickup up C, drop off A, …. – Ride-time constraints ( e.g. max 1.4 x direct travel time ) PDP can be used to model cross-docking – Pick up at Factory, Deliver to DC; Pickup at DC, Deliver to customer – Constraint: “Deliver to DC” before “Pickup at DC”

NICTA Copyright 2011From imagination to impact 20/58 Fleet size and mix Heterogonous vehicles – Vehicles of different capacities, costs, speeds etc Fleet size and mix problem – Decide the correct number of each type of vehicle – Strategic decision Can be the most important part of optimization

NICTA Copyright 2011From imagination to impact 21/58 Other variants Orienteering problem Not all visits need to be completed Each visit has a reward Given a time limit, how many visits can I cover to maximize my reward?

NICTA Copyright 2011From imagination to impact 22/58 Other variants Profitable tour problem Not all visits need to be completed Known profit for each visit Choose a subset that gives maximum return (profit from visits – routing cost)

NICTA Copyright 2011From imagination to impact 23/58 Other variants Inventory Routing “Vendor managed inventories” Supplier determines when visit occurs More visits  higher transportation costs Fewer visits  higher stockout and holding costs Balance transportation cost against holding/stockout cost Delivery Freq

NICTA Copyright 2011From imagination to impact 24/58 Other variants Period Routing Routing with periodical deliveries Same routes every week / fortnight Deliver to different customers with different frequencies: patterns 3-part problem – Choose pattern for each cust – Choose qty for each delivery – Design route for each day MTWTF ?? ?? ??? ?????

NICTA Copyright 2011From imagination to impact 25/58 VRP meets the real world Many groups now looking at real-world constraints Rich Vehicle Routing Problem Attempt to model constraints common to many real-life enterprises – Multiple Time windows – Multiple Commodities – Heterogeneous vehicles – Compatibility constraints Goods for customer A can’t travel with goods from customer B Goods for customer A can’t travel on vehicle C

NICTA Copyright 2011From imagination to impact 26/58 VRP meets the real world Other real-world considerations Fatigue rules and driver breaks Vehicle re-use Ability to change vehicle characteristics (composition) – Add trailer, or move compartment divider Use of limited resources – e.g limited docks for loading, hence need to stagger dispatch times Variable loading / unloading times

NICTA Copyright 2011From imagination to impact 27/58 VRP meets the real world Yet more constraints Only two types of product on each vehicle ‘Grand tour’ constraint – Customers visited in ‘patterns’ (Period Routing) – Grand tour includes all visits – Skip visit if not required that day – Each day must be feasible (incl. time windows) Meet ferry Blood transport (dynamic time window) Promiscuous driver constraint

NICTA Copyright 2011From imagination to impact 28/58 VRP meets the real world New data sources Routing with time-of-day dependent travel times – Uses historical data to forecast travel time at different times of day Routing with dynamic travel times – Uses live traffic information feed to update expected travel time dynamically

NICTA Copyright 2011From imagination to impact 29/58 VRP meets the real world Stochastic Routing What if things don’t go according to plan? Sources of uncertainty – Uncertainty in existence (do I even need to visit) – Uncertainty in quantity (how much is actually required) – Uncertainty in travel times (traffic) – Uncertainty in duration (maintenance engineer) Optimal solution can be brittle – If something is not quite right, whole solution falls apart

NICTA Copyright 2011From imagination to impact 30/58 VRP meets the real world E.g. garbage collection Wet rubbish is heavy On rainy days, trucks may have more load than usual (uncertainty in quantity) Need stops near dump in case they have to double back = Recourse.

NICTA Copyright 2011From imagination to impact 31/58 Solution Methods

NICTA Copyright 2011From imagination to impact 32/58 Solving VRPs VRP is hard NP Hard in the strong sense Exact solutions only for small problems (20-50 customers) Most solution methods are heuristic Most operate as – Construct – Improve

NICTA Copyright 2011From imagination to impact 33/58 ILP Advantages Can find optimal solution Disadvantages Only works for small problems One extra constraint  back to the drawing board

NICTA Copyright 2011From imagination to impact 34/58 ILP – Column Generation … … … … … Columns represent routes Rows represent customers Column/route cost c k Array entry a ik = 1 iff customer i is covered by route k

NICTA Copyright 2011From imagination to impact 35/58 Column Generation Decision var x k : Use column k? Column only appears if feasible ordering is possible Cost of best ordering is c k Best order stored separately Master problem at right

NICTA Copyright 2011From imagination to impact 36/58 Column Generation Subproblem i.e. shortest path with side constraints If min is –ve add to master problem CP!

NICTA Copyright 2011From imagination to impact 37/58 Heuristic methods - Construction Insert methods Order is important:

NICTA Copyright 2011From imagination to impact 38/58 Heuristic methods - Construction Savings method (Clarke & Wright 1964) Calculate S ij for all i, j Consider cheapest S ij If j can be appended to i – merge them to new i – update all S ij else – delete S ij Repeat i j

NICTA Copyright 2011From imagination to impact 39/58 Improvement Methods 2-opt (3-opt, 4-opt…) Remove 2 arcs Replace with 2 others

NICTA Copyright 2011From imagination to impact 40/58 Improvement methods Large Neighbourhood Search = Destroy & Re-create Destroy part of the solution – Remove visits from the solution Re-create solution – Use insert method to re-insert customers – Different insert methods lead to new (better?) solutions If the solution is better, keep it Repeat

NICTA Copyright 2011From imagination to impact 41/58 Improvement methods Variable Neighbourhood Search Consider multiple neighbourhoods – 1-move (move 1 visit to another position) – 1-1 swap (swap visits in 2 routes) – 2-2 swap (swap 2 visits between 2 routes) – 2-opt – 3-opt – Or-opt size 2 (move chain of length 2 anywhere) – Or-opt size 3 (chain length 3) – Tail exchange (swap final portion of routes

NICTA Copyright 2011From imagination to impact 42/58 Improvement methods Variable Neighbourhood Search Consider multiple neighbourhoods Find local minimum in smallest neighbourhood Advance to next-largest neighbourhood Search current neighbourhood – If a change is found, return to smallest neighbourhood – Otherwise, advance to next-largest

NICTA Copyright 2011From imagination to impact 43/58 Improvement methods Path Relinking Applies where-ever a population of solutions is available Take one (good) solution A Take another (good) reference solution B Gradually transform solution A into solution B – pass through new solutions “between” A and B – new solutions contain traits of both A and B – should be good!

NICTA Copyright 2011From imagination to impact 44/58 Improvement methods Genetic Programming Simulated Natural Selection

NICTA Copyright 2011From imagination to impact 45/58 Genetic Programming Generate a population of solutions (construct methods) Evaluate fitness (objective) Create next generation: – Choose two solutions from population – Combine the two (two ways) – (Mutate) – Produce offspring (calculate fitness) – (Improve) – Repeat until population doubles Apply selection: – Bottom half “dies” Repeat

NICTA Copyright 2011From imagination to impact 46/58 Genetic Programming

NICTA Copyright 2011From imagination to impact 47/58 Genetic Programming

NICTA Copyright 2011From imagination to impact 48/58 Genetic Programming

NICTA Copyright 2011From imagination to impact 49/58 Genetic Programming

NICTA Copyright 2011From imagination to impact 50/58 Genetic Programming Split Solution representation does not include route delimiters Routes are determined using “Split” routine – Solves shortest path problem on an auxiliary graph – O(mn 2 ) Allows freer movement in solution space

NICTA Copyright 2011From imagination to impact 51/58 Scaling Solving problems with tens of thousands of nodes Decompose problem – Split into smaller problems Limit search – Only consider inserting next to nearby nodes – Only consdier inserting into nearby routes

NICTA Copyright 2011From imagination to impact 52/58 Solution Methods.. and the whole bag of tricks Tabu Search Simulated Annealing Ants Bees ….

NICTA Copyright 2011From imagination to impact 53/58 A CP Model for the TSP

NICTA Copyright 2011From imagination to impact 54/58 Model Classic TSP n customers (fixed in this model) fixed locations – where things happen – one for each customer + one for the depot Know distance/cost C(i,j) between each location pair – Obeys triangle inequality Each customer has an index in N = {1..n} Customers are ‘named’ in CP by their index

NICTA Copyright 2011From imagination to impact 55/58 Variables Successor variables: s i s i gives direct successor of i, i.e. the index of the next visit on the route that visits i s i  N

NICTA Copyright 2011From imagination to impact 56/58 Constraints AllDifferent ( s ) isisi

NICTA Copyright 2011From imagination to impact 57/58 1 Constraints AllDifferent ( s ) Circuit ( s ) isisi

NICTA Copyright 2011From imagination to impact 58/58 Objective Objective is minimise( sum i in N ( C( i, s i ) ) )

NICTA Copyright 2011From imagination to impact 59/58 Playtime Now you have a try…

NICTA Copyright 2011From imagination to impact 60/58