Page 375 - Applied Numerical Methods Using MATLAB
P. 375

364    OPTIMIZATION
                (a) Noting that this problem has no other constraints than the lower bound,
                   apply the constrained linear least-squares routine “lsqlin()”tofind
                   the solution.
                (b) Noting that the lower bounds for all the variables are zeros, apply the
                   MATLAB built-in routine “lsqnonneg()” to find the solution.
                (c) Applythegeneral-purposeconstrainedoptimizationroutine“fmincon()”
                   to find the solution.
            7.7 Constrained Optimization Problems
                Solve the following constrained optimization problems by using the MAT-
                LAB built-in routine “fmincon()”.

                (a)        3    2         2                            (P7.7.1a)
                     Min x x − 5x + 6x 1 + x − 2x 2 + x 3
                          1     1         2
                     subject to the constraints
                              2
                          2
                         x + x − x 3 ≤ 0                  
                                                             0
                          1   2                     x 1
                              2
                                   2
                          2
                         x + x + x ≥ 6    and x =   x 2    ≥   0   = l  (P7.7.1b)
                          1   2    3
                             x 3 ≤ 5                x 3      0
                     Try the routine “fmincon()” with the initial guesses listed in
                     Table P7.7.
           Table P7.7 The Results of Applying ‘‘fmincon()’’ with Different Initial Guess
                    Initial Guess  Lower
                                                       o
                       x 0      Bound       x o      f(x )     Remark (warning ?)
                   [0  0 0]       0                         No feasible solution (w)
                   [1  1 5]       0                         Not a minimum
            (a)
                   [0  0 5]       0                         Minimum
                   [1  0 2]       0     [1.29  0.57  2]  2.74
                   [0  0 0]       0     [0  0  0]     0
            (b1)
                   [10  10  10]   0                         Maximum (good)
                   [0  0 0]       0                         No feasible solution (w)
            (b2)   [10  10  10]   0                         Not a minimum, but the max
                   [0.1  0.1  3]  0                         One of many minima (w)
                   [0  0 0]       0
            (c1)   [0.1  0.1  0.1]  0   [1  1  1]     3     Maximum (good)
                   [0  1 2]       0
                   [0  0 0]       0     [1  1  1]     3     Not a minimum, but the max
            (c2)   [0.1  0.1  0.1]  0
                   [0  1 2]       0                         One of many minima
                   [1.0  0.5]     0                         Weird (warning)
                   [0.2  0.3]     0     [10.25  0]    ∞
            (d)
                   [2  5]         0     [5.77  8.17]  25.98
                   [100  10]      0                         Minimum
   370   371   372   373   374   375   376   377   378   379   380