Optimization Toolbox
  Go to function:
    Search    Help Desk 
fgoalattain    Examples   See Also

Solve multiobjective goal attainment problem

where x, weight, goal, b, beq, lb, and ub are vectors, A and Aeq are matrices, c(x), ceq(x), and F(x) are functions that return vectors. F(x), c(x), and ceq(x) can be nonlinear functions.

Syntax

Description

fgoalattain solves the goal attainment problem, which is one formulation for minimizing a multiobjective optimization problem.

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, 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 parameters specified in the structure options.

x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon,... options,P1,P2,...) passes the problem-dependent parameters P1, P2, etc., directly to the functions fun and nonlcon. Pass empty matrices as placeholders for A, b, Aeq, beq, lb, ub, nonlcon, and options if these arguments are not needed.

[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.

Arguments

The arguments passed into the function are described in Table 1-1. The arguments returned by the function are described in Table 1-2. Details relevant to fgoalattain are included below for fun, goal, nonlcon, options, weight, attainfactor, exitflag, lambda, and output.

fun
The function to be minimized. fun takes a vector x and returns a vector F of the objective functions evaluated at x. You can specify fun to be an inline object. For example,

    fun = inline('sin(x.*x)');
    
Alternatively, fun can be a string containing the name of a function (an M-file, a built-in function, or a MEX-file). If fun='myfun' then the M-file function myfun.m would have the form

    function F = myfun(x)
    F = ...      % Compute function values at x
    

To make an objective function as near as possible to a goal value, (i.e., neither greater than nor less than) set options.GoalsExactAchieve to the number of objectives required to be in the neighborhood of the goal values. Such objectives must be partitioned into the first elements of the vector F returned by fun.

If the gradient of the objective function can also be computed and options.GradObj is 'on', as set by

    options = optimset('GradObj','on')
    
then the function fun must return, in the second output argument, the gradient value G, a matrix, at x. Note that by checking the value of nargout the function can avoid computing G when 'myfun' is called with only one output argument (in the case where the optimization algorithm only needs the value of F but not G):


    function [F,G] = myfun(x)
    F = ...          % compute the function values at x
    if nargout > 1   % two output arguments
       G = ...       % gradients evaluated at x
    end
    

The gradient is the partial derivatives dF/dx of each F at the point x. If F is a vector of length m and x has length n, then the gradient G of F(x) is an n-by-m matrix where G(i,j) is the partial derivative of F(j) with respect to x(i) (i.e., the jth column of G is the gradient of the jth objective function F(j)).

goal
Vector of values that the objectives attempt to attain. The vector is the same length as the number of objectives F returned by fun. fgoalattain attempts to minimize the values in the vector F to attain the goal values given by goal.

nonlcon
The function that computes the nonlinear inequality constraints c(x) <=0 and nonlinear equality constraints ceq(x)=0. nonlcon is a string containing the name of a function (an M-file, a built-in, or a MEX-file). nonlcon takes a vector x and returns two arguments, a vector c of the nonlinear inequalities evaluated at x and a vector ceq of the nonlinear equalities evaluated at x. For example, if nonlcon='mycon' then the M-file mycon.m would have the form

    function [c,ceq] = mycon(x)
    c = ...     % Compute nonlinear inequalities at x
    ceq = ...   % Compute the nonlinear equalities at x
    

If the gradients of the constraints can also be computed and options.GradConstr is 'on', as set by

    options = optimset('GradConstr','on')
    
then the function nonlcon must also return, in the third and fourth output arguments, GC, the gradient of c(x), and GCeq, the gradient of ceq(x). Note that by checking the value of nargout the function can avoid computing GC and GCeq when nonlcon is called with only two output arguments (in the case where the optimization algorithm only needs the values of c and ceq but not GC and GCeq):

    function [c,ceq,GC,GCeq] = mycon(x)
    c = ...          % nonlinear inequalities at x
    ceq = ...        % nonlinear equalities at x
    if nargout > 2   % nonlcon called with 4 outputs
       GC = ...      % gradients of the inequalities
       GCeq = ...    % gradients of the equalities
    end
    

If nonlcon returns a vector c of m components and x has length n, then the gradient GC of c(x) is an n-by-m matrix, where GC(i,j) is the partial derivative of c(j) with respect to x(i) (i.e., the jth column of GC is the gradient of the jth inequality constraint c(j)). Likewise, if ceq has p components, the gradient GCeq of ceq(x) is an n-by-p matrix, where GCeq(i,j) is the partial derivative of ceq(j) with respect to x(i) (i.e., the jth column of GCeq is the gradient of the jth equality constraint ceq(j)).

options
Optimization parameter options. You can set or change the values of these parameters using the optimset function.




weight
A weighting vector to control the relative under-attainment or over-attainment of the objectives in fgoalattain. When the values of goal are all nonzero, to ensure the same percentage of under- or over-attainment of the active objectives, set the weighting function to abs(goal). (The active objectives are the set of objectives that are barriers to further improvement of the goals at the solution.)

Note:
Setting weight=abs(goal) when any of the goal values are zero will cause that goal constraint to be treated like a hard constraint rather than as a goal constraint.

When the weighting function weight is positive, fgoalattain attempts to make the objectives less than the goal values. To make the objective functions greater than the goal values, set weight to be negative rather than positive. To make an objective function as near as possible to a goal value, use the GoalsExactAchieve parameter and put that objective as the first element of the vector returned by fun (see the description of fun and options above).

attain-
factor

attainfactor is the amount of over- or underachievement of the goals. If attainfactor is negative, the goals have been over-achieved; if attainfactor is positive, the goals have been under-achieved.

exitflag
Describes the exit condition:

lambda
A structure containing the Lagrange multipliers at the solution x (separated by constraint type):

output
A structure whose fields contain information about the optimization:

Examples

Consider a linear system of differential equations.

An output feedback controller, K, is designed producing a closed loop system

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 two-input, two-output, open loop, unstable system, with state-space matrices.

The set of goal values for the closed loop eigenvalues are initialized as

To ensure the same percentage of under- or over-attainment 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 an M-file, eigfun.m:

Next, enter system matrices and invoke an optimization routine:

This example can be run by using the demonstration script goaldemo. After about 12 iterations, a solution is

Discussion

The attainment factor indicates that each of the objectives has been over-achieved 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 over-attainment is met exactly. Three of the lower bound constraints are also active.

In the above design, the optimizer tries to make the objectives less than the goals. For a worst case problem where the objectives must be as near to the goals as possible, set options.GoalsExactAchieve to the number of objectives for which this is required.

Consider the above 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 options.GoalsExactAchieve set to 3.

After about seven iterations, a solution is

In this case the optimizer has tried to match the objectives to the goals. The attainment factor (of 1.0859e-20) indicates that the goals have been matched almost exactly.

Notes

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 since the discontinuities do not occur at the solution point. When the objectives and goals are complex, fgoalattain tries to achieve the goals in a least-squares sense.

Algorithm

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[1]. This entails the construction of a set of goal values for the objective functions. Multiobjective optimization is discussed fully in the Introduction to Algorithms chapter of this toolbox.

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 unknown whether the objectives will even reach the goals (under attainment) or be minimized less than the goals (over attainment). A weighting vector, weight, controls the relative under-attainment or over-attainment of the objectives.

fgoalattain uses a Sequential Quadratic Programming (SQP) method, which is described fully in the Introduction to Algorithms chapter. Modifications are made to the line search and Hessian. In the line search an exact merit function (see [5] and [6]) is used together with the merit function proposed by [2, 3]. The line search is terminated when either merit function shows improvement. A modified Hessian, which takes advantage of special structure of this problem, is also used (see [5] and [6]). A full description of the modifications used is found in the "Goal Attainment Method" section of the Introduction to Algorithms chapter. Setting options.MeritFunction = 'singleobj' uses the merit function and Hessian used in fmincon.

attainfactor contains the value of at the solution. A negative value of indicates over-attainment in the goals.

See also the "SQP Implementation" section in the Introduction to Algorithms chapter for more details on the algorithm used and the types of procedures printed under the Procedures heading for the options.Display = 'iter' setting.

Limitations

The objectives must be continuous. fgoalattain may give only local solutions.

See Also

fmincon, fminimax, optimset

References

[1] Gembicki, F.W., "Vector Optimization for Control with Performance and Parameter Sensitivity Indices," Ph.D. Dissertation, Case Western Reserve Univ., Cleveland, OH, 1974.

[2] Han, S.P., "A Globally Convergent Method For Nonlinear Programming," Journal of Optimization Theory and Applications, Vol. 22, p. 297, 1977.

[3] Powell, M.J.D., "A Fast Algorithm for Nonlineary Constrained Optimization Calculations," Numerical Analysis, ed. G.A. Watson, Lecture Notes in Mathematics, Springer Verlag, Vol. 630, 1978.

[4] Fleming, P.J. and A.P. Pashkevich, Computer Aided Control System Design Using a Multi-Objective Optimisation Approach, Control 1985 Conference, Cambridge, UK, pp. 174-179.

[5] Brayton, R.K., S.W. Director, G.D. Hachtel, and L.Vidigal, "A New Algorithm for Statistical Circuit Design Based on Quasi-Newton Methods and Function Splitting," IEEE Transactions on Circuits and Systems, Vol. CAS-26, pp. 784-794, Sept. 1979.

[6] Grace, A.C.W., "Computer-Aided Control System Design Using Optimization Techniques," Ph.D. Thesis, University of Wales, Bangor, Gwynedd, UK, 1989.



[ Previous | Help Desk | Next ]