The solution of most practical optimization problems requires the use of computers. Several commercial software systems are available to solve optimization problems that arise in different engineering areas. MATLAB is a popular software that is used for the solution of a variety of scientific and engineering problems.1 MATLAB has several toolboxes each developed for the solution of problems from a specific scientific area. The specific toolbox of interest for solving optimization and related problems is called the optimization toolbox. It contains a library of programs or m‐files, which can be used for the solution of minimization, equations, least squares curve fitting, and related problems. The basic information necessary for using the various programs can be found in the user's guide for the optimization toolbox [1]. The programs or m‐files, also called functions, available in the minimization section of the optimization toolbox are given in Table 17.1. The use of the programs listed in Table 17.1 is demonstrated in this chapter. Basically, the solution procedure involves three steps after formulating the optimization problem in the format required by the MATLAB program (or function) to be used. In most cases, this involves stating the objective function for minimization and the constraints in “≤” form with zero or constant value on the right hand side of the inequalities. After this, Step 1 involves writing an m‐file for the objective function. Step 2 involves writing an m‐file for the constraints. Step 3 involves setting the various parameters at proper values depending on the characteristics of the problem and the desired output and creating an appropriate file to invoke the desired MATLAB program (and coupling the m‐files created to define the objective and constraints functions of the problem).
Table 17.1 MATLAB Programs or Functions for Solving Optimization Problems.
Type of optimization problem | Standard form for solution by MATLAB | Name of MATLAB program or function to solve the problem |
Function of one variable or scalar minimization | Find x to minimize f(x) with x 1 < x < x 2 |
fminbnd
|
Unconstrained minimization of function of several variables | Find x to minimize f(x) |
fminunc
or
fminsearch
|
Linear programming problem | Find x to minimize f
T
x subject to
|
linprog
|
Quadratic programming problem | Find x to minimize
|
quadprog
|
Minimization of function of several variables subject to constraints | Find x to minimize f(x) subject to
|
fmincon
|
Goal attainment problem | Find x and γ to minimize γ such that
|
fgoalattain
|
Minimax problem |
such that
|
fminimax
|
Binary integer programming problem | Find x to minimize f
T
x subject to
|
bintprog
|
The examples presented in this chapter illustrate the application of MATLAB to solve the problems/methods presented in the previous chapters.
The solution of linear programming problems, using the simplex method, can be found as illustrated by the following example.
The solution of linear programming problems, based on the interior point method, using MATLAB is illustrated by the following example.
The solution of one‐dimensional minimization problems, using the MATLAB program optimset
, is illustrated by the following example.
The solution of multivariable unconstrained minimization problems using the MATLAB function fminunc
is illustrated in this section.
The solution of multivariable minimization problems, with inequality and equality constraints, using the MATLAB function fmincon
is illustrated in this section.
The MATLAB function
bintprog
can be used to solve a binary (or zero–one) programming problem. The following example illustrates the procedure.
The MATLAB function fgoalattain
can be used to solve a multiobjective optimization problem using the goal attainment method. The following example illustrates the procedure.
fmincon
with the starting point X
1 = {0.4, 6.0, 9.0, 0.5}T
fmincon
with the starting point X
1 = {0, 0, 0, 0}T:
Minimize
subject to
fmincon
with the starting point X
1 = {0.5, 1.0}T:
Minimize
subject to
fmincon
with the starting point: X
1 = {0.5, 1.0, 1.0}:
subject to
fmincon
with the starting point: X
1 = {1.0, 1.0}T:
subject to
bintprog
:
where
bintprog
:
where
Find X = {x 1 x 2 x 3 x 4 x 5 x 6}T
to minimize
subject to
Find the minima of the individual objective functions under the stated constraints using the MATLAB function fmincon
.
fmincon
for the solution.fmincon
for the solution.fmincon
for the solution.fgoalattain
for the solution. Use suitable goals for the objectives.Find X = {x 1 x 2}T to minimize
subject to
Find the minima of the individual objectives under the stated constraints using the MATLAB function fmincon
.
fmincon
for the solution.Use the MATLAB function fgoalattain
for the solution. Use suitable goals for the objectives.
18.118.150.80