Page 324 - MATLAB an introduction with applications
P. 324

Optimization ———  309


                   p1=a1+s*b1;p2=a2+s*b2;
                   z=90*(p2–p1^2)^2+(1–p1)^2;

                   The output is as follows:
                   Optimum point after 30 cycles is
                   1.003135
                   1.000263


                                                                                              2
                                                                                         2
                   Example E5.27: Use the Fletcher-Reeves method to locate the minimum of f (x) = 9x + 3x – 8x x + 2x .
                                                                                                  1 2
                                                                                             2
                                                                                        1
                                                                                                        1
                   Start with X =[0 0] .
                                  T
                            o
                   Solution:
                   This method is also called conjugate gradient method. It is modification of Cauchy’s method of gradient
                   decent algorithm. The complete algorithm is given below:
                         0
                   Given x  perform the following steps:
                                                      ∇
                                                  1
                                         0
                       1.   Compute   fx∇  () and set u =  – fx 0
                                                        ().
                       2.   For i = 1, 2, ..., n do:
                                    i
                                               i
                            2.1 Set  x =  x i− 1 + λ i u  where  λ such that
                                                       i
                                  ( fx i− 1 +λ i u i ) =  min (fx i –1 +λ u i  ) (line search)
                                              λ
                            2.2 Compute  fx∇  (),
                                            i
                            2.3 If convergence criteria satisfied, then STOP and  * x ≅  x i , else go to Step 2.4
                                                      i
                                   ≤≤
                                                     x
                            2.4 If 1 i  n − 1, u i+ 1  = −∇ f ( ) + β i u i
                                0
                                    n
                       3.   Set x  = x  and go to Step 2 (restart).
                             ∇ f  2
                   Here  β=    i  .
                         i
                            ∇ f i− 1  2
                                      18x − 8x +  2     0 
                                        1
                                             2
                   In this problem ∇f =         and X =  
                                                      0
                                                          0
                                       6x −  8x 1       
                                         2
                   Iteration 1:
                                      2 
                         1
                                 0
                   Thus U = –∇f (X ) =   .
                                      0
                                     
                                              2λ 1 
                   For i = 1, find X = X + λ U =    0     and substituting in function f and find the minimum value of f and
                                1
                                          1
                                    0
                                        1
                                                 
                                       1
                   corresponding λ  and X .
                                1
                   Compute ∇f (X )
                               1
   319   320   321   322   323   324   325   326   327   328   329