Babul Chapter 2 SP vs DP New
Babul Chapter 2 SP vs DP New
Operations research has been particularly successful in two areas of decision analysis:
(i) Deterministic optimization: optimization of problems involving many variables when the
outcome of the decisions can be predicted with certainty, and
(ii) Stochastic optimization: the analysis of situations involving a few variables when the
outcome of the decisions cannot be predicted with certainty.
Deterministic Solution:
The optimization algorithm determines the best solution given the parameters of the model. The
modeling and decision analysis process is illustrated in Fig. 1 where the shape labeled situation
represents the real problem under consideration. Various assumptions and abstractions are applied,
including the assumption of deterministic information, to obtain a mathematical model. The model
is input to a computer where an algorithm determines the optimal decision, represented by the
vector x.
Algorithm
23-Dec-20 Dr. Mohammad Babul Hasan
Figure 1: The deterministic approach to decision making
Deterministic Model: LP
Max / Min Z cT x
subject to
Ax B
x0
• The fault with this approach is that the decision x is optimum for the model and not the
situation.
• It is usually readily apparent to the manager with the task of implementing the decision, that
x is not at all appropriate for application to the situation.
• The primary reason for this lies in the assumption of deterministic parameters.
• When the situation involves uncertainty or risk, the kind of decision taken is quite different
than if it does not.
• Real decision makers hedge against various possible futures.
The company is responsible for delivering energy to households based on their demand.
The problem could be solved as an LP with constraints based on demand from households.
But
future demand of households is not always known and is likely dependent on factors such
as the weather and time of year.
Therefore, there is uncertainty and the basic LP model will not be sufficient.
Max / Min Z cT x
subject to
Ax B
T x H
x0
h1
h 2
H .
.
hl
23-Dec-20 Dr. Mohammad Babul Hasan
This problem can be formulated according to:
Max / Min Z c T x Q x
subject to
Ax B
T x H
x x1 , x 2 , .... x n 0
Here Q x E Q x ,
y 1 y 2 10 , VARIABLE VALUE RC
1 * x1 3 x 2 14 X1 14.0000 0.000
X2 0.000000 5.000000
x1 , x 2 , y 1 , y 2 0 Y1 10.000000 0.000000
Y2 0.000000 2.000000
Scenario-3 Max Z 0 .7 * 5 x1 10 x 2 4 y 1 6 y 2 OBJECTIVE FUNCTION VALUE
subject to 1) 30.00000
y1 y 2 10 ,
VARIABLE VALUE RC
0 .7 * x1 3 x 2 14 X1 20.000000 0.000000
X2 0.000000 3.500000
x1 , x 2 , y 1 , y 2 0
Y1 10.000000 0.000000
Y2 0.000000 2.000000
1 1 1
Max Z 1 .5 * 5 x11 10 x 21 1 * 5 x12 10 x 22 0 .7 * x13 x 23 4 y1 6 y 2
3 3 3
subject to
y 1 y 2 10 ,
1 .5 * x11 3 x 21 14
1 * x12 3 x 22 14
0 .7 * x13 3 x 23 14
x11 , x12 , x13 , x 21 , x 22 , x 23 , y 1 , y 2 0
1) 30.00533
With his (optimal) “here-and-now” decision of (y1 = 10, y2 = 0), the long run profit is $ 30.005
This difference (30-30.005) = - 0.005 is the expected value of perfect information(EVPI)
EVPI: Expected value of perfect information(EVPI) measures the value of knowing the future with certainty.
In some situations, where more information might be available through more extensive forecasting, sampling, or
exploration. In these cases, EVPI would be useful for deciding whether to undertake additional efforts.
Consider a farmer specializes in raising wheat, corn, and sugar beets on his 500 acres of land. During the winter, he wants to
decide how much land to devote to each crop. The farmer knows that at least 200 tons (T) of wheat and 240 T of corn are
needed for cattle feed. These amounts can be raised on the farm or bought from a wholesaler. Any production in excess of the
feeding requirement would be sold. Over the last decade, mean selling prices have been $170 and $150 per ton of wheat and
corn, respectively. The purchase prices are 40% more than this due to the wholesaler’s margin and transportation costs. Another
profitable crop is sugar beet, which he expects to sell at $36/T; however, there is a quota restriction on sugar beet production.
Any amount in excess of the quota can be sold only at $10/T. The farmer’s quota for next year is 6000 T. Based on past
experience, the farmer knows that the mean yield on his land is roughly 2.5 T, 3 T, and 20 T per acre for wheat, corn, and sugar
beets, respectively.
Table 1 summarizes these data and the planting costs for these crops.
Wheat Corn Sugar Beets
Yield (T/acre) 2.5 3 20
Planting cost ($/acre) 150 230 260
Selling price ($/T) 170 150 36 under 6000 T
Purchase price ($/T) 238 210 10 above 6000 T
Minimum 200 240 -
requirement (T) -
Crop yields are uncertain, depending upon weather conditions during the growing season.
Three scenarios have been identified ("good", "fair", and "bad"), each equally likely.
In this data only the yield are scenario-dependent, while in the reality the purchase prices and sales revenues
from gain would be higher in year with poor yield.
subject to
After solving the above problem, the farmer obtains an optimal solution, as in Table below.
OBJECTIVE FUNCTION VALUE
Culture Wheat Corn Sugar Beets
1) -118600.0
Surface (acres) 120 80 300
Yield (T) 300 240 6000 VARIABLE VALUE REDUCED COST
X1 120.000000 0.000000
Sales (T) 100 - 6000 X2 80.000000 0.000000
Purchase (T) - - - X3 300.000000 0.000000
Y1 0.000000 68.000000
Overall profit: $118,600 W1 100.000000 0.000000
Y2 0.000000 41.666668
W2 0.000000 18.333334
W3 6000.000000 0.000000
Yields: Wheat =120*2.5=300 T W4 0.000000 16.750000
Does this mean that the farmer's expected revenues will actually be 118600?
A first possibility is to assume some correlation among the yields of the different crops as good, fair, or bad for all crops,
resulting in above average, average, or below average yields for all crops.
Let “above” and “below” average indicate a yield 20% above or below the mean yield.
The farmer wishes to know whether the optimal solution is sensitive to variations in yields.
Again, the solutions in Tables 3 and 4 seem quite natural. The optimal solution is very sensitive to changes in yields.
• The optimal surfaces devoted to wheat range from 100 acres to 183.33 acres.
• Those devoted to corn range from 25 acres to 80 acres and
• those devoted to sugar beets from 250 acres to 375 acres.
• The overall profit ranges from $59,950 to $167,667.
Long-term weather forecasts would be very helpful here. Unfortunately, as even meteorologists agree, weather conditions
cannot be accurately predicted six months ahead.
The farmer must make up his mind without perfect information on yields.
The main issue here is clearly on sugar beet production. Planting large surfaces would make it certain to produce and sell the
quota, but would also make it likely to sell some sugar beets at the unfavorable price. Planting small surfaces would make it
likely to miss the opportunity to sell the full quota at the favorable price.
The farmer now realizes that he is unable to make a perfect decision that would be best in all circumstances.
He would, therefore, want to assess the benefits and losses of each decision in each situation.
Decisions on land assignment (x1, x2, x3) have to be taken now,
but sales and purchases (wi, i = 1, . . . ,4, y j, j = 1,2) depend on the yields.
Use a scenario index s = 1,2,3 corresponding to above average, average, or below average yields, respectively.
This creates a new set of variables of the form wis, i = 1,2,3,4 , s = 1,2,3 and yjs , j = 1,2 , s = 1,2,3 .
As an example, w32 represents the amount of sugar beets sold at the favorable price if yields are average.
Assuming the farmer wants to maximize long-run profit, it is reasonable to seek a solution that maximizes his expected profit.
This assumption means that the farmer is neutral about risk.
If the three scenarios have an equal probability of 1/3 , the farmer’s problem reads as follows:
1
238 y12 170 w12 210 y 22 150 w 22 36 w32 10 w 42
This model of stochastic decision program is known as the
3 extensive form of the stochastic program because it explicitly
1 describes the second-stage decision variables for all scenarios.
238 y13 170 w13 210 y 23 150 w 23 36 w33 10 w 43
3
subject to
Scenario 1: Land constraint: x1 x 2 x 3 500
Wheat constraint: 3 x1 y11 w11 200
Corn constraint: 3 .6 x 2 y 21 w21 240
Sugar beet constraint: w31 w 41 24 x 3
Quota constraint: w 31 6000
Scenario 2: Wheat constraint: 2 .5 x1 y12 w12 200
Corn constraint: 3 x 2 y 22 w 22 240
Sugar beet constraint: w 32 w 42 20 x 3
Quota constraint: w 32 6000
Scenario 3: Wheat constraint: 2 x1 y13 w13 200
Corn constraint: 2 . 4 x 2 y 23 w 23 240
Sugar beet constraint: w33 w 43 16 x 3
Quota constraint: w 33 6000
23-Dec-20 w k 0 Babul Hasan
x i , yDr.j ,Mohammad
LP OPTIMUM FOUND AT STEP 0
1) -108390.2
With perfect information, Farmer Ted’s would plant (wheat, corn, beans).
* Good yield: (183.33, 66.67, 250), Profit: $167,667
* Average yield: (120, 80, 300), Profit: $118,600
* Bad yield: (100, 25, 375), Profit: $59,950
Assuming each of these scenarios occurs with probability 1/3, his long run average profit would be
(1/3)(167667) + (1/3)(118600) + (1/3)(59950) = 115406
With his (optimal) “here-and-now” decision of (170, 80, 250), he would make a long run profit of 108390
The difference (115406-108390) = 7016 is the expected value of perfect information(EVPI)
Scenario 1: Pop-Donuts has a tight capital budget for only $15,000 of flour costs and 10,000 labor hours annually. The
flour for donuts costs $0.5 per a dozen donuts and $1.2 per cake.
Scenario 2: Pop-Donuts has a modest capital budget for $17,000 of flour costs and 10,000 labor hours annually. The
flour for donuts costs $0.6 per a dozen donuts and $1.3 per cake.
Scenario 3: Pop-Donuts has a very good capital budget for $20,000 of flour costs and 10,000 labor hours annually.
The flour for donuts costs $0.7 per a dozen donuts and $1.4 per cake.
ROW SLACK OR SURPLUS DUAL PRICES ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 3.750000 2) 0.000000 2.727273
3) 0.000000 4.500000
3) 0.000000 5.454545
4) 15000.000000 0.000000
5) 6250.000000 0.000000 4) 14545.454102 0.000000
5) 6363.636230 0.000000
NO. ITERATIONS= 0
NO. ITERATIONS= 1
1) 102857.1
VARIABLE VALUE REDUCED COST
X1 17142.857422 0.000000
X2 5714.285645 0.000000
NO. ITERATIONS=
23-Dec-20 0 Dr. Mohammad Babul Hasan
Solutions to these problems are shown bellow.
Z c T x p q y
T
Max / Min
subject to
Ax B
W y H T x
x x1 , x 2 , .... x n 0, y 0
This discrete SLP model is hence converted to a larger DLP model. LP methods can then be
applied to solve this question.
1) 100579.1
NO. ITERATIONS= 1
With perfect information, Farmer Ted’s would plant (wheat, corn, beans).
* Scenario-1: (15000, 6250), Profit: $101250
* Scenario-2: (14545.45, 6363.63), Profit: $100909.1
* Scenario-3: (17142.85, 5714.28), Profit: $102857.1
Assuming each of these scenarios occurs with probability 1/3, his long run average profit would be
(1/3)(101250) + (1/3)(100909.1) + (1/3)(102857.1) = 101672.07
With his (optimal) “here-and-now” decision, he would make a long run profit of 100579.1
This difference (101672.07 – 100579.1) = 1092.97 is the expected value of perfect information(EVPI)
Uniform: U[1,n]
n 1 n2 1
n 0 with E
1
P i , i 1, 2 ,..., n , and Var
n 2 12
Binomial: Bi(n, p)
n i
P i p 1 p , 0 p 1 1 with E np and Var np 1 p
n i
i 0,1, 2,..., n ,
i
Poisson: P
i
P i e
, 0, i 0,1,.... 1 with E and Var
i!
Uniform: U 0 , a
a2
a 0 with E a and Var
1
f , 0 a,
a 12
Exponential: exp
2
1
0 with E
1
f e
, 0 , and Var
Normal: N , 2
2
0 with E and Var
1
f 2 2 2
e ,
2 2
Gamma: G ,
1
f 1
e
, , 0 where x
1
e x dx , 0 with E and
2
0
Var 2
Continuous random variables can often be described through a so-called density function f (ξ ) .
b
or equivalently P(a ≤ ξ ≤ b) = dF
a
where F(·) is the cumulative distribution as earlier. Contrary to the discrete case, the probability of a
single value P(ξ = a) is always zero for a continuous random variable. The distribution F(·) must be
such that d F 1
k K
The expectation of a random variable in continuous case is computed as d F .
The variance of a random variable is E[(ξ−μ)2] . The expectation of ξr is called the rth moment
of ξ and is denoted ¯ξ(r) = E[ξr ] . A point η is called the α -quantile of ξ if and only if for 0 <α < 1,
η = min{x | F(x) ≥α} .
The values of f(x) at the two boundaries a and b are usually unimportant because they do not alter the
values of the integrals of f(x) dx over any interval, nor of x f(x) dx or any higher moment. Sometimes
1
they are chosen to be zero, and sometimes chosen to be . The latter is appropriate in the context
ba
of estimation by the method of maximum likelihood. In the context of Fourier analysis, one may take
1
the value of f(a) or f(b) to be ,since then the inverse transform of many integral transforms of
2 b a
this uniform function will yield back the function itself, rather than a function which is equal "almost
everywhere", i.e. except on a set of points with zero measure. Also, it is consistent with the sign
function which has no such ambiguity.
Mean 1
a b
2
Median 1
a b
2
Mode any value in a, b
Variance 1
b a 2
12
23-Dec-20 Skewness 0 Dr. Mohammad Babul Hasan
For Exponential distribution
The probability density function (pdf) of an exponential distribution is
e x , x0
f x;
0, otherwise
Here λ > 0 is the parameter of the distribution, often called the rate parameter. The distribution is
supported on the interval [0, ∞). If a random variable X has this distribution, we write X ~ Exp(λ).
The exponential distribution exhibits infinite divisibility.
1 e x , x0
f x;
0, otherwise
x0
f x;
e ,
0, otherwise
The mean is the probability mass centre, the first moment. The median is the preimage F−1(1/2).
!n n! n
1k
The central moments of X, for n are given by n
n
n k!
where !n is
k 0
subfactorial of n
ln 2
The median of X is given by m X E X . Thus the absolute difference between the mean
1 ln 2 1
and median is E X mX X in accordance with the median-mean inequality.
23-Dec-20
Dr. Mohammad Babul Hasan
Parameters 0, rate, inverse scale
Support x 0 ,
PDF e x , x0
f x;
0, otherwise
CDF 1 e x , x0
f x;
0, otherwise
Quantile ln 1 p
Mean 1
EX
Median ln 2
Mode 0
Variance 1
V X
2
Skewness 2
Ex. kurtosis 6
Entropy 1 ln
MGF
, t
23-Dec-20 Mohammad
Dr. t Babul Hasan