Solve multiobjective goal attainment problems
Finds the minimum of a problem specified by
$$\underset{x,\gamma}{\text{minimize}}\gamma \text{}\text{suchthat}\text{}\{\begin{array}{c}F(x)weight\cdot \gamma \le goal\\ c(x)\le 0\\ ceq(x)=0\\ A\cdot x\le b\\ Aeq\cdot x=beq\\ lb\le x\le ub.\end{array}$$
weight, goal, b, and beq are vectors, A and Aeq are matrices, and c(x), ceq(x), and F(x) are functions that return vectors. F(x), c(x), and ceq(x) can be nonlinear functions.
x, lb, and ub can be passed as vectors or matrices; see Matrix Arguments.
x = fgoalattain(fun,x0,goal,weight)
x = fgoalattain(fun,x0,goal,weight,A,b)
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq)
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub)
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon)
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon,options)
x = fgoalattain(problem)
[x,fval] = fgoalattain(...)
[x,fval,attainfactor] = fgoalattain(...)
[x,fval,attainfactor,exitflag] = fgoalattain(...)
[x,fval,attainfactor,exitflag,output]
= fgoalattain(...)
[x,fval,attainfactor,exitflag,output,lambda]
= fgoalattain(...)
fgoalattain
solves the goal attainment problem, which is one
formulation for minimizing a multiobjective optimization problem.
Passing Extra Parameters explains how to pass extra parameters to the objective functions and nonlinear constraint functions, if necessary.
x = fgoalattain(fun,x0,goal,weight)
tries to
make the objective functions supplied by fun
attain the goals
specified by goal
by varying x
, starting at
x0
, with weight specified by
weight
.
x = fgoalattain(fun,x0,goal,weight,A,b)
solves the goal attainment problem subject to the linear inequalities
A*x ≤ b
.
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq)
solves the goal attainment problem subject to the linear equalities Aeq*x =
beq
as well. Set A = []
and b =
[]
if no inequalities exist.
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub)
defines a set of lower and upper bounds on the design variables in
x
, so that the solution is always in the range
lb ≤ x ≤ ub
.
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon)
subjects the goal attainment problem to the nonlinear inequalities
c(x)
or nonlinear equality constraints
ceq(x)
defined in nonlcon
.
fgoalattain
optimizes such that
c(x) ≤ 0
and
ceq(x) = 0
. Set lb = []
and/or
ub = []
if no bounds exist.
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon,options)
minimizes with the optimization options specified in options
. Use
optimoptions
to set these
options.
x = fgoalattain(problem)
finds the minimum for
problem
, where problem
is a structure
described in Input Arguments.
Create the problem
structure by exporting a problem from
Optimization app, as described in Exporting Your Work.
[x,fval] = fgoalattain(...)
returns the
values of the objective functions computed in fun
at the solution
x
.
[x,fval,attainfactor] = fgoalattain(...)
returns the attainment factor at the solution x
.
[x,fval,attainfactor,exitflag] = fgoalattain(...)
returns a value exitflag
that describes the exit condition of
fgoalattain
.
[x,fval,attainfactor,exitflag,output]
= fgoalattain(...)
returns a structure output
that contains information about the
optimization.
[x,fval,attainfactor,exitflag,output,lambda]
= fgoalattain(...)
returns a structure lambda
whose fields contain the Lagrange
multipliers at the solution x
.
If the specified input bounds for a problem are inconsistent, the output
x
is x0
and the output
fval
is []
.
Function Input Arguments contains general descriptions of arguments passed
into fgoalattain
. This section provides functionspecific details
for fun
, goal
, nonlcon
,
options
, weight
, and
problem
:
 The function to be minimized. x = fgoalattain(@myfun,x0,goal,weight) where
function F = myfun(x) F = ... % Compute function values at x.
x = fgoalattain(@(x)sin(x.*x),x0,goal,weight); If
the userdefined values for To
make an objective function as near as possible to a goal
value, (i.e., neither greater than nor less than) use
If the gradient of the
objective function can also be computed and
the options = optimoptions('fgoalattain','SpecifyObjectiveGradient',true) then
the function NoteSetting  

Vector of values that the objectives attempt to attain.
The vector is the same length as the number of objectives
 

The function that computes the nonlinear inequality
constraints x = fgoalattain(@myfun,x0,goal,weight,A,b,Aeq,beq,... lb,ub,@mycon) where function [c,ceq] = mycon(x) c = ... % compute nonlinear inequalities at x. ceq = ... % compute nonlinear equalities at x. If the gradients of the constraints can also be computed
and the
options = optimoptions('fgoalattain','SpecifyConstraintGradient',true) then the function If NoteSetting NoteBecause Optimization
Toolbox™ functions only accept inputs of type
Passing Extra Parameters explains how to parametrize the nonlinear constraint
function  

Options provides the
functionspecific details for the  

A weighting vector to control the relative underattainment
or overattainment of the objectives in
NoteSetting a component of the  
When the weighting function  
problem 
 Vector of objective functions 
 Initial point for
x  
 Goals to attain  
 Relative importance factors of goals  
 Matrix for linear inequality constraints  
 Vector for linear inequality constraints  
 Matrix for linear equality constraints  
 Vector for linear equality constraints  
 Vector of lower bounds  
 Vector of upper bounds  
 Nonlinear constraint function  
 'fgoalattain'  
 Options created with optimoptions 
Function Input Arguments contains general descriptions of arguments returned
by fgoalattain
. This section provides functionspecific details
for attainfactor
, exitflag
,
lambda
, and output
:

The amount of over or underachievement of the goals.
 

Integer identifying the reason the algorithm terminated. The
following lists the values of  

Function converged to a solutions  

Magnitude of the search direction less than the specified
tolerance and constraint violation less than
 

Magnitude of directional derivative less than the specified
tolerance and constraint violation less than
 

Number of iterations exceeded
 

Stopped by an output function or plot function.  

No feasible point was found.  

Structure containing the Lagrange multipliers at the solution
 
lower 
Lower bounds  
upper 
Upper bounds  
ineqlin 
Linear inequalities  
eqlin 
Linear equalities  
ineqnonlin 
Nonlinear inequalities  
eqnonlin 
Nonlinear equalities  

Structure containing information about the optimization. The fields of the structure are  
iterations 
Number of iterations taken  
funcCount 
Number of function evaluations  
lssteplength 
Size of final line search step relative to search direction  
stepsize 
Final displacement in  
algorithm 
Optimization algorithm used  
firstorderopt 
Measure of firstorder optimality  
constrviolation 
Maximum of constraint functions  
message 
Exit message 
Optimization options used by fgoalattain
. Use optimoptions
to set or change options
. See Optimization Options Reference for detailed information.
Some options are absent from the
optimoptions
display. These options appear in italics in the following
table. For details, see View Options.
ConstraintTolerance 
Termination tolerance on the constraint violation, a positive
scalar. The default is For 
Diagnostics 
Display diagnostic information about the function to be
minimized or solved. The choices are 
DiffMaxChange 
Maximum change in variables for finitedifference gradients (a
positive scalar). The default is 
DiffMinChange 
Minimum change in variables for finitedifference gradients (a
positive scalar). The default is 

Level of display (see Iterative Display):

EqualityGoalCount 
Specifies the number of objectives for which it is required
for the objective For 
FiniteDifferenceStepSize 
Scalar or vector step size factor for finite differences. When
you set
sign′(x)
= sign(x) except sign′(0) = 1 .
Central finite differences are
FiniteDifferenceStepSize expands
to a vector. The default is sqrt(eps) for forward
finite differences, and eps^(1/3) for central finite
differences.
For 
FiniteDifferenceType 
Finite differences, used to estimate gradients, are either
The algorithm is careful to obey bounds when estimating both types of finite differences. So, for example, it could take a backward, rather than a forward, difference to avoid evaluating at a point outside bounds. For 
FunctionTolerance 
Termination tolerance on the function value, a positive
scalar. The default is For 
FunValCheck 
Check whether objective function and constraints values are
valid. 
MaxFunctionEvaluations 
Maximum number of function evaluations allowed (a positive
integer). The default is
For 
MaxIterations 
Maximum number of iterations allowed (a positive integer). The
default is For 
MaxSQPIter 
Maximum number of SQP iterations allowed (a positive integer).
The default is 
MeritFunction 
Use goal attainment/minimax merit function if set to

OptimalityTolerance 
Termination tolerance on the firstorder optimality, a positive
scalar. The default is For 
OutputFcn  Specify one or more userdefined functions that an
optimization function calls at each iteration. Pass a function
handle or a cell array of function handles. The default is none
( 
PlotFcn  Plots various measures of progress while the algorithm
executes; select from predefined plots or write your own. Pass a
name, a function handle, or a cell array of names or function
handles. For custom plot functions, pass function handles. The
default is none (
For information on writing a custom plot function, see Plot Functions. For 
RelLineSrchBnd 
Relative bound (a real nonnegative scalar value) on the line
search step length such that the total displacement in

RelLineSrchBndDuration 
Number of iterations for which the bound specified in

SpecifyConstraintGradient 
Gradient for nonlinear constraint functions defined by the
user. When set to For 
SpecifyObjectiveGradient 
Gradient for the objective function defined by the user. See
the preceding description of For 
StepTolerance 
Termination tolerance on For 
TolConSQP 
Termination tolerance on inner iteration SQP constraint
violation, a positive scalar. The default is

TypicalX 
Typical 
UseParallel 
When 
Consider a linear system of differential equations.
An output feedback controller, K
, is designed producing a
closed loop system
$$\begin{array}{c}\dot{x}=(A+BKC)x+Bu,\\ y=Cx.\end{array}$$
The eigenvalues of the closed loop system are determined from the matrices
A
, B
, C
, and
K
using the command eig(A+B*K*C)
. Closed
loop eigenvalues must lie on the real axis in the complex plane to the left of the
points [5,3,1]
. In order not to saturate the inputs, no
element in K
can be greater than 4
or be less
than 4
.
The system is a twoinput, twooutput, open loop, unstable system, with statespace matrices.
$$A=\left[\begin{array}{ccc}0.5& 0& 0\\ 0& 2& 10\\ 0& 1& 2\end{array}\right]\text{}B=\left[\begin{array}{cc}1& 0\\ 2& 2\\ 0& 1\end{array}\right]\text{}C=\left[\begin{array}{ccc}1& 0& 0\\ 0& 0& 1\end{array}\right].$$
The set of goal values for the closed loop eigenvalues is initialized as
goal = [5,3,1];
To ensure the same percentage of under or overattainment in the active objectives
at the solution, the weighting matrix, weight
, is set to
abs(goal)
.
Starting with a controller, K = [1,1; 1,1]
, first write a
function file, eigfun.m
.
function F = eigfun(K,A,B,C) F = sort(eig(A+B*K*C)); % Evaluate objectives
Next, enter system matrices and invoke an optimization routine.
A = [0.5 0 0; 0 2 10; 0 1 2]; B = [1 0; 2 2; 0 1]; C = [1 0 0; 0 0 1]; K0 = [1 1; 1 1]; % Initialize controller matrix goal = [5 3 1]; % Set goal values for the eigenvalues weight = abs(goal); % Set weight for same percentage lb = 4*ones(size(K0)); % Set lower bounds on the controller ub = 4*ones(size(K0)); % Set upper bounds on the controller options = optimoptions('fgoalattain','Display','iter'); % Set display parameter [K,fval,attainfactor] = fgoalattain(@(K)eigfun(K,A,B,C),... K0,goal,weight,[],[],[],[],lb,ub,[],options)
After about 11 iterations, a solution is
Active inequalities (to within options.ConstraintTolerance = 1e006): lower upper ineqlin ineqnonlin 1 1 2 2 4 K = 4.0000 0.2564 4.0000 4.0000 fval = 6.9313 4.1588 1.4099 attainfactor = 0.3863
The attainment factor indicates that each of the objectives has been overachieved by at least 38.63% over the original design goals. The active constraints, in this case constraints 1 and 2, are the objectives that are barriers to further improvement and for which the percentage of overattainment is met exactly. Three of the lower bound constraints are also active.
In the preceding design, the optimizer tries to make the objectives less than
the goals. For a worstcase problem where the objectives must be as near to the
goals as possible, use optimoptions
to set the
EqualityGoalCount
option to the number of objectives for
which this is required.
Consider the preceding problem when you want all the eigenvalues to be equal
to the goal values. A solution to this problem is found by invoking
fgoalattain
with the EqualityGoalCount
option set to 3
.
options = optimoptions('fgoalattain','EqualityGoalCount',3); [K,fval,attainfactor] = fgoalattain(... @(K)eigfun(K,A,B,C),K0,goal,weight,[],[],[],[],lb,ub,[],... options);
After about seven iterations, a solution is
K,fval,attainfactor K = 1.5953 1.2040 0.4201 2.9047 fval = 5.0000 3.0000 1.0000 attainfactor = 6.5565e23
In this case the optimizer has tried to match the objectives to the goals. The
attainment factor (of 6.5565e23
or so, depending on your
system) indicates that the goals have been matched almost exactly.
For complete results of this example, including graphs of the system response, see MultiObjective Goal Attainment Optimization.
This problem has discontinuities when the eigenvalues become complex; this
explains why the convergence is slow. Although the underlying methods assume the
functions are continuous, the method is able to make steps toward the solution
because the discontinuities do not occur at the solution point. When the objectives
and goals are complex, fgoalattain
tries to achieve the goals in
a leastsquares sense.
The objectives must be continuous. fgoalattain
might give only
local solutions.
Multiobjective optimization concerns the minimization of a set of objectives
simultaneously. One formulation for this problem, and implemented in
fgoalattain
, is the goal attainment problem of Gembicki [3]. This entails the construction of a set of
goal values for the objective functions. Multiobjective
optimization is discussed in Multiobjective Optimization Algorithms.
In this implementation, the slack variable γ is used as a dummy argument to minimize the vector of objectives F(x) simultaneously; goal is a set of values that the objectives attain. Generally, prior to the optimization, it is not known whether the objectives will reach the goals (under attainment) or be minimized less than the goals (overattainment). A weighting vector, weight, controls the relative underattainment or overattainment of the objectives.
fgoalattain
uses a sequential quadratic programming (SQP)
method, which is described in Sequential Quadratic Programming (SQP).
Modifications are made to the line search and Hessian. In the line search an exact
merit function (see [1] and [4]) is used together with the merit function proposed by [5] and [6]. The line search is terminated when either
merit function shows improvement. A modified Hessian, which takes advantage of the
special structure of the problem, is also used (see [1] and [4]). A full description of the modifications
used is found in Goal Attainment Method in “Introduction to
Algorithms.” Setting the MeritFunction
option to
'singleobj'
with
options = optimoptions(options,'MeritFunction','singleobj')
uses the merit function and Hessian used in fmincon
.
See also SQP Implementation for more details on the
algorithm used and the types of procedures displayed under the
Procedures
heading when the Display
option
is set to 'iter'
.
[1] Brayton, R. K., S. W. Director, G. D. Hachtel, and L.Vidigal, “A New Algorithm for Statistical Circuit Design Based on QuasiNewton Methods and Function Splitting,” IEEE Transactions on Circuits and Systems, Vol. CAS26, pp 784794, Sept. 1979.
[2] Fleming, P.J. and A.P. Pashkevich, Computer Aided Control System Design Using a MultiObjective Optimisation Approach, Control 1985 Conference, Cambridge, UK, pp. 174179.
[3] Gembicki, F.W., “Vector Optimization for Control with Performance and Parameter Sensitivity Indices,” Ph.D. Dissertation, Case Western Reserve Univ., Cleveland, OH, 1974.
[4] Grace, A.C.W., “ComputerAided Control System Design Using Optimization Techniques,” Ph.D. Thesis, University of Wales, Bangor, Gwynedd, UK, 1989.
[5] Han, S.P., “A Globally Convergent Method For Nonlinear Programming,” Journal of Optimization Theory and Applications, Vol. 22, p. 297, 1977.
[6] Powell, M.J.D., “A Fast Algorithm for Nonlinear Constrained Optimization Calculations,” Numerical Analysis, ed. G.A. Watson, Lecture Notes in Mathematics, Vol. 630, Springer Verlag, 1978.
fmincon
 fminimax
 optimoptions
 optimtool