Вы находитесь на странице: 1из 14

Dynamic Programming Applications

Water Allocation

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Introduction and Objectives


Dynamic Programming : Sequential or multistage decision making process Water Allocation problem is solved as a sequential process using dynamic programming Objectives To discuss the Water Allocation Problem To explain and develop recursive equations for backward approach To explain and develop recursive equations for forward approach

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Water Allocation Problem


Consider a canal supplying water for three different crops Maximum capacity of the canal is Q units of water. Amount of water allocated to each field as xi
Field 3 x3

x1 Field 1 x2 Field 2

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Water Allocation Problem contd.


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

Optimization Problem: Determine the optimal allocations xi to each crop that maximizes the total net benefits from all the three crops

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Solution using Dynamic Programming


Structure the problem as a sequential allocation process or a multistage decision making procedure. Allocation to each crop is considered as a decision stage in a sequence of decisions. Amount of water allocated to crop i is xi Net benefit from this allocation is NBi(xi) Introduce one state variable Si :- Amount of water available to the remaining (3-i) crops State transformation equation can be written as

Si +1 = Si xi

defines the state in the next stage

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Sequential Allocation Process


The allocation problem is shown as a sequential process

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Backward Recursive Equations


Objective function: To maximize the net benefits

max NBi ( xi )
i =1

Subjected to the constraints

x1 + x2 + x3 Q 0 xi Q for i = 1,2,3

Let f1 (Q) be the maximum net benefits that can be obtained from allocating water to crops 1,2 and 3 3

f1 (Q ) =

max NB i ( xi ) x1 + x 2 + x 3 Q x1 , x 2 , x 3 0 i =1

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Backward Recursive Equations contd.


Transforming this into three problems each having only one decision variable

NB1 ( x1 ) + max NB2 ( x2 ) + max NB3 ( x3 ) f1 (Q) = max x1 x2 x3 0 x1 Q 0 x2 Q x1 = S 2 0 x3 S 2 x2 = S 3

Now starting from the last stage, let f 3 ( S3 ) be the maximum net benefits from crop 3. State variable S 3 for this stage can vary from 0 to Q Thus,

f 3 ( S 3 ) = max NB3 ( x3 )
x3 0 x3 S 3

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Backward Recursive Equations contd.


But S3 = S 2 x2 . Therefore Hence,

f 3 ( S 3 ) = f 3 ( S 2 x2 )

f1 (Q ) = max NB1 ( x1 ) + max {NB2 ( x2 ) + f 3 ( S 2 x2 )} x1 x2 0 x1 Q 0 x2 Q x1 = S 2


Now, let f 2 ( S 2 ) be the maximum benefits derived from crops 2 and 3 for a given quantity S 2 which can vary between 0 and Q Therefore,

f 2 (S2 ) =

x2 0 x2 Q x1 = S 2

max

{NB2 ( x2 ) + f 3 ( S 2 x2 )}
Optimization Methods: M6L3

D Nagesh Kumar, IISc

Backward Recursive Equations contd.


Now since S 2 = Q x1 , f1 (Q) can be rewritten as

f1 (Q) = max [NB1 ( x1 ) + f 2 (Q x1 )]


x1 0 x1 Q

Once the value of f 3 ( S3 ) is calculated, the value of f 2 ( S 2 ) can be determined, from which f1 (Q) can be determined.

10

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Forward Recursive Equations


Let the function f i ( S i ) be the total net benefit from crops 1 to i for a given input of Si which is allocated to those crops. Considering the first stage,

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

Solve this equation for a range of S1 values from 0 to Q Considering the first two crops, for an available quantity of S 2, f 2 ( S 2 ) can be written as

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

11

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Forward Recursive Equations contd.


S 2 ranges from 0 to Q
Considering the whole system, f 3 ( S3 ) can be expressed as,

f 3 ( S 3 ) = max [NB3 ( x3 ) + f 2 ( S 3 x3 )]
x3 x3 S 3 = Q

If the whole Q units of water should be allocated then the value of S 3 can be taken as equal to Q Otherwise, S 3 will take a range of values from 0 to Q

12

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Conclusion
The basic equations for the water allocation problem using both the approaches are discussed A numerical problem and its solution will be described in the next lecture

13

D Nagesh Kumar, IISc

Optimization Methods: M6L3

Thank You

14

D Nagesh Kumar, IISc

Optimization Methods: M6L3