You are on page 1of 5

Mathematical Programming II

Solutions: Linear Programs Under Uncertainty

May 15, 2012
Note: Only brief answers, not detailed solutions, are provided.
Problem 1 Consider a manufacturer which produces n = 2 products. To manufacture these products,
it needs to order m = 3 dierent types of parts from external suppliers. Various known parameters are:
a
ij
: number of units of part j required for a unit of product i, c
j
: cost of purchase of unit part j, l
i
:
cost of production of unit product i, q
i
: selling price of unit product i, and s
j
: salvage value of unit
part j.
The order for the parts is to be placed before the random demand

d = (

d
1
, . . . ,

d
n
) for the products
is known. After the demand is observed, the manufacturer may decide which portion of the demand
is to be satised. The unsatised demand is lost. The leftover parts are assessed at their respective
salvage values. Assume there are K = 5 demand scenarios, d
1
, . . . , d
K
, formulate the problem to
a) maximize the expected net revenue given the probabilities p
k
for each scenario, and
b) maximize the worst-case net revenue.
Answer. If the demand is known, the problem is a normal deterministic optimization problem. The
decision variables are: x
j
, the number of units of part j that we need to purchase, j = 1, 2, 3, and y
i
,
the number of units of product i we will produce, i = 1, 2. The constraints are:
a
1j
y
1
+ a
2j
y
2
x
j
, j = 1, 2, 3,
and y
i
d
i
for all i = 1, 2. The rst set of constraints indicates that we cannot use more parts than
amounts we purchased. The second set of constraints indicate that we do not need to produce more
than demand. The purchasing cost is
3

j=1
c
j
x
j
, the production cost is l
1
y
1
+ l
2
y
2
. The revenue from
products sold is q
1
y
1
+q
2
y
2
while the revenue from unused parts is
3

j=1
s
j
(x
j
a
1j
y
1
a
2j
y
2
). The prot
or net revenue is then
3

j=1
(s
j
c
j
)x
j
+
_
_
q
1
l
1

j=1
a
1j
_
_
y
1
+
_
_
q
2
l
2

j=1
a
2j
_
_
y
2
1
a) Now the demand is random and there are K = 5 scenarios. We still need to decide the numbers of
units of parts to buy before the demand is realized, which means x
1
, x
2
, x
3
are rst-stage decision
variables. y
1
, y
2
are the second-stage decision variables, which will be decided after the demand
is realized. Thus for each scenario k, k = 1, . . . , 5 with the demand (d
k
1
, d
k
2
), we need a set of
second-stage decision variables (y
k
1
, y
k
2
). Each scenario happens with probability of 1/K = 0.2.
Thus, the expected net revenue is
3

j=1
(s
j
c
j
)x
j
+ 0.2
_
_
5

k=1
_
_
q
1
l
1

j=1
a
1j
_
_
y
k
1
+
_
_
q
2
l
2

j=1
a
2j
_
_
y
k
2
_
_
The nal formulation is
max
3

j=1
(s
j
c
j
)x
j
+ 0.2
_
_
5

k=1
_
_
q
1
l
1

j=1
a
1j
_
_
y
k
1
+
_
_
q
2
l
2

j=1
a
2j
_
_
y
k
2
_
_
s.t. a
1j
y
k
1
+ a
2j
y
k
2
x
j
, j = 1, 2, 3, k = 1, . . . , 5,
y
k
i
d
k
i
, i = 1, 2, k = 1, . . . , 5,
x
j
, y
k
i
0, i = 1, 2, j = 1, 2, 3, k = 1, . . . , 5.
b) Given a rst-stage solution x = (x
1
, x
2
, x
3
), when the demand (d
k
1
, d
k
2
) is realized, the net revenue
can be calculated as follow:
Q
k
(x) =
3

j=1
(s
j
c
j
)x
j
+ max
_
_
q
1
l
1

j=1
a
1j
_
_
y
k
1
+
_
_
q
2
l
2

j=1
a
2j
_
_
y
k
2
s.t. a
1j
y
k
1
+ a
2j
y
k
2
x
j
, j = 1, 2, 3, k = 1, . . . , 5,
0 y
k
i
d
k
i
, i = 1, 2, k = 1, . . . , 5.
The worst-case net revenue is min
k=1,...,5
Q
k
(x). Thus the robust formulation is
max
x0
min
k=1,...,5
Q
k
(x).
Using the approach presented in the lecture note, we can reformulate the problem as follows:
max z
s.t. z Q
k
(x), k = 1, . . . , 5,
x
j
0, j = 1, 2, 3.
Finally, the formulation is
max z
s.t. z
3

j=1
(s
j
c
j
)x
j
+
_
_
q
1
l
1

j=1
a
1j
_
_
y
k
1
+
_
_
q
2
l
2

j=1
a
2j
_
_
y
k
2
, k = 1, . . . , 5,
a
1j
y
k
1
+ a
2j
y
k
2
x
j
, j = 1, 2, 3, k = 1, . . . , 5,
y
k
i
d
k
i
, i = 1, 2, k = 1, . . . , 5,
x
j
, y
k
i
0, i = 1, 2, j = 1, 2, 3, k = 1, . . . , 5.
2

Problem 2 An electricity utility is installing two generators (j = 1, 2) with dierent xed and operating
costs, in order to meet the demand within its service region. Each day is divided into three parts of
equal duration (i = 1, 2, 3). These correspond to parts of the day which demand takes a base, medium,
or peak value. The xed cost per unit capacity of generator j is amortized over its lifetime and amounts
to c
j
per day. The operating cost of generator j during the ith part of the day is f
ij
. If the demand
during the ith part cannot be served due to lack of capacity, additional capacity must be purchased at
a cost of of g
i
. Finally, the capacity of each generator j is required to be at least b
j
.
The demand d
i
is random and can take one of four values, d
i,1
, . . . , d
i,4
with probability p
i,1
, . . . , p
i,4
.
The operating availability (percentage of total capacity) of generator j is random and can take one of
ve values, a
j,1
, . . . , a
j,5
with the probability q
j,1
, . . . , q
j,5
. Formulate the problem to minimize the total
expected cost. How many scenarios do we need to consider and what is the size of the nal problem?
Answer. The rst-stage decision variables that we need to decide before the realization of the demands
are the capacity x
1
, x
2
of two generators. Clearly, x
j
b
j
for j = 1, 2. After the realization of the
demand, we need to decide the operating capacity of each generator in each part of the day, y
ij
. If the
operation availability a
1
and a
2
are known, the constraint we need is y
ij
a
j
x
j
for all i = 1, 2, 3, and
j = 1, 2. We also need to decide the additional capacity to be purchased, z
i
, i = 1, 2, 3. If the demand
d
1
, d
2
, d
3
are known, the constraint is y
i1
+ y
i2
+ z
i
d
i
for i = 1, 2, 3.
The total cost is
2

j=1
c
j
x
j
+
2

j=1
3

i=1
f
ij
y
ij
+
3

i=1
z
i
. Now, since the demands are random, the operating
availabilities are random and we assume that they are independent, the total number of scenarios is
K = 4
3
5
2
. For each scenario , i.e., a particular value set of (d

i
, a

j
), we can calculate its probability
p

using appropriate values of p

i
and q
j
. For each scenarios , we then need to have a set of second-stage
decision variables (y

ij
, z

i
). The expected cost is
2

j=1
c
j
x
j
+
K

=1
p

_
_
2

j=1
3

i=1
f
ij
y

ij
+
3

i=1
z

i
_
_
.
The nal formulation is
min
2

j=1
c
j
x
j
+
K

=1
p

_
_
2

j=1
3

i=1
f
ij
y

ij
+
3

i=1
z

i
_
_
s.t. x
j
b
j
, j = 1, 2,
y

ij
a

j
x
j
, j = 1, 2, = 1, . . . , K,
y

i1
+ y

i2
+ z

i
d

i
, i = 1, 2, 3, = 1, . . . , K,
x
j
, y

ij
, z

i
0, i = 1, 2, 3, j = 1, 2, = 1, . . . , K,
The size of the problem (number of decision variables and number of constraints) can be calculated
from the number of scenarios and the structure of the problem.
Problem 3 Consider the random linear constraint
n

j=1
a
ij
x
j
b
i
where a
ij
are random parameter.
Assume that a
ij
belongs to the uncertainty interval [a
ij
a
ij
, a
ij
a
ij
], or equivalently | a
ij
a
ij
| a
ij
for all j = 1, . . . , n. In addition, the total variation from nominal values are bounded,
n

j=1
| a
ij
a
ij
| r.
3
Formulate the robust counterpart for this random constraint.
Answer. The uncertainty set is
U =
_
_
_
a
i
R
n
:
n

j=1
| a
ij
a
ij
| r, | a
ij
a
ij
| a
ij
, j = 1, . . . , n
_
_
_
,
where r, a
ij
and a
ij
are parameters, j = 1, . . . , n. The robust counterpart is
_
_
max
a
i
U
n

j=1
a
ij
x
j
_
_
b
i
.
The optimization problem on the left-hand side has a
i
as the decision variables. We can change the
decision variables to z = a
i
a
i
. The objective is
n

j=1
a
ij
x
j
+
n

j=1
z
j
x
j
, of which the rst part is
independent of z and the optimization problem can be written as follows
max
z
n

j=1
z
j
x
j
s.t. |z
j
| a
ij
, j = 1, . . . , n,
n

j=1
|z
j
| r.
By introducing y
j
to represent |z
j
| for all j = 1, . . . , n, the second constraint can be written as
n

j=1
y
j
r
with additional constraints y
j
z
j
and y
j
z
j
for all j = 1, . . . , n. Thus we obtain the equivalent
linear optimization problem:
max
z,y
n

j=1
z
j
x
j
s.t. z
j
a
ij
, j = 1, . . . , n,
z
j
a
ij
, j = 1, . . . , n,
z
j
y
j
0, j = 1, . . . , n,
z
j
y
j
0, j = 1, . . . , n,
n

j=1
y
j
r.
The dual problem is
min
n

j=1
(p
+
j
+ p

j
) a
ij
+ rs
s.t. (p
+
j
p

j
) + (q
+
j
q

j
) = x
j
, j = 1, . . . , n,
(q
+
j
q

j
) s = 0, j = 1, . . . , n,
p
+
j
, p

j
, q
+
j
, q

j
0, j = 1, . . . , n.
Applying the argument in the lecture note, we can replace the minimum solution by any feasible solution
and the set of equivalent linear constraints to the robust constraint is as follows with additional decision
4
variables p
+
, q
+
, and s:
n

j=1
a
ij
x
j
+
n

j=1
(p
+
j
+ p

j
) a
ij
+ rs b
i
(p
+
j
p

j
) + (q
+
j
q

j
) x
j
= 0, j = 1, . . . , n,
(q
+
j
q

j
) s = 0, j = 1, . . . , n,
p
+
j
, p

j
, q
+
j
, q

j
0, j = 1, . . . , n.

Problem 4 We again consider the random linear constraint

n

j=1
a
ij
x
j
b
i
where a
ij
are random
parameter. Assume that a
ij
are independent normal random variables for all j = 1, . . . , n with mean
a
ij
and variance
2
ij
. Formulate the chance constraint such that the infeasibility probability of the given
random linear constraint is no more than
i
.
Answer. The chance constraint is
P
_
_
n

j=1
a
ij
x
j
> b
i
_
_

i
.
a
ij
are independent normal random variables for all j = 1, . . . , n; therefore,

d
i
=
n

j=1
a
ij
x
j
is also a
normal random variable with the mean d
i
=
n

j=1
a
ij
x
j
and the variance
2
d
=
n

j=1

2
ij
x
2
j
. Similar to
the lecture notes, we can transform the chance constraint to the standard normal random variable
z
i
=

d
i
d
i

d
:
P
_
z
i
>
b
i
d
i

d
_

i
.
Using the table, we can nd the value z(
i
) such that P( z
i
> z(
i
)) =
i
and the chance constraint is
equivalent to the constraint
b
i
d
i

d
z(
i
)
n

j=1
a
ij
x
j
+ z(
i
)

_
n

j=1

2
ij
x
2
j
b
i
.
Note that the nal constraint is not a linear constraint, which shows that in this case, the chance
constraint is more dicult that the original (deterministic) linear constraint.
5