Você está na página 1de 10

INSTITUT OF TECHNOLOGY

DEPARTMENT OF CIVIL AND WATER


RESOURCE ENGINEERING
(HYDRAULICS)

Water resource systems: planning and management


Assignment One

Submitted by: Getachew Kefyalew


ID Number: Scwre/Hylc/Sum/0041/03
Submitted to: Dr. Dereje
SOLUTIONS

#1) Maximize f(x) = -x12-x22 =

Subject to: - x1+x2 = 4

2x1+x2 ≥ 5

Solution:-check convexity and concavity using eigen values


of Heissein matrix

d2f/dx12 =-2 , d2f/dx22 =-2 , d2f/dx1dx2 = 0, d2f/dx2dx1 = 0


−𝟐 𝟎 𝛌+𝟐 𝟎
H[f(x)] = | | , [λI-H]= | |
𝟎 −𝟐 𝟎 𝛌+𝟐
 λ1 = -2 & λ2= -2 all -ve so f(x) is concave function.

This concave function can be changed to its equivalent


Maximization problem to apply KUHN TRUCKER criteria.

Maximize f(x) = -x12 – x22


Subjected to:- x1+x2-4=0;
-2x1 - x2<= 0; -2x1-x2-5+s2 = 0
Now applying Lagarangian multiplier:
L [X, λ,s] = f(x) - λ1g1 -λ2g2
L [X, λ,s]= -x12 - x22 - λ1(x1 +x1 - 4) - λ2(-2x1 - x2 - 5 + s12)

∂L/∂x1 = -2x1- λ1+2λ2 = 0


∂L/∂x2 = -2x2 - λ1 + λ2 = 0
∂L/∂λ1= -x1 - x2 + 4 = 0
∂L/∂λ2 = 2x1 + x2 +5 - S12 = 0
∂L/∂S1 = -2λ2S1 = 0 ; either λ2 or s1 is zero
Case 1.
λ2 = 0 the x1 = 2, x2 = 2; s12 = 11 (possible value);
Therefore X = (2,2) is the optimal solution.
F(x)=-8 is maximum at X=(2,2)........Ans.

This can be solved by using excel solver


Maximization optimization
input
x1 x2 function limits
Objective -8
cons1 1 1 4 4
cons2 2 1 7 5
solution x1 x2
2 2
Therefore the maximum value of f(x) is -8 at x1=2and x2=2

#2) Minimize f(x) = 5x12 + x22 +4

Subject to: - x2 - 4 ≥ -4x1

x2+3 ≥ 2x1

Solution

Checking convexity and concavity as usual we have


the following:-

D2f/dx12 =10 ; d2f/dx22 =2 ; d2f/dx1dx2=0 ; d2f/dx2dx1 =0

H[f(x)]= |𝟏𝟎 𝟎| ; [λI-H]= |𝛌 − 𝟏𝟎 𝟎


|=0
𝟎 𝟐 𝟎 𝛌−𝟐

 λ1 = 10 & λ2= 2 all +ve so f(x) is convex function


This concave function can be changed to its equivalent
maximization problem to apply Kuhn Trucker as follows:-

Maximize [-f(x)] = -5x12 - x22 – 4


Subject to: - -x2 - 4x1 + 4 ≤ 0; -x2 - 4x1 + 4 + s12 = 0

-x2 - 2x1 + 3 ≤ 0 ; -x2 - 2x1 + 3 + s22 = 0

Now applying Lagrangian multiplier

L [X, λ,s] = [-f(x)] - λ1g1 -λ2g2


L [X, λ,s]= -5x 1
2
- x22 - 4 - λ1(-x2 - 4x1 + 4 + s12 )- λ2(-x2 - 2x1 + 3
+ s 2 2)

∂L/∂x1 = -10x1+ 4λ1+2λ2 = 0


∂L/∂λ1= 4x1+x2 - s12-4 = 0
∂L/∂λ2 = 2x1 + x2 - 3 - S22 = 0
∂L/∂S1 = -2λ1S1 = 0 ; either λ1 or s1 is zero
∂L/∂S2 = -2λ2S2 = 0; either λ2 or s1 is zero
i) λ1, λ2 = 0 then x1 = 0 ; x2 = 0 ; s12 =-4 ; s22 = -3 (not possible )
ii) λ1, s2 = 0 then x1=2/3, x2= 5/3, λ2 = 10/3; s12= 1/3
so, X = (2/3,5/3) is optimal solution.
f(x) = 9 at X= (2/3,5/3) is a minimum
-f(x) = -9 at X = (2/3, 5/3) is a maximum............Ans.

#3) Given: Two types of crops A & B

Selling price of unit quantity of crop - A = PA


Selling price of unit quantity of crop - B = PB
crop Units of Units of Units of Units of
name water land fertilizer labour
CROP A WA LA FA HA
CROP B WB LB FB HB

Available quantities : WA+WB ≤ W

LA + L B ≤ L

FA+FB ≤ F

HA +HB ≤ H

Maximize total income?


Solution:- a) develop a linear programing model to Maximize
total income.
let, X1 = total quantity of crop – A
X2 = total quantity of crop - B
Z = Total income gained by selling crop - A & crop-B
The objective function is to maximize the total income, i.e
OF Z = PAX1 + PBX2

The constraints are:- WA*X1+WB*X2 ≤ W

LA*X1 + LB*X1 ≤ L

FA*X1+FB*X2 ≤ F

HA*X1 +HB*X2 ≤ H

 Therefore, the LP-model is:-


Maximize Z = PAX1 + PBX2

Subject to: WA*X1+WB*X2 ≤ W

LA*X1 + LB*X1 ≤ L

FA*X1+FB*X2 ≤ F

HA*X1 +HB*X2 ≤ H

x1,x2 ≥0

b) solve the problem graphically using the following data ?

Requirments per unit


of maximam
Resource available
crop-A crop-B resource
water 2 3 60
Land 5 2 80
Fertilizer 3 2 60
Labour 1 2 40
unit price 30 25

Maximize Z = 30X1 + 25X2

Subject to:- 2*X1+3*X2 ≤ 60

5*X1 + 2*X2 ≤ 80

3*X1+2*X2 ≤ 60
X1 +2*X2 ≤ 40

X1,x2 ≥0

C1 C2 C3 C4

X1 X2 X1 X2 X1 X2 X1 X2
0.0 20.0 0.0 40.0 0.0 30.0 0.0 20.0
3.0 18.0 1.0 37.5 1.0 28.5 5.0 17.5
6.0 16.0 2.0 35.0 2.0 27.0 10.0 15.0
10.9 12.7 4.0 30.0 5.0 22.5 15.0 12.5
15.0 10.0 6.0 25.0 8.0 18.0 20.0 10.0
18.0 8.0 8.0 20.0 12.0 12.0 25.0 7.5
21.0 6.0 10.9 12.7 14.0 9.0 30.0 5.0
24.0 4.0 12.0 10.0 16.0 6.0 35.0 2.5
27.0 2.0 14.0 5.0 18.0 3.0 38.0 1.0
30.0 0.0 16.0 0.0 20.0 0.0 40.0 0.0

45.0

40.0

35.0

30.0
C2
25.0
C1
X2

20.0
C3
15.0 C4

10.0

5.0

0.0
0.0 10.0 20.0 30.0 40.0 50.0
X1
 Taking all the constraints in to account, the feasible
region will be the area bounded by corner points formed
by each line intersections as shown on the graph above.
And the optimal value can be found at those corners
i.e.

Z,at X = (0,0) = 0

Z,at X = (16,0) = 480

Z,at X = (10.91,12.73) = 645.55

Z,at X = (0,20) = 500

 Therefore the point X = (10.91, 12.73) which is read on


the graph represents the optimal solution. And the
maximum income that can be gained by selling 10.91
quantity of crop A and 12.73 quantity of crop B is
calculated to be 645.55 units.

C) Dual Model
Maximize Z = PAX1 + PBX2
Subject to: - WA*X1+WB*X2 ≤ W
LA*X1 + LB*X1 ≤ L
FA*X1+FB*X2 ≤ F
HA*X1 +HB*X2 ≤ H
x1,x2 ≥0
The Dual Model of this problem can be written and
interpreted as follows:-

Minimize Z =W*Y1 + L*Y2 + F*Y3 + H*Y4

Subject to: - WA*Y1 + LA*Y2 + FA*Y3 + HA*Y4 ≥ PA

WB*Y1 + LB*Y2 + FB*Y3 + HB*Y4 ≥ PB

Y1, Y2, Y3, Y4 ≥ 0


Minimize Z = 60*Y1 + 80*Y2 + 60*Y3 + 40*Y4

Subject to: - 2*Y1 + 5*Y2 + 3*Y3 + Y4 ≥ 30

3*Y1 + 2*Y2 + 2*Y3 + 2*Y4 ≥25

 The primal model was to maximize profit within the


given unit price for each crop type where as the dual
minimizes the use of available resource i.e. minimizing
cost keeping unit price constraints of Y1, Y2, Y3 & Y4
which are water, land, fertilizer and labour
requirements respectively.
D) Solution using solver

Maximize Z = 30X1 + 25X2

Subject to: - 2*X1+3*X2 ≤ 60

5*X1 + 2*X2 ≤ 80

3*X1+2*X2 ≤ 60

X1 +2*X2 ≤ 40
x1,x2 ≥0

X1 X2 Limits
10.909 12.727

OF 645.45
Con1 60.00 LE 60
Con2 80.00 LE 80
Con3 58.18 LE 60
Con4 36.36 LE 40

E) Solving using GAMS

Minimize Z = 60*Y1 + 80*Y2 + 60*Y3 + 40*Y4

Subject to: - 2*Y1 + 5*Y2 + 3*Y3 + Y4 ≥ 30

3*Y1 + 2*Y2 + 2*Y3 + 2*Y4 ≥25


Y1 Y2 Y3 Y4
5.91 3.64 0 0

OF 645.45
Con1 30 GE 30
Con2 25 GE 25

#4) Solution 1 3

The net benefits derived from each user are as follows:

 For user 1: 6X1t – X1t2


 For user 2: 7X2t – 1.5X22
 For user 3: 8X3t – 0.5X32t
Average inflows to the reservoir in each of the 4 seasons of
the year are; 10, 2, 8 and 12

 Reservoir capacity = k = 5
 2 ≤ release ≤ 8
 Initial storage, Si = 0

Using dynamic programming, we find the optimum operating


policy i.e. the economic release of the reservoir during the
four seasons.

Tracing back

R1* = 6 and S1’ = 0 or 1

So S2’ = S1’ + Q1 - R1*

= 0 + 10 – 6 = 4 or = 1 + 10 – 6 = 5

R2* from table of S2 is R2* = 4 or 6

So S3’ = S2’ + Q2 - R2* = 4 + 2 - 4 or 4 + 2 - 6 = 2 or 0

And 5 + 2 - 4 or 5 + 2 – 6 = 3 or 1

Tracing back

R1* = 8 and S1’ = 2 or 3, then

S2’ = S1’ + Q1 - R1* = 2 + 10 - 8 or 3 + 10 – 8 = 4 or 6

R2* = 6, from table of S2, and

S3’=S2’+Q2-R2* = 4 + 2 - 6 or 5 + 2 – 6 = 0 or 1

R3* = 8 and S4’ = S3’ + Q3 - R3* = 0 + 8 – 8 or 1+8-8=0 or 1

R4* = 8, R3* = 8, R2* = 6, and R1* = 8

Você também pode gostar