Decision Aid Methodologies In Transportation

51
CIVIL-557 Decision Aid Methodologies In Transportation Transport and Mobility Laboratory TRANSP-OR Γ‰cole Polytechnique FΓ©dΓ©rale de Lausanne EPFL Virginie Lurkin Lecture 4: Integer programming I: Branch and Bound

Transcript of Decision Aid Methodologies In Transportation

Page 1: Decision Aid Methodologies In Transportation

CIVIL-557

Decision Aid Methodologies

In Transportation

Transport and Mobility Laboratory TRANSP-OR

Γ‰cole Polytechnique FΓ©dΓ©rale de Lausanne EPFL

Virginie Lurkin

Lecture 4:

Integer programming I: Branch and Bound

Page 2: Decision Aid Methodologies In Transportation

On the previous lecture…

Container Storage Inside a Container Terminal

o Two-phase simplex method

o Duality theory

Page 3: Decision Aid Methodologies In Transportation

Suppose 2 new containers are expected to arrive for storage in the next planning

period of a terminal. Suppose there are only 2 blocks in the terminal, each with 20

storage spaces. For the moment, there are 6 containers in block 1 and 12 containers

in block 2.

𝑡 = 𝟐

B = 𝟐

A = 𝟐𝟎

π’‚πŸ = 𝟏𝟎

π’‚πŸ = πŸ—

𝑭 =𝟏𝟎+πŸ—+𝟐

πŸΓ—πŸπŸŽ= 𝟎. πŸ“πŸπŸ“

π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ 𝑒1+ + 𝑒1

βˆ’ + 𝑒2+ + 𝑒2

βˆ’

𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œπ‘₯1βˆ’π‘’1

+ + 𝑒1βˆ’ = 0.5

π‘₯2βˆ’π‘’2+ + 𝑒2

βˆ’ = 1.5π‘₯1+π‘₯2 = 2π‘₯1, π‘₯2, 𝑒1

+, 𝑒1βˆ’, 𝑒2

+, 𝑒2βˆ’ β‰₯ 0

What if the situation is different…

Linear programming

𝟏𝟎 πŸ—

Optimal solution: (𝟎. πŸ“, 𝟏. πŸ“, 0, 0, 0, 0)

π‘₯1 and π‘₯2 represent the number of containers to be assigned, respectively, to

block 1 and 2

π‘₯1 and π‘₯2, in reality, should be integer

Page 4: Decision Aid Methodologies In Transportation

Linear (mixed) integer programming

Page 5: Decision Aid Methodologies In Transportation

Linear integer programming

𝐴π‘₯ ≀ 𝑏

π‘₯ β‰₯ 0,

subject to

where 𝐴 ∈ β„π‘šΓ—π‘›, b ∈ β„π‘š, c ∈ ℝ𝑛

π‘šπ‘–π‘› 𝑐𝑇π‘₯π‘₯ ∈

𝑛

Pure integer programming (IP):

A mixed-integer programming (MIP) problem is one where only some of

the decision variables are constrained to be integer values

Page 6: Decision Aid Methodologies In Transportation

Linear (mixed) integer programming

How to solve integer programming problem?

Integer solutions

Objective function

Optimum of LP

relaxation

Nearest integer

(not feasible)

IP optimum

Intuitive idea: remove the integer constraints from the IP formulation (LP relaxation)

o Solve the LP relaxation and round to the nearest integer

Not the best idea!

Page 7: Decision Aid Methodologies In Transportation

Linear (mixed) integer programming

How to solve integer programming problem?

There is no optimality conditions for integer programming problem

Explicit enumeration is normally impossible due to the exponentially increasing

number of potential solutions

Exact methods can be used to find the optimal solution:

o Two main methods:

o Computing a true optimal solution might be very costly

Heuristic methods can be used to find a good solution:

o Does not guarantee optimality

Branch and Bound (B&B) and Cutting planes

Page 8: Decision Aid Methodologies In Transportation

Heuristics

Page 9: Decision Aid Methodologies In Transportation

Heuristics

Algorithms and complexity measures

An algorithm is a finite set of instructions that when executed on an input can

produce an output after finitely many steps.

The input encodes an instance of the problem that the algorithm is supposed to

solve, and the output encodes a solution for the given problem instance.

The computation of an algorithm on an input is the sequence of steps it performs.

Algorithms do not always terminate; they may perform an infinite computation for

some, or any, input.

Page 10: Decision Aid Methodologies In Transportation

Heuristics

Algorithms and complexity measures

There are problems that can be easily and precisely defined in mathematical terms,

yet that provably cannot be solved by any algorithm (undecidable/ uncomputable

problems.

In practice, we cannot expect to be able to solve real world problem instances of

arbitrary size to optimality.

Depending on the size of an instance or depending on the available CPU time we will

often have to be satisfied with computing approximate solutions.

Page 11: Decision Aid Methodologies In Transportation

Heuristics

Algorithms and complexity measures

The term heuristic is used for algorithms which find solutions among all possible

ones ,but they do not guarantee that the best will be found.

A good heuristic algorithm should fulfil the following properties:

o A solution can be obtained with reasonable computational effort.

o The solution should be near optimal (with high probability).

o The likelihood for obtaining a bad solution (far from optimal) should be low.

How can we evaluate the performance of an heuristic algorithm ?

Page 12: Decision Aid Methodologies In Transportation

1. Rearrange blocks so that π‘Žπ‘– increases with 𝑖

2. Determine π‘₯𝑖 in increasing order of 𝑖 using:

π‘₯1 = min{𝑁,max 0, 𝐴 Γ— F βˆ’ π‘Ž1 }

π‘₯𝑖 = m𝑖𝑛{max 0, 𝐴 Γ— F βˆ’ π‘Žπ‘– , 𝑁 βˆ’π‘Ÿ=1

π‘–βˆ’1

π‘₯π‘Ÿ} βˆ€π‘– β‰₯ 2

Heuristics

A concrete example for our container storage problem

Page 13: Decision Aid Methodologies In Transportation

Branch and Bound algorithm

Page 14: Decision Aid Methodologies In Transportation

Branch and Bound algorithm

General idea

Implicit enumeration of the feasible set, by ruling out large sets of feasible

points

How ?

o By partitioning the feasible set into smaller subsets

o By using bounds to identify subsets that are guaranteed not to contain an

optimal solution

π‘Ίπ‘ΊπŸ

π‘ΊπŸ

π‘ΊπŸπŸ π‘ΊπŸπŸ

π‘ΊπŸπŸ π‘ΊπŸπŸ

Page 15: Decision Aid Methodologies In Transportation

Theorem 1:

π‘ƒπ‘˜is an optimization problem (minimization)

𝑆 is the feasible set of the optimization problem 𝑃

𝑆 is partitioned into 𝐾 subsets: 𝑆1 βˆͺ … βˆͺ Sm βˆͺ Sm+1 βˆͺ … βˆͺ SK

For each π‘˜ = 1,2, … , 𝐾, let 𝑙𝑒𝑑 π‘₯π‘˜βˆ— be an optimal solution of the

optimization problem π‘ƒπ‘˜(minimization). Let 𝑖 be such that:

𝑓 π‘₯π‘–βˆ— ≀ 𝑓 π‘₯π‘˜

βˆ— , π‘˜ = 1,… , 𝐾

Then π‘₯π‘–βˆ— is an optimal solution of the optimization problem 𝑃

π‘ΊπŸπŸ π‘ΊπŸπŸ

π‘ΊπŸπŸ π‘ΊπŸπŸ

Branch and Bound algorithm

Page 16: Decision Aid Methodologies In Transportation

Branch and Bound algorithm

Partitioning the original problem into smaller subproblems

For each feasible subproblem, we will calculate a lower bound (best possible value)

Lower bounds are obtained by solving relaxations of the original subproblems

Calculate lower bounds is much easier (simplex algorithm can be used)

Partitioning:

Partitioning the feasible set into smaller subsets

Using bounds:

Any feasible solution provides an upper bound on the optimal solution (minimization)

A feasible solution is a solution that satisfies all the constraints

Page 17: Decision Aid Methodologies In Transportation

π‘ΊπŸπ‘ΊπŸ

𝑃

𝑃1 𝑃2

𝑃11 𝑃12

Branch and Bound algorithm

𝐿𝐡𝑃

𝐿𝐡𝑃1 𝐿𝐡𝑃2

Some candidates are excluded based on the value of the lower bound

Using bounds:

π‘ˆπ΅

𝑺 If 𝐿𝐡𝑃2 β‰₯ π‘ˆπ΅If 𝐿𝐡𝑃1 < π‘ˆπ΅

Branching refers to exploring the subtree of an active node

Bounding refers to estimating a lower bound at an active node

Page 18: Decision Aid Methodologies In Transportation

For each π‘˜ = 1,2, … ,π‘š, let 𝑙𝑒𝑑 π‘₯π‘˜βˆ— be an optimal solution of π‘ƒπ‘˜.

For each π‘˜ = π‘š + 1,… , 𝐾, let 𝑙(π‘ƒπ‘˜) be a lower bound on π‘ƒπ‘˜:

𝑙 π‘ƒπ‘˜ ≀ 𝑓 π‘₯π‘˜ βˆ€π‘˜ ∈ π‘†π‘˜

Let 𝑖 be such that:

𝑓 π‘₯π‘–βˆ— ≀ 𝑓 π‘₯π‘˜

βˆ— , π‘˜ = 1,… ,π‘š

and

𝑓 π‘₯π‘–βˆ— ≀ 𝑙 π‘ƒπ‘˜ , π‘˜ = π‘š + 1,… , 𝐾

Then π‘₯π‘–βˆ— is an optimal solution of the optimization problem 𝑃

Branch and Bound algorithm

Theorem 2:

Page 19: Decision Aid Methodologies In Transportation

Branch and Bound algorithm

Branching:

𝑃

𝑃1 𝑃2

𝐿𝐡𝑃

π‘ˆπ΅

Select a variable π‘₯𝑗 that has a fractional value:

π‘˜ < π‘₯𝑗 < π‘˜ + 1, with π‘˜ integer

Create two new LP-subproblems:

1. Previous LP-subproblem + constraint π‘₯𝑗 ≀ π‘˜ (π‘˜ = π‘₯𝑗 )

2. Previous LP-subproblem + constraint π‘₯𝑗 β‰₯ π‘˜ + 1 (π‘˜ + 1 = π‘₯𝑗 )

How to branch?

Page 20: Decision Aid Methodologies In Transportation

Algorithm

Solve the relaxation 𝑅 π‘ƒπ‘˜ and denote π‘₯π‘…βˆ— the optimal value

𝑙 π‘ƒπ‘˜ ≔ 𝑓(π‘₯π‘…βˆ— )

𝑒 𝑃 > 𝑙 π‘ƒπ‘˜ ?

π‘₯π‘…βˆ— integer?

no

𝑃 ≔ 𝑃0𝑒 𝑃 ≔ +∞

𝑒 𝑃 , Upper Bound for 𝑃

no

Discard π‘ƒπ‘˜ from 𝑃yes

𝑙 π‘ƒπ‘˜ ,Lower Bound for π‘ƒπ‘˜

no

yes𝑓 π‘₯𝑅

βˆ— < 𝑒(𝑃)?

𝑃 empty?

no

π‘₯βˆ— = (π‘₯π‘…βˆ— )

𝑒 𝑃 ≔ 𝑓 π‘₯π‘…βˆ—

yes

end

π’™βˆ—, π’‡βˆ—= 𝒖 𝑷

yes

Select 𝑖 such that (π‘₯π‘…βˆ— )𝑖 is not integer

Create π‘ƒπ‘˜π‘™ by adding the constraint π‘₯𝑖 ≀ (π‘₯𝑅

βˆ— )𝑖 to π‘ƒπ‘˜Create π‘ƒπ‘˜

π‘Ÿ by adding the constraint π‘₯𝑖 β‰₯ (π‘₯π‘…βˆ— )𝑖 to π‘ƒπ‘˜

𝑃 ≔ 𝑃 βˆͺ π‘ƒπ‘˜π‘™ , π‘ƒπ‘˜

π‘Ÿ \Pπ‘˜

Select a problem π‘ƒπ‘˜ in 𝑃. π‘ƒπ‘˜ infeasible?

yes

no

Branch and Bound algorithm

Page 21: Decision Aid Methodologies In Transportation

Exploration of the search tree:

𝑃

𝑃1 𝑃2

𝑃11 𝑃12

𝐿𝐡𝑃

𝐿𝐡𝑃1 𝐿𝐡𝑃2

π‘ˆπ΅

If 𝐿𝐡𝑃2 β‰₯ π‘ˆπ΅If 𝐿𝐡𝑃1 < π‘ˆπ΅

𝑃122 𝑃123

𝑃1232𝑃1231

𝑃121

Depth-first search (DFS): explores as far as possible along each branch before backtracking

Branch and Bound algorithm

Page 22: Decision Aid Methodologies In Transportation

Exploration of the search tree:

𝑃

𝑃1 𝑃2

𝑃11 𝑃12

𝐿𝐡𝑃

𝐿𝐡𝑃1 𝐿𝐡𝑃2

π‘ˆπ΅

If 𝐿𝐡𝑃2 β‰₯ π‘ˆπ΅If 𝐿𝐡𝑃1 < π‘ˆπ΅

𝑃122 𝑃123

Breadth-first search (BFS): explores nodes level by level

𝑃121

Depending on the problem at hand, either DFS or BFS could be advantageous

Branch and Bound algorithm

Page 23: Decision Aid Methodologies In Transportation

Back to our case:

Branch and Bound algorithm

π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ 𝑒1+ + 𝑒1

βˆ’ + 𝑒2+ + 𝑒2

βˆ’

𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œπ‘₯1βˆ’π‘’1

+ + 𝑒1βˆ’ = 0.5

π‘₯2βˆ’π‘’2+ + 𝑒2

βˆ’ = 1.5π‘₯1+π‘₯2 = 2π‘₯1, π‘₯2, 𝑒1

+, 𝑒1βˆ’, 𝑒2

+, 𝑒2βˆ’ β‰₯ 0

π‘₯π‘…βˆ— = 0.5, 1.5, 0, 0, 0, 0 and 𝑓 π‘₯𝑅

βˆ— = 0

𝑃0

𝑒 𝑃 = +∞

𝑃0π‘Ÿπ‘ƒ0

𝑙

π‘₯1 ≀ 0 π‘₯1 β‰₯ 1 𝑒 𝑃 > 𝑙 𝑃0

𝑙 𝑃0 = 0

π‘₯1, π‘₯2 are not integers

Select π‘₯1 for branching

𝑙(𝑃0) = 0

𝑹(π‘·πŸŽ)

Page 24: Decision Aid Methodologies In Transportation

Back to our case:

Branch and Bound algorithm

π‘₯π‘…βˆ— = 0, 2, 0, 0.5, 0.5, 0 and 𝑓 π‘₯𝑅

βˆ— = 1

𝑃0

𝑒 𝑃 = +∞

𝑃0π‘Ÿπ‘ƒ0

𝑙

π‘₯1 ≀ 0 π‘₯1 β‰₯ 1 𝑒 𝑃 > 𝑙 𝑃0

𝑙 𝑃0𝑙 = 1

π‘₯1, π‘₯2 are integers 𝑒 𝑃 = 1

Discard 𝑃0𝑙

𝑙(𝑃0) = 0

π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ 𝑒1+ + 𝑒1

βˆ’ + 𝑒2+ + 𝑒2

βˆ’

𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œπ‘₯1βˆ’π‘’1

+ + 𝑒1βˆ’ = 0.5

π‘₯2βˆ’π‘’2+ + 𝑒2

βˆ’ = 1.5π‘₯1+π‘₯2 = 2π‘₯1≀ 0π‘₯1, π‘₯2, 𝑒1

+, 𝑒1βˆ’, 𝑒2

+, 𝑒2βˆ’ β‰₯ 0

𝑹(π‘·πŸŽπ’ )

𝑙(𝑃0𝑙) = 1

𝑒 𝑃 = 1

Page 25: Decision Aid Methodologies In Transportation

Back to our case:

Branch and Bound algorithm

π‘₯π‘…βˆ— = 1, 1, 0.5, 0, 0, 0.5 and 𝑓 π‘₯𝑅

βˆ— = 1

𝑃0

𝑒 𝑃 = +∞

𝑃0π‘Ÿπ‘ƒ0

𝑙

π‘₯1 ≀ 0 π‘₯1 β‰₯ 1 𝑒 𝑃 > 𝑙 𝑃0

𝑙 𝑃0π‘Ÿ = 1

π‘₯1, π‘₯2 are integers

Discard 𝑃0π‘Ÿ

𝑙(𝑃0) = 0

π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ 𝑒1+ + 𝑒1

βˆ’ + 𝑒2+ + 𝑒2

βˆ’

𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œπ‘₯1βˆ’π‘’1

+ + 𝑒1βˆ’ = 0.5

π‘₯2βˆ’π‘’2+ + 𝑒2

βˆ’ = 1.5π‘₯1+π‘₯2 = 2π‘₯1β‰₯ 1π‘₯1, π‘₯2, 𝑒1

+, 𝑒1βˆ’, 𝑒2

+, 𝑒2βˆ’ β‰₯ 0

𝑙(𝑃0𝑙) = 1

𝑒 𝑃 = 1

𝑓 π‘₯π‘…βˆ— = 1

end

π‘₯π‘…βˆ— = 0, 2, 0, 0.5, 0.5, 0 or π‘₯𝑅

βˆ— = 1, 1, 0.5, 0, 0, 0.5

𝑹(π‘·πŸŽπ’“)

Page 26: Decision Aid Methodologies In Transportation

Linear (mixed) integer programming

Some integer programming tricks

Page 27: Decision Aid Methodologies In Transportation

Integer programming tricks

Example 1

o The value of variable π‘₯ must be either zero or between particular positive bounds

Suppose that a supplier of some item requires that if an item is ordered, then its batch

size must be between a particular minimum and maximum value

Discontinuous values

o π‘₯ is the number of ordered units

o Algebraic notation: π‘₯ = 0 ∣ 𝑙 ≀ π‘₯ ≀ 𝑒

Page 28: Decision Aid Methodologies In Transportation

Integer programming tricks

We introduce an indicator variable

An indicator variable is a binary variable (0/1) that indicates a certain state in a model

A set of constraints is used to create the desired properties:

π‘₯ ≀ 𝑒𝑦π‘₯ β‰₯ 𝑙𝑦𝑦 ∈ {0,1}

Discontinuous values

𝑦 = α‰Š01

for π‘₯ = 0

for 𝑙 ≀ π‘₯ ≀ 𝑒

Page 29: Decision Aid Methodologies In Transportation

Integer programming tricks

Example 2

Fixed costs

Suppose that a manager must decide which of 𝑛 warehouses to use for meeting the

demands of π‘š customers for a good. The decisions to be made are which warehouses

to operate and how much to ship from any warehouse to any customer

o There is a fixed operating cost associated to each warehouse

o Decisions must be made about tradeoffs between transportation costs and costs

for operating distribution centers

o Very common issue in modeling distribution systems

Page 30: Decision Aid Methodologies In Transportation

Integer programming tricks

We introduce an indicator variable

Data:

Fixed costs

𝑦𝑖 = α‰Š10

if warehouse 𝑖 is opened

if warehouse 𝑖 is not opened

π‘₯𝑖𝑗 = amount to be sent from warehouse 𝑖 to customer 𝑗

Other decisions variables:

𝑓𝑖 = fixed operating cost for warehouse 𝑖

𝑝𝑖 = per-unit operating cost at warehouse 𝑖

𝑐𝑖𝑗 = transportation cost for shipping from warehouse 𝑖 to customer 𝑗

Page 31: Decision Aid Methodologies In Transportation

Integer programming tricks

Model:

Fixed costs

min

𝑖=1

π‘š

𝑗=1

𝑛

(𝑝𝑖+𝑐𝑖𝑗)π‘₯𝑖𝑗 +

𝑖=1

π‘š

𝑓𝑖𝑦𝑖

s. t.

𝑖=1

π‘š

π‘₯𝑖𝑗 = 𝑑𝑗 , βˆ€π‘— = 1,2, … , 𝑛

𝑗=1

𝑛

π‘₯𝑖𝑗 ≀ 𝑴𝑦𝑖 , βˆ€π‘– = 1,2, … ,π‘š 𝑴 is a big number

π‘₯𝑖𝑗 β‰₯ 0, βˆ€π‘– = 1,2, … ,π‘š, βˆ€π‘— = 1,2, … , 𝑛

𝑦𝑖 ∈ 0,1 , βˆ€π‘– = 1,2, … ,π‘š

Page 32: Decision Aid Methodologies In Transportation

Integer programming tricks

Example 3

Suppose that a company has to choose among two modes of operation for the

manufacturing process of its products on a single machine

o Very common issue in modeling manufacturing process

o Each mode has its own performance (number of units produced by minute)

Either… or …

o A mode of operation might better suit to some products

Page 33: Decision Aid Methodologies In Transportation

Integer programming tricks

We introduce an indicator variable

Data:

Either… or …

𝑦𝑗 = α‰Š10

if process 1 is chosen for product 𝑗

if process 2 is not chosen for product 𝑗

π‘₯𝑗 = number of units of product 𝑗 produced by the company

Other decisions variables:

π‘Žπ‘–π‘— = per-unit time needed (in minutes) to produce product 𝑗 using process 𝑖

𝑏𝑖 = maximum amount of time the machine can be used if process 𝑖 is used

Page 34: Decision Aid Methodologies In Transportation

Integer programming tricks

Constraints:

Either… or …

s. t.

𝑗=1

𝑛

π‘Ž1𝑗π‘₯𝑗 ≀ 𝑏1 if process 1 is chosen for product 𝑗, i.e. if 𝑦𝑗 = 1

or

s. t.

𝑗=1

𝑛

π‘Ž2𝑗π‘₯𝑗 ≀ 𝑏2 if process 2 is chosen for product 𝑗, i.e. if 𝑦𝑗 = 0

π‘₯𝑗 β‰₯ 0, βˆ€π‘— = 1,2, … , 𝑛

𝑦𝑗 ∈ {0,1}

s. t.

𝑗=1

𝑛

π‘Ž1𝑗π‘₯𝑗 ≀ 𝑏1 +𝑀(1 βˆ’ 𝑦𝑗)

𝑗=1

𝑛

π‘Ž2𝑗π‘₯𝑗 ≀ 𝑏2 +𝑀𝑦𝑗

Page 35: Decision Aid Methodologies In Transportation

Integer programming tricks

Constraints:

If… then …

π‘₯𝑗 β‰₯ 0, βˆ€π‘— = 1,2, … , 𝑛

𝑦𝑗 ∈ {0,1}

s. t.

𝑗=1

𝑛

π‘Ž1𝑗π‘₯𝑗 ≀ 𝑏1 +𝑀(1 βˆ’ 𝑦𝑗)

𝑗=1

𝑛

π‘Ž2𝑗π‘₯𝑗 ≀ 𝑏2 +𝑀𝑦𝑗

o If process 1 is applied to product 1, it has to be applied to product 2

if 𝑦1 = 1, then 𝑦2 = 1

𝑦2 β‰₯ 𝑦1

Page 36: Decision Aid Methodologies In Transportation

Integer programming tricks

Data:

𝑐𝑖𝑗 = per-unit cost to produce product 𝑗 using process 𝑖

Elimination of products of variables

Objective function:

min

𝑗=1

𝑛

(𝑐1𝑗π‘₯𝑗 𝑦𝑗 + c2jπ‘₯𝑗(1 βˆ’ 𝑦𝑗))

nonlinear

𝑗=1

𝑛

((𝑐1π‘—βˆ’π‘2𝑗)π‘₯𝑗 𝑦𝑗 + c2jπ‘₯𝑗)

Page 37: Decision Aid Methodologies In Transportation

min

𝑗=1

𝑛

((𝑐1π‘—βˆ’π‘2𝑗)π‘₯𝑗 𝑦𝑗 + c2jπ‘₯𝑗)

Integer programming tricks

Elimination of products of variables

o In general, a product of two variables can be replaced by one variable,

o A number of new constraints is imposed on the new variable

continuous variables

binary variables

Product of a binary variable and a continuous variable

𝑧𝑗 ≀ 𝑒𝑦𝑗

𝑧𝑗 ≀ π‘₯𝑗

𝑧𝑗 β‰₯ π‘₯𝑗 βˆ’ u(1 βˆ’ yj)

𝑧𝑗 β‰₯ 0

0 ≀ π‘₯𝑗 ≀ 𝑒Upper bound on π‘₯𝑗

New variable 𝑧𝑗 𝑧𝑗= π‘₯𝑗 Γ— 𝑦𝑗

Page 38: Decision Aid Methodologies In Transportation

Integer programming tricks

Product of two binary variables

π‘₯𝑗𝑦𝑦

binary variables binary variables

Product of two continuous variables

New variable 𝑧𝑗 𝑧𝑗= π‘₯𝑗 Γ— 𝑦𝑗

𝑧𝑗 ≀ π‘₯𝑗

𝑧𝑗 ≀ 𝑦𝑗

𝑧𝑗 β‰₯ π‘₯𝑗 + 𝑦𝑗 βˆ’ 1

𝑧𝑗 ∈ {0,1}

π‘₯𝑗𝑦𝑦

continuous variables continuous variables

𝑧𝑗 =1

2(π‘₯𝑗 + 𝑦𝑗)

𝑀𝑗 =1

2(π‘₯𝑗 βˆ’ 𝑦𝑗)

New variables 𝑧𝑗 and 𝑀𝑗 𝑧𝑗2βˆ’π‘€π‘—

2 = π‘₯𝑗 Γ— 𝑦𝑗

Quadratic function

Page 39: Decision Aid Methodologies In Transportation

Linear (mixed) integer programming

IP and MIP have extremely wide applications in practice

Page 40: Decision Aid Methodologies In Transportation

Knapsack problem

Which containers should be loaded in the vessel?

Page 41: Decision Aid Methodologies In Transportation

Knapsack problem

𝑀𝑖: weight if container 𝑖

𝑝𝑖: price of container 𝑖

o Data

If container 𝑖 is selected

Otherwiseπ‘₯𝑖 = α‰Š

10

o Decision variables

𝐦𝐚𝐱

𝑖

𝑝𝑖π‘₯𝑖

o Objective function

𝑖

𝑀𝑖π‘₯𝑖 ≀ 𝐢

o Constraints

𝐢: capacity of the vessel

Page 42: Decision Aid Methodologies In Transportation

Which boxes should be loaded in the container in order to maximize the revenue?

Related problems deal with the loading of containers in trains or aircrafts

Knapsack problems

Page 43: Decision Aid Methodologies In Transportation

Facility location problem

Where to locate inland container depots?

Inland container depots: storage area for empty shipping containers situated at

inland points away from sea ports

Page 44: Decision Aid Methodologies In Transportation

Facility location problem

Where to locate inland container depots?

Inland container depots: storage area for empty shipping containers situated at

inland points away from sea ports

Page 45: Decision Aid Methodologies In Transportation

𝐼: set of π‘š alternative facility locations

J: set of 𝑛 customer zones

o Data

𝑐𝑖𝑗: per-unit cost for supplying customer zone 𝑗 by using the facility at 𝑖

Facility location problem

𝑓𝑖: fixed cost of establishing a facility location 𝑖

𝑏𝑖 : capacity of facility location 𝑖

If a facility is established at location 𝑖

Otherwise𝑦𝑖 = α‰Š

10

o Decision variables

π‘₯𝑖𝑗 = Units of customer zone 𝑗’s demand satisfied by facility at location 𝑖

𝑑𝑗: total demand for customer zone 𝑗

Page 46: Decision Aid Methodologies In Transportation

Facility location problem

𝐦𝐚𝐱

𝑖=1

π‘š

𝑗=1

𝑛

𝑐𝑖𝑗π‘₯𝑖𝑗 +

𝑖=1

π‘š

𝑓𝑖𝑦𝑖

o Objective function

𝑖=1

π‘š

π‘₯𝑖𝑗 = 𝑑𝑗 , βˆ€π‘— = 1,… , 𝑛

o Constraints

𝑗=1

𝑛

π‘₯𝑖𝑗 ≀ 𝑏𝑖 , βˆ€π‘– = 1,… ,π‘š

𝑗=1

𝑛

π‘₯𝑖𝑗 ≀ (

𝑗=1

𝑛

𝑑𝑗) 𝑦𝑖 , βˆ€π‘– = 1, … ,π‘š

π‘₯𝑖𝑗 β‰₯ 0, βˆ€π‘– = 1,2, … ,π‘š; βˆ€π‘— = 1,2, … , 𝑛

𝑦𝑖 ∈ 0,1 , βˆ€π‘– = 1,2, … ,π‘š

Page 47: Decision Aid Methodologies In Transportation

Assignment problem

Berth allocation problem

The berth allocation problem consists of assigning incoming ships to berthing

position

Page 48: Decision Aid Methodologies In Transportation

𝐡: set of π‘š berths

𝑉: set of 𝑛 vessels

o Data

β„Žπ‘–π‘—: handling time of vessel 𝑖 at berth 𝑗

If a vessel 𝑗 is allocated to berth 𝑖

Otherwise𝑦𝑖𝑗 = α‰Š

10

o Decision variables

Assignment problem

π¦π’Šπ’

𝑖=1

π‘š

𝑗=1

𝑛

β„Žπ‘–π‘—π‘¦π‘–π‘—

o Objective function

Page 49: Decision Aid Methodologies In Transportation

o Constraints

𝑖=1

π‘š

𝑦𝑖𝑗 = 1, βˆ€π‘— = 1,… , 𝑛

𝑗=1

𝑛

𝑦𝑖𝑗 = 1, βˆ€π‘– = 1,… ,π‘š

𝑦𝑖𝑗 ∈ 0,1 , βˆ€π‘– = 1,2, … ,π‘š

Assignment problem

Page 50: Decision Aid Methodologies In Transportation

Summary

Making Branch and Bound work well in practice requires lots of good ideas

Heuristics are often used to find good initial solutions

An idea for speeding up Branch and Bound is to add valid inequalities (next

lecture)

Β« Divide ut imperes Β»

Page 51: Decision Aid Methodologies In Transportation

Main references

β€’ Murty, K. G. (2015). Intelligent Modeling Essential to Get Good Results: Container Storage Inside a

ContainerTerminal. In Case Studies in Operations Research (pp. 1-15). Springer NewYork.

β€’ Bierlaire, M. (2015).Optimization: principles and algorithms. EPFL Press, Lausanne, Switzerland.