Page 377 - Applied Numerical Methods Using MATLAB
P. 377

366    OPTIMIZATION
                (cf) One might be disappointed with the reliability of the MATLAB optimization
                    routines to see that they may fail to find the optimal solution depending on the
                    initial guess. But, how can a human work be perfect in this world? It implies
                    the difficulty of nonlinear constrained optimization problems and can never
                    impair the celebrity and reliability of MATLAB. Actually, it demonstrates the
                    importance of studying some numerical stuff in addition to just getting used
                    to the various MATLAB commands and routines.
                      Here is a tip for the usage of “fmincon()”: it might be better to use with
                    an initial guess that is not at the origin, but in the admissible region satisfying
                    the constraints, even though it does not guarantee the success of the routine.
                    It might also be helpful to apply the routine with several values of the initial
                    guess and then choose the best result.

            7.8 Constrained Optimization and Penalty Method
                Consider again the constrained minimization problem having the objective
                function (E7.3.1a) and the constraints (E7.3.1b).

                                   2          2        2          2
                   Min f(x) ={(x 1 + 1.5) + 5(x 2 − 1.7) }{(x 1 − 1.4) + 0.6(x 2 − 0.5) }  (P7.8.1a)
                                                     
                                                           
                                           −x 1             0
                                           −x 2
                                                     
                                                           0 
                                                     
                       s.t. g(x) =   3x 1 − x 1 x 2 + 4x 2 − 7      (P7.8.1b)
                                                       ≤  0 
                                       2x 1 + x 2 − 3      
                                                            0
                                                     
                                              2
                                      3x 1 − 4x − 4x 2      0
                                             2
                In Example 7.3, we made the MATLAB program “nm722.m” to solve the
                problem and defined the objective function (E7.3.2a) having the penalized
                constraint terms in the file named “f722p.m”.
                                     2            2          2             2
                  Min l(x) ={(x 1 + 1.5) + 5(x 2 − 1.7) }{(x 1 − 1.4) + 0.6(x 2 − 0.5) }
                                  5
                              +       v m ψ m (g m (x))                (P7.8.2a)
                                   m=1
                where

                                 0            if g m (x) ≤ 0 (constraint satisfied)
                    ψ m (g m (x)) =
                                 exp(e m g m (x))  if g m (x)> 0 (constraint viloated)
                                with e m = 1 ∀m = 1,. .., 5            (P7.8.2b)
                (a) Whatistheweightingcoefficientvector vinthefilenamed“f722p.m”?Do
                    the  points  reached  by  the  routines  “fminsearch()”/“opt_
                    steep()”/“fminunc()” satisfy all the constraints so that they are in the
                    admissible region? If not, specify the constraint(s) violated by the points.
                (b) Suppose the fourth constraint was violated by the point in (a). Then,
                    how would you modify the weighting coefficient vector v so that the
                    violated constraint can be paid more respect? Choose one of the fol-
                    lowing two weighting coefficient vectors:
   372   373   374   375   376   377   378   379   380   381   382