投影片 1

15.053 Tuesday, May 7
• Integer Programming Formulations
Handouts: Lecture Notes
1
Quick Summary of DP
• DP often works for decision making over
time
• Objectives of the past two lectures
– introduce DP recursions
– students should learn
˙how to carry out a DP recursion, given the
optimal value function
˙to understand DP recursions when they
see them
• Note: there is a graduate level subject 6.231
dedicated to
2
Integer Programming Again
• Representing piecewise linear
functions
• A product design & marketing problem
• A configuration problem
• A vehicle routing problem
• Note: about 50% of the final exam will
be a mixture of LP and IP formulations.
3
4
The λ-method (same as in NLP lecture)
subject to adjacency conditions.
• What are the adjacency conditions and
how can one express them using 0-1
variables?
5
The adjacency conditions
• At most two of the λ variables are
nonzero.(How do we express this?)
• If i and j are not adjacent, then it is not
the case that
> 0 and
> 0.
6
Illustration: x = 8 and y = 10
Constraints are satisfied
7
λ method for representing NLP
• represents x as a convex combination
of breakpoints
• represents y as a convex combination
of function values
• adjacency conditions
– enforced using properties of integer
variables
8
Representing non-linear
functions: the δ method.
9
Representing non-linear
functions: the δ method.
10
More on the δ-method
11
Rule: δj = 0 unless δj-1 is at is
upper bound for j > 1.
• Let wj = 0 if δj-1 is not at its upper bound.
w2≤ δ1/4; w3 ≤ δ2/8; w2 , w3 ∈ {0,1}
• Let δj = 0 if wj = 0
0 ≤ δ1 ≤ 4; 0 ≤ δ2 ≤ 8 w2; 0 ≤ δ3 ≤ 4 w3
(this replaces the other upper bounds)
12
Illustration: x = 8 and y = 10
• x = δ1 + δ2 + δ3
• 0 ≤ δ1 ≤ 4; 0 ≤ δ2 ≤ 8 w2; 0 ≤ δ3 ≤ 4 w3
So, δ1 = 4 ; δ2 = 4; δ3 = 0 .
and w2 = 1 ; w3 = 0
• y = 2.5 δ1 + 0 δ2 + 2.5 δ3
and so y = 10
Constraints are all satisfied.
13
δ-method for representing IPs
represents x as a sum of intervals
x = δ1 + … + δk; 0 ≤ δj ≤ uj for each j
represents y using slopes from the intervals
y = a 1δ1 + … + a kδk
cannot use an interval unless the previous
interval is ‘used up’ (λ at its upper bound)
If δj < uj then δj+1 = 0
enforced using properties of integer variables
14
Selecting products optimally for
stocking
A computer manufacturer has 8 different attributes that
can be varied when buying a computer. (RAM
memory size, disk size, computer speed, peripherals,
etc). Taking into account all possibilities, there are
more than 10,000 variations.
Each customer can special order a computer, or can
order from stock. Customers may prefer to order
from stock because it is more convenient, and they
get the computer quicker.
What computers should be stocked? (At most 25
computer configurations will be stocked.)
15
Assumptions for this model
• The computer manufacturer has detailed knowledge
on 1000 random customers
– For each customer i and for each possible
computer configuration j, u(i,j) is the customer’s
utility for selecting j from stock
– u*(i) = utility for person i special ordering
– p(j) is the profit for a purchase of j if j is purchased
from stock (higher than if it is made to order since
one can manufacture more at once
– v(i) is the profit if person i selects a made to order
16
More assumptions
• There is a fixed charge f(j) for stocking
item j
• Company’s goal: maximize profit from
stocking computers: taking into
account revenues not made in special
orders and the fixed charges
17
The integer programming model
• Let x(i,j) = 1 if customer i selects
product j
• Let w(i) = 1 if customer i special orders
• Let y(j) = 1 if product j is stocked
• Work with your partners:
• What is the objective function.
18
What are the constraints?
• Each person selects at most 1 product
• The manufacturer stocks at most 25
different configurations
• A person cannot select product j unless
product j is stocked
• Variables are binary
19
How do we enforce that each person selects
the product with highest utility?
• If item j is stocked, and if u(i,j) > u(i,k),
then person i does not select item k.
• If item j is stocked, and if u(i,j) is
greater than u*(i), then person i does
not do a made to order
20
Please don’t look ahead
21
The model
max Σi,j p(j) x(i,j) + Σi v(i) w(i) - Σj f(j) y(j)
s.t. w(i) + Σj x(i,j) = 1
Σj y(j) ≤ 25
x(i,j) ≤ y(j) for all i, j
x(i,j) ≤ (1 – y(k)) if u(i,j) < u(i,k)
w(i) ≤ (1 – y(k)) if u*(i) < u(i,k)
w(i), x(i,j), y(j) ∈ {0, 1}
22
Comments on the model
• Utilities can be estimated using
“conjoint analysis”
• The problem is widespread
– Where may it come up?
• Any suggestions on variations to
consider?
23
More on Modeling of Integer Programs
• Integer programming can be used
whenever the optimization problem
looking for solutions in n variables and
where the solution can be described in
binary solutions.
• But, some times it takes skill in
transforming problems into an IP
24
Some other areas where IPs are used
• Project management
• Product configuration
• Vehicle routing or packet routing and
scheduling
• Manufacturing
• Finance
25
A Product Configuration
Problem
• Kaya wants to buy a Porsche. There are a
number of possible attributes that can be
varied:
– there are 14 options for color
– one can have 2 door or 4-door
– one can vary the trim
– there are four different stereo systems
– Kaya has specified the utility for each
attribute
– She has a budget of B for the car
26
Notation for the configuration
problem
• Attributes A1, …, AK
• Each attribute has options.
– We write j ∈ Ai if j is an option of Ai.
• u(j) = utility of option j
• Exactly one option of any attribute must be
selected -- occasionally, one of the options is “null”
• There is a set P of pairs. If (i,j) ∈ P, this means that j
must be selected if i is selected.
• We have a set E of exclusions. If (i,j) ∈ E, this means
that one cannot select both i and j.
• There is a budget B for the configuration.
27
Towards a formulation for the
configuration problem
let x(j) = 1 if option j is selected
= 0 if option j is not selected
Maximize Utility
Subject to:
select one option from each attribute
obey precedence constraints
obey exclusion constraints
do not spend more than the budget B
28
A Fleet Routing Problem
•
•
•
•
•
•
Vehicles 1, 2, … , m
qk = capacity of vehicle k
Locations 1, 2, … , n
d(i,j) = distance from location i to location j
Depot D
Each vehicle starts at the depot D and makes
a tour of length at most T
• Each location must be visited by some
vehicle
• Minimize the total distance
29
A vehicle Routing Problem
30
A vehicle Routing Problem
31
Towards a model
• let k be the index for the vehicle
• let
= 1 if vehicle k travels from i to j
= 0 otherwise
• How can we formulate the vehicle
routing problem?
32
Summary
• IP is quite widespread
• can model piecewise linear costs
• can model most problems in which the
solution is integer value
• applications
– marketing
– product configuration
– vehicle routing
33