Professional Documents
Culture Documents
Applications
(v) LP Applications: Water
Resources Problems
To formulate LP problems
which include
Planning of urban water distribution
Reservoir operation
Solution:
Objective: Maximize the profit from crop 1 and 2
Maximize f = 4A + 5B;
Expressing as a function of the amount of water,
f = 2x + 3y + 10
subject to
x y 10 ; Maximum availability of water
x2 ; Minimum amount of water required for crop 1
y3 ; Minimum amount of water required for crop 2
The above problem is same as maximizing
f’ = 2x + 3y
subject to same constraints.
The solution is x = 2; y = 8; f’ = 28
Therefore, f = 28+10 = 38
Water allocated to crop A is 2 units and to crop B is 8 units and total
profit yielded is 38 units.
M
Minimize f ajxj
j 1
ci g ( x j ) i, j
Therefore, ci cP i
Model can be solved using simplex algorithm which will give the
optimal fractional removal levels required to maintain the water quality
of the river
Tabular Entry: Data can be input in spreadsheet style. Only the coefficients
are to be entered, not the variables.
Consider the problem
Maximize Z 2 x1 3 x 2
Subject to x1 5,
x1 2 x 2 5,
x1 x 2 6
x1 , x 2 0
Maximize Z 2 x1 3x 2
Subject to x1 5,
x1 2 x 2 5,
x1 x 2 6
x1 , x 2 0
Note: The maximization problem should be converted to minimization
problem in MATLAB
Thus,
f 2 3 % Cost coefficients
1 0
A 1 2 % Coefficien ts of constraints
1 1
MATLAB code
clear all
f=[-2 -3]; %Converted to minimization problem
A=[1 0;-1 2;1 1];
b=[5 5 6];
lb=[0 0];
options = optimset ('LargeScale', 'off', 'Simplex', 'on');
[x , fval]=linprog (f , A , b , [ ] , [ ] , lb );
Z = -fval %Multiplied by -1
x
Solution
Z = 15.667 with x1 = 2.333 and x2 = 3.667
Solution:
Z = 15.667
x1 = 2.333 and
x2 = 3.667