You are on page 1of 26

INDIAN 

INSTITUTE OF SCIENCE

Water Resources Systems:


Modeling Techniques and Analysis
Lecture - 7
Course Instructor : Prof. P. P. MUJUMDAR
Department of Civil Engg., IISc.

1
Summary of the previous lecture
• Function with equality constraints
• Lagrange multipliers Necessary condition:
m L L
L  f  X   j g j  X   0; 0
j 1
xi  j
Sufficiency condition: D 0
2L g j  X 
Lij  ; g ji 
• Function with inequality constraints xi x j
X *
, * 
xi X*

Minimize f(X)
s.t.
gj(X) < 0 j = 1, 2, ….. m
f m g j
Kuhn – Tucker conditions:   j  0 i = 1, 2, ….. n
xi j 1 xi
j g j  0
gj  0 j = 1, 2, ….. m
j  0
2
Example – 1
Maximize

f  X    x12  x22  4 x1  4 x2  8
s.t.
K-T conditions
x1  2 x2  4 g j
f 2
 j 0
2 x1  x2  5 xi j 1 xi
i = 1, 2
j g j  0
gj  0 j = 1, 2
j  0

3
Example – 1 (Contd.)
Let f  X    x12  x22  4 x1  4 x2  8
g1  X   x1  2 x2  4

g 2  X   2 x1  x2  5

K-T conditions
f 2 g j
 j 0 i = 1, 2
xi j 1 xi

f g1 g 2
 1  2 0
xi xi xi

4
Example – 1 (Contd.)
g1  X   x1  2 x2  4
g1 g1
 1; 2
x1 x2

g 2  X   2 x1  x2  5
g 2 g 2
 2; 1
x1 x2

5
Example – 1 (Contd.)
f  X    x12  x22  4 x1  4 x2  8
f g1 g 2
 1  2 0 g1
 1;
g1
2
x1 x1 x1 x1 x2
g 2 g 2
 2; 1
x1 x2

2 x1  4  1  22  0 1

f g1 g 2
 1  2 0
x2 x2 x2

2 x2  4  21  2  0 2

6
Example – 1 (Contd.)
g1  X   x1  2 x2  4
j g j  0 j = 1, 2 g 2  X   2 x1  x2  5

1  x1  2 x2  4   0 3

2  2 x1  x2  5   0 4

4 equations and 4 unknowns

7
Example – 1 (Contd.)
Using Eq.1 and Eq.2
2 x1  4  1  22  0
2 x2  4  21  2  0
multiplying eq.1 with 2 and subtracting eq.2,
rearranging the terms
21  42  4 x1  8
21  2  2 x2  4
4 x1  2 x2  4
32  4 x1  2 x2  4; 2 
3

8
Example – 1 (Contd.)

Substituting in Eq.2,
2 x1  4 x2  4
1  1  x1  2 x2  4   0
3
2  2 x1  x2  5   0
Substituting 1 and 2 in Eq.3 and Eq.4,

 2 x1  4 x2  4  x1  2 x2  4   0 5

 4 x1  2 x2  4  2 x1  x2  5  0 6

Four solutions possible


9
Example – 1 (Contd.)
First terms in both Eq.5 and Eq.6,
 2 x1  4 x2  4   0
 4 x1  2 x2  4   0
Solving the equations gives,
x1  2; x2  2
Check for conditions

gj  0
j = 1, 2
j  0

10
Example – 1 (Contd.)

2 x1  4 x2  4
1  0
3 j  0
4 x1  2 x2  4 Condition is satisfied
2  0
3

g1  X   x1  2 x2  4  2
gj  0

g 2  X   2 x1  x2  5  1 Condition is not satisfied

Check for other solutions


11
Example – 1 (Contd.)
Second terms in both Eq.5 and Eq.6,
 x1  2 x2  4   0
 4 x1  2 x2  4   0
Solving the equations gives,
8 6
x1  ; x2 
5 5
Check for conditions
gj  0
j = 1, 2
j  0

12
Example – 1 (Contd.)
2 x1  4 x2  4 4
1  
3 5 j  0
4 x1  2 x2  4 Condition is satisfied
2  0
3

g1  X   x1  2 x2  4  0
gj  0
3
g 2  X   2 x1  x2  5   Condition is satisfied
5
8 6
Therefore,  ,  satisfies all K-T conditions
5 5
13
Example – 1 (Contd.)

First term in Eq.5 and second term in Eq.6,


 2 x1  4 x2  4   0
 2 x1  x2  5  0
Solving the equations gives,
8 9
x1  ; x2 
5 5
Check for conditions
gj  0
j = 1, 2
j  0

14
Example – 1 (Contd.)

2 x1  4 x2  4
1  0
3 j  0
4 x1  2 x2  4 2 Condition is satisfied
2  
3 5

6
g1  X   x1  2 x2  4  gj  0
5

g 2  X   2 x1  x2  5  0 Condition is not satisfied

Check for other solutions


15
Example – 1 (Contd.)

Second term in Eq.5 and second term in Eq.6,


 x1  2 x2  4   0
 2 x1  x2  5  0
Solving the equations gives,
x1  2; x2  1
Check for conditions

gj  0
j = 1, 2
j  0

16
Example – 1 (Contd.)

2 x1  4 x2  4 4
1  
3 3 j  0
4 x1  2 x2  4 2
2   Condition is not satisfied
3 3

g1  X   x1  2 x2  4  0 gj  0

g 2  X   2 x1  x2  5  0 Condition is satisfied

17
Example – 1 (Contd.)
Hence the optimal solution to the problem is

8 6
x  ;
*
1 x 
*
2
5 5

18
LINEAR PROGRAMMING

19
Linear Programming
• Linear programming (LP) is an optimization method
applicable for solution of problems with objective
function and constraints as a linear functions of
decision variables.
• Linear equations may be in the form of equalities or
inequalities.
• During World War II, George B. Dantzig formulated
general LP problem for allocating resources, and
devised the simplex method of solution.
• LP is considered as a revolutionary development that
permits us to make optimal decisions in complex
situations.
Source: “Engineering and optimization-theory and practice” by Singiresu S. Rao, 1996, John
Wiley & Sons 20
Linear Programming
• Simplex method is most efficient and popular method.
• Karmakar’s method is 50 times faster than simplex
method – developed in 1984.
• Some applications of LP in water resources
• Reservoir operation
• Irrigation scheduling
• Reservoir capacity determination
• Screening of alternatives in river basin
development.
• Conjunctive use of surface and ground water
• Resource allocation
• 25% of all problems solved in computers.
21
Linear Programming
General form of a LP

Linear objective function …. f(X) is linear function of X

linear constraints …. gj(X) are all linear functions of X

non-negativity of variables X > 0

22
LINEAR PROGRAMMING
Graphical Solution

23
LP – Graphical Solution
• Graphical method gives a physical picture of certain
geometrical characteristics of LP problem.
• Complex as the no. of variables increases.

24
Example – 2
Maximize

Z  3 x1  5 x2
s.t.
x1  4

2 x2  12 Constraints

3 x1  2 x2  18

x1  0
Decision variables
x2  0

25
Z  3 x1  5 x2
(0,9) x1  0
x2
x2  0

x1 = 4
x1  4
2x2 = 12 2 x2  12
(0,6) (2,6) 3 x1  2 x2  18

(0,3)

(4,0) (5,0) (6,0)


x1

26

You might also like