Optimization Options

下表介绍了优化选项。 使用optimoptions函数或fminbnd,fminsearch,fzero或lsqnonneg的optimset创建选项。

有关可用选项值和默认值的信息,请参阅各个函数参考页。

选项的默认值根据您使用选项作为输入参数调用的优化函数而有所不同。 您可以通过输入optimoptions(@solvername)或等效的optimoptions('solvername')来确定任何优化函数的默认选项值。 例如,

optimoptions(@fmincon)

返回默认“interior-point”fmincon算法的选项列表和默认值。 要找到另一个fmincon算法的默认值,请设置Algorithm选项。 例如,

opts = optimoptions(@fmincon,'Algorithm','sqp')

optimoptions“隐藏”一些选项,这意味着它不显示其值。 这些选项不会出现在此表中。 而是显示在 Hidden Options中。

Optimization Options

Option Name Description Used by Functions Restrictions
AbsoluteGapTolerance

Nonnegative real. intlinprog stops if the difference between the internally calculated upper (U) and lower (L) bounds on the objective function is less than or equal to AbsoluteGapTolerance:

U – L <= AbsoluteGapTolerance.

intlinprog optimoptions only
AbsoluteMaxObjectiveCount

Number of F(x) to minimize the worst case absolute values.

fminimax

 
Algorithm

Chooses the algorithm used by the solver.

fminconfminuncfsolvelinproglsqcurvefitlsqlinlsqnonlinquadprog  
BranchRule

Rule for choosing the component for branching:

  • 'maxpscost' — The fractional component with maximum pseudocost. See Branch and Bound.

  • 'mostfractional' — The component whose fractional part is closest to 1/2.

  • 'maxfun' — The fractional component with maximal corresponding component in the absolute value of objective vector f.

intlinprog optimoptions only
CheckGradients

Compare user-supplied analytic derivatives (gradients or Jacobian, depending on the selected solver) to finite differencing derivatives.

fgoalattainfminconfminimaxfminuncfseminffsolvelsqcurvefitlsqnonlin

optimoptions only. For optimset, use DerivativeCheck
ConstraintTolerance

Tolerance on the constraint violation.

fgoalattainfminconfminimaxfseminfintlinproglinproglsqlinquadprog

optimoptions only. For optimset, use TolCon
CutGeneration

Level of cut generation (see Cut Generation):

  • 'none' — No cuts. Makes CutMaxIterations irrelevant.

  • 'basic' — Normal cut generation.

  • 'intermediate' — Use more cut types.

  • 'advanced' — Use most cut types.

intlinprog optimoptions only
CutMaxIterations Number of passes through all cut generation methods before entering the branch-and-bound phase, an integer from 1 through 50. Disable cut generation by setting the CutGenerationoption to 'none'. intlinprog optimoptions only
Display

Level of display.

  • 'off' displays no output.

  • 'iter' displays output at each iteration, and gives the default exit message.

  • 'iter-detailed' displays output at each iteration, and gives the technical exit message.

  • 'notify' displays output only if the function does not converge, and gives the default exit message.

  • 'notify-detailed' displays output only if the function does not converge, and gives the technical exit message.

  • 'final' displays just the final output, and gives the default exit message.

  • 'final-detailed' displays just the final output, and gives the technical exit message.

All. See the individual function reference pages for the values that apply.

 
EqualityGoalCount

Specify the number of objectives required for the objective fun to equal the set goal. Reorder your objectives, if necessary, to have fgoalattain achieve the first EqualityGoalCount objectives exactly.

fgoalattain

optimoptions only. For optimset, use GoalsExactAchieve
FiniteDifferenceStepSize

Scalar or vector step size factor for finite differences. When you set FiniteDifferenceStepSize to a vector v, forward finite differences steps delta are

delta = v.*sign′(x).*max(abs(x),TypicalX);

where sign′(x) = sign(x) except sign′(0) = 1. Central finite differences are

delta = v.*max(abs(x),TypicalX);

Scalar FiniteDifferenceStepSizeexpands to a vector. The default is sqrt(eps) for forward finite differences, and eps^(1/3) for central finite differences.

fgoalattainfminconfminimaxfminuncfseminffsolvelsqcurvefitlsqnonlin

optimoptions only. For optimset, use FinDiffRelStep
FiniteDifferenceType

Finite differences, used to estimate gradients, are either 'forward' (the default), or 'central' (centered), which takes twice as many function evaluations but should be more accurate. 'central'differences might violate bounds during their evaluation in fmincon interior-point evaluations if the HonorBounds option is set to false.

fgoalattainfminconfminimaxfminuncfseminffsolvelsqcurvefitlsqnonlin

optimoptions only. For optimset, use FinDiffType
FunctionTolerance

Termination tolerance on the function value.

fgoalattainfminconfminimaxfminsearchfminuncfseminffsolvelsqcurvefitlsqlinlsqnonlinquadprog

optimoptions only. For optimset, use TolFun
HessianApproximation

Method of Hessian approximation: 'bfgs''lbfgs'{'lbfgs',Positive Integer}, or 'finite-difference'.

Ignored when HessianFcn or HessianMultiplyFcn is nonempty.

fmincon

optimoptions only. For optimset, use Hessian
HessianFcn

Function handle to a user-supplied Hessian (see Including Hessians).

fminconfminunc optimoptions only. For optimset, use HessFcn
HessianMultiplyFcn

Handle to a user-supplied Hessian multiply function.

Ignored when HessianFcn is nonempty.

fminconfminuncquadprog

optimoptions only. For optimset, use HessMult
Heuristics

Algorithm for searching for feasible points (see Heuristics for Finding Feasible Solutions):

  • 'none'

  • 'rss'

  • 'round'

  • 'rins'

intlinprog optimoptions only
HeuristicsMaxNodes Strictly positive integer that bounds the number of nodes intlinprog can explore in its branch-and-bound search for feasible points. See Heuristics for Finding Feasible Solutions. intlinprog optimoptions only
HonorBounds

The default true ensures that bound constraints are satisfied at every iteration. Turn off by setting to false.

fmincon optimoptions only. For optimset, use AlwaysHonorConstraints
IntegerPreprocess

Types of integer preprocessing (see Mixed-Integer Program Preprocessing):

  • 'none' — Use very few integer preprocessing steps.

  • 'basic' — Use a moderate number of integer preprocessing steps.

  • 'advanced' — Use all available integer preprocessing steps.

intlinprog optimoptions only
IntegerTolerance Real from 1e-6 through 1e-3, where the maximum deviation from integer that a component of the solution x can have and still be considered an integer. IntegerTolerance is not a stopping criterion. intlinprog optimoptions only
JacobianMultiplyFcn

User-defined Jacobian multiply function. Ignored unless SpecifyObjectiveGradient is true for fsolvelsqcurvefit, and lsqnonlin.

fsolvelsqcurvefitlsqlinlsqnonlin

 
LPMaxIterations Strictly positive integer, the maximum number of simplex algorithm iterations per node during the branch-and-bound process. intlinprog optimoptions only
LPOptimalityTolerance Nonnegative real where reduced costs must exceed LPOptimalityTolerance for a variable to be taken into the basis. intlinprog optimoptions only
MaxFunctionEvaluations

Maximum number of function evaluations allowed.

fgoalattainfminbndfminconfminimaxfminsearchfminuncfseminffsolvelsqcurvefitlsqnonlin

optimoptions only. For optimset, use MaxFunEvals
MaxIterations

Maximum number of iterations allowed.

All but fzero and lsqnonneg

optimoptions only. For optimset, use MaxIter
MaxFeasiblePoints Strictly positive integer. intlinprog stops if it finds MaxFeasiblePoints integer feasible points. intlinprog optimoptions only
MaxNodes Strictly positive integer that is the maximum number of nodes the solver explores in its branch-and-bound process.

intlinprog

 
MaxTime

Maximum amount of time in seconds allowed for the algorithm.

intlinproglinprog

 
NodeSelection

Choose the node to explore next.

  • 'simplebestproj' — Best projection. See Branch and Bound.

  • 'minobj' — Explore the node with the minimum objective function.

  • 'mininfeas' — Explore the node with the minimal sum of integer infeasibilities. See Branch and Bound.

intlinprog optimoptions only
ObjectiveCutOff Real greater than -Inf. The default is Inf. intlinprog optimoptions only
ObjectiveImprovementThreshold Nonnegative real. intlinprog changes the current feasible solution only when it locates another with an objective function value that is at least ObjectiveImprovementThreshold lower: (fold – fnew)/(1 + fold) > ObjectiveImprovementThreshold. intlinprog optimoptions only
ObjectiveLimit

If the objective function value goes below ObjectiveLimit and the iterate is feasible, then the iterations halt.

fminconfminuncquadprog  
OptimalityTolerance

Termination tolerance on the first-order optimality.

fgoalattainfminconfminimaxfminsearchfminuncfseminffsolvelinprog (interior-pointonly), lsqcurvefitlsqlinlsqnonlinquadprog

optimoptions only. For optimset, use TolFun
OutputFcn

Specify one or more user-defined functions that the optimization function calls at each iteration. See Output Function or intlinprog Output Functions and Plot Functions.

fgoalattainfminbndfminconfminimaxfminsearchfminuncfseminffsolvefzerointlinproglsqcurvefitlsqnonlin

 
PlotFcn

Plots various measures of progress while the algorithm executes. Select from predefined plots or write your own.

  • @optimplotx plots the current point

  • @optimplotfunccount plots the function count

  • @optimplotfval plots the function value

  • @optimplotconstrviolation plots the maximum constraint violation

  • @optimplotresnorm plots the norm of the residuals

  • @optimplotfirstorderopt plots the first-order of optimality

  • @optimplotstepsize plots the step size

  • @optimplotmilp plots the gap for mixed-integer linear programs

See Plot Functions or intlinprog Output Functions and Plot Functions.

fgoalattainfminbndfminconfminimaxfminsearchfminuncfseminffsolvefzerointlinproglsqcurvefitlsqnonlin. See the individual function reference pages for the values that apply.

optimoptions only. For optimset, use PlotFcns
RelativeGapTolerance

Real from 0 through 1intlinprog stops if the relative difference between the internally calculated upper (U) and lower (L) bounds on the objective function is less than or equal toRelativeGapTolerance:

(U – L) / (abs(U) + 1) <= RelativeGapTolerance.

intlinprog automatically modifies the tolerance for large L magnitudes:

tolerance = min(1/(1+|L|), RelativeGapTolerance)

intlinprog optimoptions only
RootLPAlgorithm

Algorithm for solving linear programs:

  • 'dual-simplex' — Dual simplex algorithm

  • 'primal-simplex' — Primal simplex algorithm

intlinprog optimoptions only
RootLPMaxIterations Nonnegative integer that is the maximum number of simplex algorithm iterations to solve the initial linear programming problem. intlinprog optimoptions only
ScaleProblem

For fmincon interior-point and sqpalgorithms, true causes the algorithm to normalize all constraints and the objective function by their initial values. Disable by setting to the default false.

fmincon  

Simplex

Use Algorithm instead

If 'on', function uses the simplex algorithm.

linprog

optimset only
SpecifyConstraintGradient

User-defined gradients for the nonlinear constraints.

fgoalattainfminconfminimax

optimoptions only. For optimset, use GradConstr
SpecifyObjectiveGradient

User-defined gradients or Jacobians for the objective functions.

fgoalattainfminconfminimaxfminuncfseminffsolvelsqcurvefitlsqnonlin

optimoptions only. For optimset, use GradObj or Jacobian
StepTolerance

Termination tolerance on x.

All functions except linprogand lsqlin, and the quadprog'active-set' algorithm

optimoptions only. For optimset, use TolX
SubproblemAlgorithm

Determines how the iteration step is calculated.

fmincon  
TypicalX

Array that specifies typical magnitude of array of parameters x. The size of the array is equal to the size of x0, the starting point. Primarily for scaling finite differences for gradient estimation.

fgoalattainfminconfminimaxfminuncfsolvelsqcurvefitlsqlinlsqnonlinquadprog

 
UseParallel

When true, applicable solvers estimate gradients in parallel. Disable by setting to false.

fgoalattainfminconfminimaxfminuncfsolvelsqcurvefitlsqnonlin.

 

Hidden Options

optimoptions “hides” some options, meaning it does not display their values. To learn how to view these options, and why they are hidden, see View Options.

Function reference pages list these options in italics.

  • Hidden Optimization Toolbox Options

  • Hidden Global Optimization Toolbox Options

Hidden Optimization Toolbox Options

This table lists the hidden Optimization Toolbox™ options.

Options that optimoptions Hides

Option Name Description Used by Functions Restrictions
Diagnostics

Display diagnostic information about the function to be minimized or solved.

All but fminbndfminsearchfzero, and lsqnonneg

 
DiffMaxChange

Maximum change in variables for finite differencing.

fgoalattainfminconfminimaxfminuncfseminffsolvelsqcurvefitlsqnonlin

 
DiffMinChange

Minimum change in variables for finite differencing.

fgoalattainfminconfminimaxfminuncfseminffsolvelsqcurvefitlsqnonlin

 
FunValCheck

Check whether objective function and constraints values are valid. 'on' displays an error when the objective function or constraints return a value that is complexNaN, or Inf.

Note

FunValCheck does not return an error for Infwhen used with fminbndfminsearch, or fzero, which handle Inf appropriately.

'off' displays no error.

fgoalattainfminbndfminconfminimaxfminsearchfminuncfseminffsolvefzerolsqcurvefitlsqnonlin

 
HessPattern

Sparsity pattern of the Hessian for finite differencing. The size of the matrix is n-by-n, where n is the number of elements in x0, the starting point.

fminconfminunc

 
HessUpdate

Quasi-Newton updating scheme.

fminunc

 
InitBarrierParam

Initial barrier value.

fmincon  
InitDamping

Initial Levenberg-Marquardt parameter.

fsolvelsqcurvefitlsqnonlin optimoptions only
InitTrustRegionRadius

Initial radius of the trust region.

fmincon  
JacobPattern

Sparsity pattern of the Jacobian for finite differencing. The size of the matrix is m-by-n, where mis the number of values in the first argument returned by the user-specified function fun, and n is the number of elements in x0, the starting point.

fsolvelsqcurvefitlsqnonlin

 
LPPreprocess

Type of preprocessing for the solution to the relaxed linear program (see Linear Program Preprocessing):

  • 'none' — No preprocessing.

  • 'basic' — Use preprocessing.

intlinprog optimoptions only
MaxPCGIter

Maximum number of iterations of preconditioned conjugate gradients method allowed.

fminconfminuncfsolvelsqcurvefitlsqlinlsqnonlinquadprog

 
MaxProjCGIter

A tolerance for the number of projected conjugate gradient iterations; this is an inner iteration, not the number of iterations of the algorithm.

fmincon  
MaxSQPIter

Maximum number of iterations of sequential quadratic programming method allowed.

fgoalattainfminconfminimax

 
MeritFunction

Use goal attainment/minimax merit function (multiobjective) vs. fmincon (single objective).

fgoalattainfminimax

 
PrecondBandWidth

Upper bandwidth of preconditioner for PCG. Setting to 'Inf' uses a direct factorization instead of CG.

fminconfminuncfsolvelsqcurvefitlsqlinlsqnonlinquadprog

 
Preprocess

Level of LP preprocessing prior to simplex or dual simplex algorithm iterations.

linprog

optimoptions only
RelLineSrchBnd

Relative bound on line search step length.

fgoalattainfminconfminimaxfseminf

 
RelLineSrchBndDuration

Number of iterations for which the bound specified in RelLineSrchBnd should be active.

fgoalattainfminconfminimaxfseminf

 
ScaleProblem

When using the Algorithmoption 'levenberg-marquardt', setting the ScaleProblem option to 'jacobian' sometimes helps the solver on badly-scaled problems.

fsolvelsqcurvefitlsqnonlin  
TolConSQP

Constraint violation tolerance for the inner SQP iteration.

fgoalattainfminconfminimaxfseminf  
TolPCG

Termination tolerance on the PCG iteration.

fminconfminuncfsolvelsqcurvefitlsqlinlsqnonlinquadprog

 
TolProjCG

A relative tolerance for projected conjugate gradient algorithm; this is for an inner iteration, not the algorithm iteration.

fmincon  
TolProjCGAbs

Absolute tolerance for projected conjugate gradient algorithm; this is for an inner iteration, not the algorithm iteration.

fmincon  

Hidden Global Optimization Toolbox Options

For the reasons these options are hidden, see Options that optimoptions Hides (Global Optimization Toolbox).

Options that optimoptions Hides

Option Name Used by Functions
Cache

patternsearch

CacheSize

patternsearch

CacheTol

patternsearch

DisplayInterval

particleswarmsimulannealbnd

FunValCheck

particleswarm

HybridInterval

simulannealbnd

InitialPenalty

gapatternsearch

MaxMeshSize

patternsearch

MeshRotate

patternsearch

MigrationDirection

ga

MigrationFraction

ga

MigrationInterval

ga

PenaltyFactor

gapatternsearch

PlotInterval

gapatternsearchsimulannealbnd

StallTest

ga

TolBind patternsearch

Optimization Options Reference相关推荐

  1. Matlab线性/非线性规划优化算法(1)

    在Matlab中解形如下式的线性规划问题: 其中包括优化对象 f' * x, 不等式约束,等式约束,以及约束变量的上下界. 在Matlab中提供了linprog函数进行线性优化的求解: eg: [x, ...

  2. MATLAB-fsolve函数帮助文档翻译与补充

    fsolve 解非线性方程组 非线性系统解算器 解决指定的问题 F(x)= 0 对于x, F(x)是一个返回向量值的函数. x是一个向量或者一个矩阵;看矩阵参数. 语法: x = fsolve(fun ...

  3. SAP EWM 性能优化(一)

    http://www.cnblogs.com/byfhd/archive/2012/09/28/2706557.html EWM是SAP较新的SCM下的产品,实际磨练比不上SAP ERP系列,仓库系统 ...

  4. GCC优化选项:一般的文档里不容易找到的-Os

    From: http://hi.baidu.com/ah__fu/item/9287dd5227227c908d12ed50 在研究编译驱动的makefile的时候,发现GCC的命令行里面有一个-Os ...

  5. 【三维深度学习】多视角立体视觉 MVSNet代码解读

    MVSNet通过将相机几何参数编码到网络中,实现了端到端的多视角三维重建,并在性能和视觉效果上超越了先前算法,并在eccv2018 oral中发表. 模型主要包含四个主要步骤:图像特征抽取.多视角可微 ...

  6. 吴恩达机器学习练习2:optimset和fminunc函数

    在练习2中使用了到了两个函数:optimset和fminunc. % Set options for fminunc options = optimset('GradObj', 'on', 'MaxI ...

  7. 【GCC】gcc警告选项汇总--编辑中|gcc编译选项

    目录 前言 请求或取消警告选项 GCC编译选项 参考原文:https://blog.csdn.net/qq_17308321/article/details/79979514 前言 警告:不是错误的, ...

  8. gcc警告选项汇总 转

    ---------------- 原文链接:https://blog.csdn.net/qq_17308321/article/details/79979514 参考资料:https://gcc.gn ...

  9. android有用的命令

    转载请指明出处:草帽的后花园 文件1:下载 Android Tools详解 aapt aapt即Android Asset Packaging Tool , 在SDK的platform-tools目录 ...

最新文章

  1. Git 最全命令总结都在这里了
  2. 复旦大学邱锡鹏教授等「Transformers全面综述」论文
  3. Android:Handler的消息机制
  4. VS2010没有Intellisense(智能感知)的解决办法
  5. cad抛物线曲线lisp_曲线的转弯半径和曲率 - AutoLISP/Visual LISP 编程技术 - CAD论坛 - 明经CAD社区 - Powered by Discuz!...
  6. oracle11g imp性能,怎么最快地把本机的oracle11g数据导入xe
  7. 配置普通用户可以运行saltstack的模块
  8. 基于OpenGL的三种直线生成算法
  9. link 和 @import 的区别
  10. Sliverlight MD5
  11. 批量画同心不同半径圆lisp_cad绘制同心圆lisp二次开发源代码
  12. 微信小程序-通知滚动小提示
  13. Dentry negativity/negative dentry
  14. cut out数据增强_ChIP-Seq数据分析(PE型)
  15. 斯诺登给普通人开发了个「反监控」的 App
  16. Java成员变量初始化顺序
  17. 百家号怎么发送链接,发送自己的链接变成文字等解答
  18. Untiy学习 简单的脚本方法
  19. 开发JAVA第一步,教你选好JSP虚拟空间
  20. 年底买基金的六大建议!

热门文章

  1. 数据挖掘(9-22):数据离散程度+数据清理+三大相关系数+数据库索引(数据库面试常问)+P值含义及理解
  2. Excel-函数-拆分和组合函数
  3. 微店和有赞的区别_微店和有赞那个好_陕南赤子_新浪博客
  4. Python bytes 反斜杠转义问题解决方法
  5. STM32 C语言编写环形存储区
  6. 互联网、云大数据相关书籍推荐
  7. mysql如何直接打开表_Navicat for MySQL:如何打开 MySQL 表,需要技巧
  8. 我们奔三了 说好了,只能看,不许哭啊。 谨此献给“1980~1989”出生的人
  9. Netty基础,Netty实现群聊系统
  10. 使用Bigemap计算挖填土石方量