You are on page 1of 17

Dynamic Programming and Applications

Water Allocation - II

Objectives
To demonstrate the water allocation problem through a numerical example using
Backward approach Forward approach

Numerical Problem
Consider a canal supplying water for three different crops Maximum capacity of the canal is 4 units of water.
Field 3 x3

x1 Field 1 x2 Field 2

Optimization Problem: Determine the optimal allocations xi to each crop that

maximizes the total net benefits from all the three crops

Numerical Problem
Net benefits from producing the crops can be expressed as a function of the water allotted.

NB1 ( x1 ) = 5 x1 0.5 x1 NB3 ( x3 ) = 7 x3 x3


2

2 2

NB2 ( x2 ) = 8 x2 1.5 x2

The net benefit values are calculated for each crop and are as shown

Numerical Problem

Representation of the problem as a set of nodes and links


x1 4 0 1 4 2 3 4 1 1 0 Crop 1 0 Crop 2 0 1 1 0 Crop 3 0 1 2 2 2 x2 0 1 3 2 3 2 4 x3 0 1 3 4

Numerical Problem
The values inside the node show the value of state variable at each

stage
Number of nodes for any stage corresponds to the number of discrete

states possible for each stage.


The values over the links show the different values taken by decision

variables corresponding to the value taken by state variables

Numerical Problem: Solution by Backward recursion


Sub-optimization function for the 3rd crop:

f 3 ( S3 ) = max NB3 ( x3 ) with the range of S 3


x3 0 x3 S 3

from 0 to 4.

Solution by Backward recursion


Next, by considering last two stages together, the sub-optimization function is

f 2 ( S 2 ) = max[NB2 ( x2 ) + f1 ( S 2 x2 )]
x2 x2 S 2

The calculations are shown below


Table 3

Solution by Backward recursion

Solution by Backward recursion


Considering all the three stages together
f1 (Q) = max [NB1 ( x1 ) + f 2 (Q x1 )] with S1 = Q = 4 x
0 x1 Q
1

10

Solution by Backward recursion


Backtrack through each table, Optimal allocation for crop 1, x1 = 1 and S1 = 4 Thus,
S 2 = S1 x1 = 3

From 2nd stage, the optimal allocation for crop 2, x2 = 1. Now, S3 = S 2 x2 = 2 From 3rd stage calculations, x3 *= 2 Maximum total net benefit from all the crops = 21

11

Numerical Problem: Solution by Forward recursion


Start from the first stage and proceed towards the final stage Suboptimization function for the first stage

f1 ( S1 ) = max NB1 ( x1 )
x1 x1 S1

Range of values for S1 is from 0 to 4 The calculations are shown in the table

12

Solution by Forward recursion

13

Solution by Forward recursion f 2 ( S2 ) = max[NB2 ( x2 ) + f1( S2 x2 )] x


x2 S2
2

14

Solution by Forward recursion


f 3 ( S3 ) = max [NB3 ( x3 ) + f 2 ( S3 x3 )] with S3 = 4 x
x3 S 3 =Q
3

15

Solution by Forward recursion


Backtrack through each table, Optimal allocation for crop 3, x3 * = 2 and S 3 = 4 Then,
S 2 = S3 x3 = 2

The optimal allocation for crop 2, x2 = 1 Now, S1 = S 2 x2 = 1 From 1st stage calculations, x1 = 1 Maximum total net benefit from all the crops = 21 These solutions are the same as those we got from backward recursion method.

16

Thank You

You might also like