0% found this document useful (0 votes)
34 views28 pages

Linear Programming and Applications: (V) LP Applications: Water Resources Problems

The document discusses the application of Linear Programming (LP) in water resources management, focusing on irrigation allocation and water quality management. It provides examples of formulating LP problems to optimize irrigation patterns for crops and manage waste load allocation for maintaining water quality standards. Additionally, it introduces software tools like MMO and MATLAB for solving LP problems effectively.

Uploaded by

Ayush Kishore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views28 pages

Linear Programming and Applications: (V) LP Applications: Water Resources Problems

The document discusses the application of Linear Programming (LP) in water resources management, focusing on irrigation allocation and water quality management. It provides examples of formulating LP problems to optimize irrigation patterns for crops and manage waste load allocation for maintaining water quality standards. Additionally, it introduces software tools like MMO and MATLAB for solving LP problems effectively.

Uploaded by

Ayush Kishore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 28

Linear Programming and

Applications
(v) LP Applications: Water
Resources Problems

Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Objectives

 To formulate LP problems

 To discuss the applications of LP in

 Deciding the optimal pattern of irrigation

 Water quality management

2 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Introduction
 LP has been applied to formulate and solve several types of

problems in engineering field


 LP finds many applications in the field of water resources

which include
 Planning of urban water distribution

 Reservoir operation

 Crop water allocation

3 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Irrigation Allocation
 Consider two crops 1 and 2. One unit of crop 1 brings four units of
profit and one unit of crop 2 brings five units of profit. The demand of
production of crop 1 is A units and that of crop 2 is B units. Let x be the
amount of water required for A units of crop 1 and y be the same for B
units of crop 2.
 The linear relations between the amounts of crop produced (i.e.,
demands A and B) and the available water (i.e., x and y) for two crops
are shown below
A = 0.5(x - 2) + 2
B = 0.6(y - 3) + 3

4 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Irrigation Allocation …

Solution:
 Objective: Maximize the profit from crop 1 and 2

Maximize f = 4A + 5B;
 Expressing as a function of the amount of water,

Maximize f = 4[0.5(x - 2) + 2] + 5[0.6(y - 3) + 3]

f = 2x + 3y + 10

5 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Irrigation Allocation …

subject to
 x  y 10 ; Maximum availability of water
 x 2 ; Minimum amount of water required for crop 1
 y 3 ; Minimum amount of water required for crop 2
 The above problem is same as maximizing
f’ = 2x + 3y
subject to same constraints.

6 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Irrigation Allocation …

 Changing the problem into standard form by introducing slack variables


S1, S 2, S 3
Maximize f’ = 2x + 3y
subject to
x + y + S1 =10
-x + S2 = -2
-y + S3 = -3
This model is solved using simplex method

7 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Irrigation Allocation …
 The final tableau
is as shown

 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.

8 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example – Water Quality Management
 Waste load allocation for water quality management in a river system
can be defined as
 Determination of optimal treatment level of waste, which is discharged
to a river
 By maintaining the water quality standards set by Pollution Control
Agency (PCA), through out the river

 Conventional waste load allocation involves minimization of treatment


cost subject to the constraint that the water quality standards are not
violated

9 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Water Quality Management …

 Consider a simple problem of M dischargers, who discharge waste into


the river, and I checkpoints, where the water quality is measured by
PCA
 Let xj be the treatment level and aj be the unit treatment cost for jth
discharger (j=1,2,…,M)
 ci be the dissolved oxygen (DO) concentration at checkpoint i (i=1,2,
…,I), which is to be controlled
 Decision variables for the waste load allocation model are xj (j=1,2,
…,M).

10 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Water Quality Management …

 Objective function can be expressed as


M
Minimize f  a j x j
j 1

 Relationship between the water quality indicator, ci (DO) at

a checkpoint and the treatment level upstream to that


checkpoint is linear (based on Streeter-Phelps Equation)

 Let g(x) denotes the linear relationship between ci and xj.


ci  g ( x j ) i, j
 Then,

11 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example - Water Quality Management …

 Let cP be the permissible DO level set by PCA, which is to be


maintained through out the river

 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

12 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


LINEAR PROGRAMMING SOFTWARES
MMO Software (Dennis and Dennis, 1993)
 An MS-Dos based software to solve various types of problems

Opening Screen of MMO

13 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


MMO Software
 Press any key to see Main menu screen of MMO

Main Menu Screen of MMO


 Use arrow keys from keyboard to select different models.
 Select “Linear Programming” and press enter. Two options will appear as
follows:
SOLUTION METHOD: GRAPHIC/ SIMPLEX
14 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc
MMO Software
SIMPLEX Method using MMO
 Select SIMPLEX in Linear Programming option of MMO software.
 Screen for “data entry method” will appear

Screen for “Data Entry Method”

15 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


SIMPLEX Method using MMO

Data entry may be done by either of two different ways.


 Free Form Entry: Write the equation when prompted for input.

 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

Screen after Entering the Problem

16 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


SIMPLEX Method using MMO
 Once the problem is run, it will show the list of slack, surplus and artificial
variables

List of slack, surplus and artificial


variables
 There are three additional slack variables in the above problem.

 Press any key to continue

17 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


SIMPLEX Method using MMO

It will show three different options


1. No Tableau: Shows direct solutions

2. All Tableau: Shows all simplex tableau one by one

3. Final Tableau: Shows only the final simplex tableau


directly
Different Options for Simplex
 Final solution
Z is
15.667 ; Solution
x1 2.333 x 2 ; 3.667

Final Simplex
Tableau
18 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc
MATLAB Toolbox for Linear Programming

 Very popular and efficient

 Includes different types of optimization

techniques
 To use the simplex method

 set the option as

options = optimset ('LargeScale', 'off', 'Simplex', 'on')


 then a function called ‘linprog’ is to be used

19 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


MATLAB Toolbox for Linear Programming…

MATLAB Documentation for Linear


Programming

20 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


MATLAB Toolbox for Linear Programming…

MATLAB Documentation for Linear


Programming

21 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


MATLAB Toolbox for Linear Programming - Example

Let us consider the same problem as before

Maximize Z 2 x1  3 x 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

22 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example…

Thus,
f  2  3 % Cost coefficients
 1 0
 
A   1 2  % Coefficien ts of constraints
 
 1 1 

b 5 5 6 % Right hand side of constraints

lb 0 0 % Lowerbounds of decision variables

23 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Example…

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

24 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


LINGO
• Tool to solve linear, nonlinear, quadratic, stochastic and integer
optimization models
• Can be downloaded from http://www.lindo.com
• Key benefits of LINGO are:
• Easy model expression
• Convenient data options
• Powerful solvers
• Extensive documentation and help.

25 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


LINGO…

Consider the same 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
LINGO formulation is:
Max = 2*x+
3*y;
x<=5;
x-2*y>=-5;
x+y<=6;
x>=0;
y>=0;
26 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc
LINGO…
Solution report from
LINGO

Solution:
Z = 15.667
x1 = 2.333 and
x2 = 3.667

27 Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc


Thank You

Water Resources Planning and Management: M3L5 D Nagesh Kumar, IISc

You might also like