• No results found

How to tackle a complex Vehicle Routing Problem. [September 2020]

N/A
N/A
Protected

Academic year: 2021

Share "How to tackle a complex Vehicle Routing Problem. [September 2020]"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

How to tackle a

complex Vehicle

Routing Problem

(2)

Hugo Larzábal

(3)

-Contents

Introduction

The problem

Solving approaches

Vehicle routing problems

(4)

About

baobab soluciones

. Not your usual consultants.

Founded in June 2011

A spin-off from the Universidad

Politécnica de Madrid (UPM)

Tailored Advanced Analytics

solutions

for Forbes Fortune 500

organizations from all industries.

(5)

Contents

Introduction

Vehicle routing problems

▪ Concept

(6)

Concept

Given a set of customers, which is

the optimal set of routes

for a fleet of

vehicles that ensures that all customers are visited?

Elements

Depot

Set of customers

Fleet of vehicles

Objectives

Minimize number of

routes

Minimize distance

covered

Minimize penalty for

poor quality routes

(7)

VRP variants

Homogenous/heterogeneous fleet

Capacitated

Time windows Pick up and delivery

LIFO pick up and delivery

Symmetrical/Asymmetrical distances Single/multiple depots

Limited carrying capacity for vehicles All the vehicles are similar/different

The products need to be picked up in one place and delivered in another The last product picked up need to be

delivered first

Sites must be visited within a time window

Distances from A to B and from B to A are similar/different

All the vehicles are starting at the same point/different point

(8)

Variants

Capacitated VRP

Limited carrying capacity for vehicles

Time windows within which deliveries must be

made

Goods need to be moved from pickup locations to

delivery locations

VRP with Time Windows

VRP with Pickup and Delivery

VRP

VRPTW

CVRP

VRPPD

CVRPPD

CVRPTW

(9)

Our problem

Two

synched

VRP problems

Actual trucks

Operator teams

Capacitated vehicles

Homogenous fleet

Mono depot

Bi-objective

Cost

(10)

Contents

Introduction

The problem

Vehicle routing problems

▪ Context: a 2-CVRPTW ▪ Inputs and outputs

(11)

Context

Several sites to be visited by a fleet of vehicles and

several teams.

At each site:

• A vehicle and a team must be present at the same time.

• They must perform certain tasks (loading the vehicle) and stay for a certain time at the site.

• The number of products at each site may vary (affects the time spent at the site and the capacity of the vehicle used).

• The tasks must be performed before a certain time.

• The clients want to be visited as late as possible.

Teams can walk from site to site or use a van.

Delivery at the depot must be done within a time

window.

Costs to minimize

Km costs for the vehicles.

Costs related to the

workforce (drivers and

workers)

Objectives

Minimize cost

(12)

Team1 Team2 Vehicle 1 Vehicle 2 Team4 Team3 Depot Van

Context: a 2-CVRPTW + VRPPDTW

(13)

Inputs and outputs

Items to be

picked up capacityVehicle Site and depot time windows Distances

Vehicles schedule Teams schedule Vans schedule

Objectives

Minimal total cost

(14)

Why is this problem hard to solve?

Vehicles capacity and sites time windows make it hard to find feasible solutions.

Costs and quality of service are conflicting goals.

The coordination of the vehicles and teams is complicated.

There is no obvious good strategy:

• Create routes by always going to the next closest site?

• Spread out the biggest clients in different routes?

(15)

Contents

Introduction

The problem

Vehicle routing problems

▪ Possible formulations and chosen approach ▪ 3-step resolution

▪ Problem decompositions

▪ Improving the solution further

(16)

Possible formulations

Time discretization

Easy to understand

Large number of variables:

T(route, site, time)= 0 | 1

Time slots

Slot variables:

slot(route, site, n) = 0 | 1 Start and end times:

start(route, n_slot) end(route, n_slot) Many unused slot variables

Tasks precedences:

Direct precedences General precedences

B

Site A

A

Site B

Vehicle 1 Vehicle 2

C

B

B

A

B

C

(17)

Formulation with general precedences

• Route variables

site_in_route(vehicle, site) = 1 | 0

• Precedence variables

precedence(site_1, site_2) = 1 | 0

• Start and end variables start(site)

end(site)

• Time constraints

end(site A) + travel(A, B) <= start(site B) + M x (1-precedence(site A, site B))

Site B

Site C

Site A

site_in_route(v1, A) = 1 site_in_route(v2, A) = 0 site_in_route(v1, B) = 1 site_in_route(v2, B) = 0 site_in_route(v1, C) = 1 site_in_route(v2, C) = 0 Vehicle 1

end(A) + travel(A, B) <= start(B) + M x (1 – 1) end(B) + travel(B, A) <= start(A) + M x (1 – 0)

always true since M is big

start(A) = t1 end(A) = t1 + duration(A) start(B) = t2 end(B) = t2 + duration(B) start(A) = t3 end(B) = t3 + duration(B) precedence(A, B) = 1 precedence(B, A) = 0 precedence(A, C) = 1 precedence(C, A) = 0 precedence(B, C) = 1 precedence(C, B) = 0

(18)

3-step resolution

Problem decomposition - 2 phase decomposition. - iterative decomposition.

02

Complete problem Precedences formulation

01

Solution improvement

MILP based local search

03

(19)

First problem decomposition

Two-phase decomposition

Vehicle 1 Team 1 Team 2

Site B

Site D

Site B

Site A

Site D

Vehicle 2

Site C

Site C

Site A

Solve the vehicle problem first

Fix the vehicle solution and solve the team problem

(20)

Second Problem decomposition

Iterative decomposition

A B C D E F G H

(21)

Second Problem decomposition

Iterative decomposition

F A B C D E G H F A

Create some small groups of sites Solve the problem with the first group

(22)

Second Problem decomposition

Iterative decomposition

F G A B C D E H F A G B

Create some small groups of sites Solve the problem with the first group

only

(23)

Second Problem decomposition

Iterative decomposition

A B C D E F G H E C G F D H B A

Create some small groups of sites Solve the problem with the first group

only

(24)

Improving a solution with MILP based local search

A B C D E F G H E C G F D H B A J I J I

Choose some sites randomly Free up those sites and fix everything

(25)

Improving a solution with MILP based local search

A B C F D G H E C G F D H A J I J

Choose some sites randomly Free up those sites and fix everything

(26)

Improving a solution with MILP based local search

A B* C F D G H E* C G F D H A J I* J

Choose some sites randomly Free up those sites and fix everything

else

Solve the problem again

B*

E*

I*

(27)

Improving a solution with MILP based local search

A B C D E F G H E C G F D H B A J I J I

Choose some sites randomly

Free up those sites and fix everything else

Solve the problem again

Site local search

Choose two vehicles randomly Free up the corresponding sites and fix

everything else Solve the problem again

(28)

Contents

Introduction

The problem

Solving approaches

Vehicle routing problems

(29)

Results

Time Sites Precedence model 2-phase dec 2-phase dec iterative dec iterative dec 2-phase iterative dec 2-phase iterative dec 2-phase iterative dec 2-phase iterative dec

vehicle LS vehicle LS vehicle LS site LS site LS site LS

1 min

8 0,0% 0,0% 0,0% 30,2% 0,9% 30,1% 0,0% 0,0% 0,0%

20 time out 11,2% 0,0% infeasible infeasible 3,8% 0,3% 4,0% infeasible

40 time out 73,2% 30,3% 48,9% 33,6% 25,8% 29,9% 22,5% 14,1% 5 min 8 0,0% 0,0% 0,0% 30,2% 0,9% 30,1% 0,0% 0,0% 0,0% 20 4,8% 6,1% 0,0% 5,5% 5,5% 5,0% 0,3% 4,0% 2,2% 40 74,4% 30,2% 16,0% 21,1% 24,4% 18,6% 10,6% 14,8% 6,1% 10 min 8 0,0% 0,0% 0,0% 30,2% 0,9% 30,1% 0,0% 0,0% 0,0% 20 4,5% 6,1% 2,5% 5,5% infeasible 4,8% 0,3% 4,2% 2,0% 40 55,7% 25,6% 0,0% 18,8% 21,9% 16,9% 0,9% 14,9% 5,5% 30 min - - - -20 3,1% 0,5% 0,3% infeasible 5,5% 3,3% 2,5% 1,4% 0,3% 40 32,7% 21,7% 3,5% 13,4% 97,1% 14,8% 1,6% 14,4% 2,2%

Infeasible: decomposing the problem may lead to situations where no solution can be found. Time out: the solver did not find a solution in the allocated time.

(30)

Conclusions and highlights

Real-life vehicle routing problems can be

very hard

to solve.

MILP can be used to solve complex and large VRP:

• General precedence models are an effective way to solve small and medium instances.

• For large instances, problem decompositions and local search are useful to get good solutions in reasonable time.

Gurobi allows us to make fast local searches by solving relatively small problems very quickly (seconds vs minutes).

Route optimisation using

Gurobi

mathematical models saves time and

money:

(31)

Questions?

Contact Gurobi at

[email protected]

More content in our blog

baobabsoluciones.es/blog

Contact baobab at

References

Related documents

In this case, the plaintiffs' claims are based entirely on statements made by the defendants in their efforts to organize a Clay Nissan boycott and picketing, activities protected

It is illegal for a business to only offer to supply a good or service on the condition that the customer also buy goods or services from another specified business. This behaviour is

Proc Natl Acad Sci U S A 103 (5) : 1412-7 Sayer RA, Lancaster JM, Pittman J, Gray J, Whitaker R, Marks JR, Berchuck A (2005) High insulin- like growth factor-2 (IGF-2) gene

More and more researchers (Klein et al., 2018; Nosek et al. 2018; Veer &amp; Giner-Sorolla, 2016) stress the need to pre- register any material prior to data collection. Indeed, as

Mechanisms of change at the level of the patient involve the integration of polarized representations of self and others; mechanisms of change at the level of the

2ME2: 2‑Methoxyestradiol; ABC: ATP‑binding cassette; ALL: Acute lympho‑ blastic leukemia; BCRP: Breast cancer resistance protein; CEM/2ME2‑28.8R: 2‑Methoxyestradiol‑resistant

As 100 Best Books for Children points out so accurately, “Bibliotherapy rarely produces a classic, but this book describes perfectly a simple childhood and adult phenomenon —a

Offenders with a criminal history often experience difficulties in finding gainful employment to alleviate their financial hardships (English, 2011). The financial distress