0% found this document useful (0 votes)
30 views45 pages

OR1 03 IPmodeling

The document discusses integer programming and its applications. It introduces integer programming, covers formulations for various problems like knapsack and fixed-charge constraints, and describes applications in personnel scheduling, route selection, and facility location problems.

Uploaded by

hamzatamer.88.10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views45 pages

OR1 03 IPmodeling

The document discusses integer programming and its applications. It introduces integer programming, covers formulations for various problems like knapsack and fixed-charge constraints, and describes applications in personnel scheduling, route selection, and facility location problems.

Uploaded by

hamzatamer.88.10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Introduction IP formulation Facility location Machine scheduling Vehicle routing

Operations Research I: Models & Applications


Integer Programming

Ling-Chieh Kung

Department of Information Management


National Taiwan University

OR I: Integer Programming 1 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Road map

I Introduction to integer programming.


I Integer programming formulation.
I Facility location problems.
I Machine scheduling problems.
I Vehicle routing problems.

OR I: Integer Programming 2 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Integer programming

I We have worked with LPs.


I In some cases, variables must only take integer values.
I The subject of formulating and solving models with integer variables is
Integer Programming (IP).
I An IP is typically a linear IP (LIP).
I If the objective function or any functional constraint is nonlinear, it is a
nonlinear IP (NLIP).
I We will focus on linear IP.

OR I: Integer Programming 3 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Personnel scheduling (again)

I We know that United Airline developed an LP to determine the


number of staffs in each of their service locations.
I The same problem is faced by Taco Bell.
I It has more than 6500 restaurants in the US.
I It asks how many staffs to have at each restaurant in each shift.
I Taco Bell developed an Integer Program (i.e., an LP with integer
variables) to solve its workforce scheduling problem.
I The number of staffs is typically small! Rounding is very inaccurate.
I $13 million are saved per year. 1

1 Hueter, J., & Swart, W. (1998). An Integrated Labor-Management System for

Taco Bell. Interfaces, 28(1), 75-91.


OR I: Integer Programming 4 / 45 Ling-Chieh Kung (NTU IM)
Introduction IP formulation Facility location Machine scheduling Vehicle routing

Route selection

I Waste Management Inc. operates an recycling network with 293


landfill sites, 16 waste-to-energy plants, 72 gas-to-energy facilities, 146
recycling plants, 346 transfer stations, and 435 collection depots.
I 20000 routes must be go through by its vehicles in each day.
I How to determine a route?
I Construct a network with nodes and edges.
I Give each edge a binary variable: 1 if included and 0 otherwise.
I Constraints are required to make sure that selected edges are really
forming a route.
I A huge IP is constructed to save the company $498 million in
operational expenses over a 5-year period.2
2 Sahoo, S., Kim, S., Kim, B., Kraas, B., & Popov, A. (2005). Routing

Optimization for Waste Management. Interfaces, 35(1), 24-36.


OR I: Integer Programming 5 / 45 Ling-Chieh Kung (NTU IM)
Introduction IP formulation Facility location Machine scheduling Vehicle routing

Road map

I Introduction to integer programming.


I Integer programming formulation.
I Facility location problems.
I Machine scheduling problems.
I Vehicle routing problems.

OR I: Integer Programming 6 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

The knapsack problem


I We start our illustration with the classic knapsack problem.
I There are four items to select:

Item 1 2 3 4
Value ($) 16 22 12 8
Weight(kg) 5 7 4 3

I The knapsack capacity is 10 kg.


I We maximize the total value without exceeding the knapsack capacity.
I The complete formulation is

max 16x1 + 22x2 + 12x3 + 8x4


s.t. 5x1 + 7x2 + 4x3 + 3x4 ≤ 10
xi ∈ {0, 1} ∀i = 1, ..., 4.

OR I: Integer Programming 7 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Requirements on selecting variables

I Integer programming allows us to implement some selection rules.


I At least/most some items:
I Suppose we must select at least one item among items 2, 3, and 4:

x2 + x3 + x4 ≥ 1.
I Suppose we must select at most two items among items 1, 3, and 4:

x1 + x3 + x4 ≤ 2.

OR I: Integer Programming 8 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Requirements on selecting variables


I Or:
I Select item 2 or item 3:
x2 + x3 ≥ 1.
I Select item 2; otherwise, items 3 and 4 togehter:

2x2 + x3 + x4 ≥ 2.

I If-else:
I If item 2 is selected, select item 3:

x2 ≤ x3 .
I If item 1 is selected, do not select items 3 and 4:

2(1 − x1 ) ≥ x3 + x4 .

OR I: Integer Programming 9 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

At least/most some constraints


I Using a similar technique, we may flexibly select constraints.
I Suppose satisfying one of the two constraints

g1 (x) ≤ b1 and g2 (x) ≤ b2 .

is enough. How to formulate this situation?


I Let’s define a binary variable

0 if g1 (x) ≤ b1 is satisfied,
z=
1 if g2 (x) ≤ b2 is satisfied.
I With Mi being an upper bound of each LHS, the following two
constraints implement what we need:

g1 (x) − b1 ≤ M1 z
g2 (x) − b2 ≤ M2 (1 − z).

OR I: Integer Programming 10 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

At least/most some constraints


I Suppose at least two of the three constraints

gi (x) ≤ bi , i = 1, 2, 3.

must be satisfied. How to play the same trick?


I Let (
1 if gi (x) ≤ bi is satisfied,
zi =
0 if gi (x) ≤ bi may be unsatisfied.
I With Mi being an upper bound of each LHS, the following constraints
are what we need:
gi (x) − bi ≤ Mi (1 − zi ) ∀i = 1, ..., 3
z1 + z2 + z3 ≥ 2.

OR I: Integer Programming 11 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Fixed-charge constraints

I Consider the following example:


I n factories, 1 market, 1 product.
I Ki is the capacity of factory i.
I Ci is unit production cost at factory i.
I D is the demand of the product.
I We want to satisfy the demand with the
minimum cost.
I Setup cost at factory i: Si .
I One needs to pay the setup cost as long
as any positive amount of products is
produced.

OR I: Integer Programming 12 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Basic formulation
I Let the decision variables be
xi = production quantity at factory i, i = 1, ..., n,
(
1 if some products are produced at factory i, i = 1, ..., n,
yi =
0 o/w.

I Objective function:
n
X n
X
min Ci xi + Si yi .
i=1 i=1

I Capacity limitation:
xi ≤ Ki ∀i = 1, ..., n.
I Demand fulfillment:
n
X
xi ≥ D.
i=1

OR I: Integer Programming 13 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Setup costs

I How may we know whether we need to pay the setup cost at factory i?
I If xi > 0, yi must be 1; if xi = 0, yi should be 0.
I So the relationship between xi and yi should be:

xi ≤ Ki yi ∀i = 1, ..., n.

I If xi > 0, yi cannot be 0.
I If xi = 0, yi can be 0 or 1. Why yi will always be 0 when xi = 0?
I Finally, binary and nonnegative constraints:

xi ≥ 0, yi ∈ {0, 1} ∀i = 1, ..., n.

OR I: Integer Programming 14 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Fixed-charge constraints

I The constraint xi ≤ Ki yi is known as a fixed-charge constraint.


I In general, a fixed-charge constraint is

x ≤ M y.

I Both x and y are decision variables.


I y ∈ {0, 1} is determined by x.
I M must be set to be an upper bound of x.
I When x is binary, x ≤ y is sufficient.
I We need to make M an upper bound of x.
I For example, Ki is an upper bound of xi in the factory example. Why?
I What if there is no capacity limitation?

OR I: Integer Programming 15 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Road map

I Introduction to integer programming.


I Integer programming formulation.
I Facility location problems.
I Machine scheduling problems.
I Vehicle routing problems.

OR I: Integer Programming 16 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Facility location problems

I One typical managerial decision is “where to build my facilities?”


I Where to open convenience stores?
I Where to build warehouses or distribution centers?
I Where to build factories?
I Where to build power stations, fire stations, or police stations?
I A similar question is “where to locate a scarce resource?”
I Where to put a limited number of fire engines or ambulances?
I Where to put a limited number of police officers?
I Where to put a limited number of ice cream machines?
I These problems are facility location problems.
I In this lecture, we focus on discrete facility location problems: We
choose a subset of locations from a set of finite locations.

OR I: Integer Programming 17 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Facility location problems


I In general, there are some demand nodes and some potential
locations.
I We build facilities at locations to serve demands.
I E.g., build distribution centers to ship to retail stores.
I E.g., build fire stations to cover cities, towns, and villages.
I Facility location problems are typically categorized based on their
objective functions.
I In this lecture, we introduce three types of facility location problems:
I Set covering problems: Build a minimum number of facilities to cover
all demands.
I Maximum covering problems: Build a given number of facilities to
cover as many demands as possible.
I Fixed charge location problems: Finding a balance between benefit
of covering demands and cost of building facilities.

OR I: Integer Programming 18 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Set covering problems

I Consider a set of demands I and a


set of locations J.
I The distance (or traveling time)
between demand i and location j is
dij > 0, i ∈ I, j ∈ J.
I A service level s > 0 is given:
Demand i is said to be “covered”
by location j if dij < s.
I Question: How to allocate as few
facilities as possible to cover all
demands?

OR I: Integer Programming 19 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Set covering problems


I Let’s define the following parameter:
aij = 1 if dij < s or 0 otherwise, i ∈ I,
j ∈ J.
I Let’s define the following variables:
xj = 1 if a facility is built at location
j ∈ J or 0 otherwise.
I The complete formulation is
X
min xj
j∈J
X
s.t. aij xj ≥ 1 ∀i ∈ I
j∈J

xj ∈ {0, 1}
∀j ∈ J.

I The weighted version: min j∈J wj xj .


P

OR I: Integer Programming 20 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Maximum covering problems

I Consider a set of demands I and a


set of locations J.
I The distances dij , service level s,
and the covering coefficient aij are
also given.
I We are restricted to build at most
p ∈ N facilities.
I Question: How to allocate at most
p facilities to cover as many
demands as possible?

OR I: Integer Programming 21 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Maximum covering problems


I Still let xj = 1 if a facility is built at location j ∈ J or 0 otherwise.
I Also let yi = 1 if demand i ∈ I is covered by any facility or 0 otherwise.
I The complete formulation is
X
max yi
i∈I
X
s.t. aij xj ≥ yi ∀i ∈ I
j∈J
X
xj ≤ p
j∈J

xj ∈ {0, 1} ∀j ∈ J
yi ∈ {0, 1} ∀i ∈ I.

I The weighted version: max i∈I wi yi .


P

OR I: Integer Programming 22 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Fixed charge location problems

I Consider a set of demands I and a


set of locations J.
I At demand i, the demand size is
hi > 0.
I The unit shipping cost from
location j to demand i is dij > 0.
I The fixed construction cost at
location j is fj > 0.
I Question: How to allocate some
facilities to minimize the total
shipping and construction costs?

OR I: Integer Programming 23 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Fixed charge location problems


I We still need xj s: xj = 1 if a facility is built at location j ∈ J or 0
otherwise.
I We now need yij s: yij = 1 if demand i ∈ I is served by facility at
location j ∈ J or 0 otherwise.
I The complete formulation is
XX X
min hi dij yij + fj xj
i∈I j∈J j∈J

s.t. yij ≤ xj ∀i ∈ I, j ∈ J
X
yij = 1 ∀i ∈ I
j∈J

xj ∈ {0, 1} ∀j ∈ J
yij ∈ {0, 1} ∀i ∈ I, j ∈ J.

OR I: Integer Programming 24 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Fixed charge location problems

I The previous model is the uncapacitated version.


I A facility can serve any amount of demand.
I If facility at location j has a limited capacity Kj > 0, we may add the
capacity constraint X
hi yij ≤ Kj ∀j ∈ J.
i∈I

I The capacitated version is usually called the capacitated facility


location problem (abbreviated as CFL). The uncapacitated one is
abbreviated as UFL.

OR I: Integer Programming 25 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Remarks

I When to use set covering?


I When we are required to take care of (almost) everyone.
I E.g., fire stations and police stations.
I When to use maximum covering?
I When budgets are limited.
I E.g., cellular data networks.
I When to use fixed charge location?
I When service costs depends on distances.
I E.g., distribution centers.

OR I: Integer Programming 26 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Road map

I Introduction to integer programming.


I Integer programming formulation.
I Facility location problems.
I Machine scheduling problems.
I Vehicle routing problems.

OR I: Integer Programming 27 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Machine scheduling problems


I In many cases, jobs/tasks must be assigned to machines/agents.
I As an example, consider a factory producing one product for n
customers.
I Serial production: Only one job can be processed at one time.
I Each job has its due date.
I How to schedule the n jobs to minimize the total number of delayed jobs?
I In this example, scheduling is nothing but sequencing.
I Splitting jobs is not helpful.
I There are n! ways to sequence the n jobs.
I Is there a way to formulate this problem (so that a solution may be
obtained by solving the model)?
I The problems of scheduling jobs/tasks to machines/agents are
machine scheduling problems.

OR I: Integer Programming 28 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Machine scheduling problems

I Machine scheduling problems may


be categorized in multiple ways:
I Production mode:
I Single machine serial production.
I Multiple parallel machines.
I Flow shop problems.
I Job shop problems.

OR I: Integer Programming 29 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Machine scheduling problems

I Job splitting:
I Non-preemptive problems.
I Preemptive problems.
I Performance measurement:
I Makespan (the time that all jobs
are completed).
I (Weighted) total completion time.
I (Weighted) number of delayed
jobs.
I (Weighted) total lateness.
I (Weighted) total tardiness.
I And more.

OR I: Integer Programming 30 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing single-machine total completion time

I Consider scheduling n jobs on a single machine.


I Job j ∈ J = {1, 2, ..., n} has processing time pj .
I Different schedules give these jobs different completion times. The
completion time of job j is denoted as xj .
I The machine can process only one job at a time.
I We aim to schedule all the jobs to minimize the total completion time
X
xj .
j∈J

OR I: Integer Programming 31 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing single-machine total completion time


I Let’s use xj to be our decision variables.
I Suppose we schedule jobs 1, 2, ..., and n in this order, we will have
Pn
x1 = p1 , x2 = p1 + p2 , ..., and xn = i=1 pi .
I A Gantt chart is helpful to illustrate a schedule.

I Obviously, splitting jobs does not help for this problem (Why?).
I Because the machine can start job 2 only after job 1 is completed, we
have x2 ≥ x1 + p2 as a constraint. But what if job 2 should be
scheduled before job 1?

OR I: Integer Programming 32 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing single-machine total completion time

I In a feasible schedule, job i is either before or after job j, for all j 6= i.


I Therefore, we need to satisfy at least one of the following two
constraints:
xj ≥ xi + pj and xi ≥ xj + pi .
I Let zij = 1 if job j is before job i or 0 otherwise, i ∈ J, j ∈ J, i < j.
I The constraints we need:

xi + pj − xj ≤ M zij
xj + pi − xi ≤ M (1 − zij ).

I What value of M works?


I How about M =
P
j∈J pj ?

OR I: Integer Programming 33 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing single-machine total completion time


I The complete formulation is
X
min xj
j∈J

s.t. xi + pj − xj ≤ M zij ∀i ∈ J, j ∈ J, i < j


xj + pi − xi ≤ M (1 − zij ) ∀i ∈ J, j ∈ J, i < j
xj ≥ p j ∀j ∈ J
xj ≥ 0 ∀j ∈ J
zij ∈ {0, 1} ∀i ∈ J, j ∈ J, i < j.

I While there is a way to optimize the schedule (how?), the problem


becomes much harder if a job may be processed only after it is released.
I Let Rj be the release time of job j. How to add this into the model?

OR I: Integer Programming 34 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing makespan on parallel machines


I Consider scheduling n jobs on m parallel machines.
I Job j ∈ J = {1, 2, ..., n} has processing time pj .
I A job can be processed at any machine. However, it can be processed
only on one machine.

I Different schedules give these machines different completion times.


I The makespan of a schedule is the maximum completion time.
I How may we minimize the makespan?

OR I: Integer Programming 35 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing makespan on parallel machines


I As long as some jobs are assigned to a machine, the sequence on that
machine does not matter.
I The problem of minimizing makespan is just to assign jobs to
machines.
I Let xij = 1 if job j ∈ J is assigned to machine i ∈ I or 0 otherwise.
I On machine i ∈ I, the last job is completed at
X
pj xij .
j∈J

I The makespan w is the maximum completion time among all machines.


We have X
w≥ pj xij ∀i ∈ I.
j∈J

OR I: Integer Programming 36 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Minimizing makespan on parallel machines

I The complete formulation is

min w
X
s.t. w ≥ pj xij ∀i ∈ I
j∈J
X
xij = 1 ∀j ∈ J
i∈I
xij ∈ {0, 1} ∀i ∈ I, j ∈ J.

I How may we ensure that w is indeed the makespan?

OR I: Integer Programming 37 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Road map

I Introduction to integer programming.


I Integer programming formulation.
I Facility location problems.
I Machine scheduling problems.
I Vehicle routing problems.

OR I: Integer Programming 38 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Vehicle routing problems


I In many cases, we need to deliver/collect items
to/from customers in the most efficient way.
I E.g., consider a post officer who needs to deliver
to four addresses.
I The shortest path between any pair of two
addresses can be obtained.
I This is a routing problem: To choose a route
starting from the office, passing each address
exactly once, and then returning to the office.
I This is a sequencing problem; in total there are
4! = 24 feasible routes.
I Which route minimizes the total distance (or
travel time)?

OR I: Integer Programming 39 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Vehicle routing problems

I The problem described above is the famous


traveling salesperson problem.
I It assumes that the truck has ample capacity.
I Consider the truck towing bicycles in NTU. It
must start at the car pound, pass several
locations in NTU, and then return to the origin.
I However, the truck capacity is quite limited
(because too many people violate the parking
regulation).
I The driver needs to find multiple routes to cover
all the locations.
I The traveling salesperson problem (TSP) is a
special case of vehicle routing problems.

OR I: Integer Programming 40 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Traveling salesperson problem


I How to formulate the TSP into an integer program?
I Let’s consider a directed complete network
G = (V, E).
I There are n nodes and n(n − 1) arcs.
I The arc weight for arc (i, j) is dij > 0.
I We select a few arcs in E to form a tour.
I To form a tour, we need to select n arcs.
I These n arcs should form a cycle passing all nodes.
I Let xij = 1 if arc (i, j) ∈ E is selected or 0 otherwise.
I The objective:
X
min dij xij .
(i,j)∈E

I How to ensure the routing requirement?


X
I Is dij xij = n enough?
(i,j)∈E

OR I: Integer Programming 41 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Traveling salesperson problem

I For node k ∈ V :
I We must select exactly one incoming arc:
X
xik = 1.
i∈V,i6=k

I We must select exactly one outgoing arc:


X
xkj = 1.
j∈V,j6=k

I Now each node is on a cycle.


I However, these are not enough to prevent
subtours.

OR I: Integer Programming 42 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Eliminating subtours: alternative 1

I There are at least two ways to eliminate subtours.


I For each subset of nodes with at least two
nodes, we limit the maximum number of arcs
selected:
X
xij ≤ |S| − 1 ∀S ( V, |S| ≥ 2.
i∈S,j∈S,i6=j

I When we have n nodes, we have 2n − n − 2


constraints.
I 2n ways to choose a subset.
I n ways to choose a subset of one node.
I 2 ways to choose a subset of zero node or n nodes.

OR I: Integer Programming 43 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Eliminating subtours: alternative 2


I Let ui s represent the order of passing nodes. More precisely, ui = k if
node i is the kth node to be passed in a tour.
I We add the following constraints:

u1 = 1
2 ≤ ui ≤ n ∀i ∈ V \ {1}
ui − uj + 1 ≤ (n − 1)(1 − xij ) ∀(i, j) ∈ E, i 6= 1, j 6= 1.

I If xij = 0, there is no constraint for ui and uj ; otherwise, uj must be


larger than ui by at least 1.
I If a tour does not contain node 1, the last constraint pushes those ui s to
infinity and violates constraint 2.
I Note that only node 1 is not restricted by these constraints!
I When we have n nodes, we have n additional variables and
2n − 1 + (n − 1)(n − 2) constraints.

OR I: Integer Programming 44 / 45 Ling-Chieh Kung (NTU IM)


Introduction IP formulation Facility location Machine scheduling Vehicle routing

Complete formulation

I The complete formulation is


X
min dij xij
(i,j)∈E
X
s.t. xik = 1 ∀k ∈ V
i∈V,i6=k
X
xkj = 1 ∀k ∈ V
j∈V,j6=k

xij ∈ {0, 1} ∀(i, j) ∈ E.

with either alternative 1 or alternative 2.


I Which alternative is better?

OR I: Integer Programming 45 / 45 Ling-Chieh Kung (NTU IM)

You might also like