- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
The arguments passed into the function are described in Table 4-1. The arguments returned by the function are described in Table 4-2. Details relevant to fgoalattain are included below for fun, goal, nonlcon, options, weight, attainfactor, exitflag, lambda, and output.
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
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
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 constective 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')
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
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.
多目标规划问题
BY CAO
Multiobjective Optimization
OPtim_tb.pdf P131~140 选做作业: ) 中的多目标优化思路! 选做作业:1)MATLAB中的多目标优化思路! 中的多目标优化思路 2)多目标优化算法讨论 ) 3)有关多目标优化实例分析 ) Algorithm Improvements for Goal Attainment Method
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,nonlc on) x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,... lb,ub,nonlcon,options) x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,... lb,ub,nonlcon,options,P1,P2,...) [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(...)
options
Optimization parameter options. You can set or change the values of these parameters using the optimset function. •DerivativeCheck – Compare user-supplied derivatives (gradients of objective or constraints) to finite-differencing derivatives. •Diagnostics – Print diagnostic information about the function to be minimized or solved. •DiffMaxChange – Maximum change in variables for finite-difference gradients.