Optimization Options Reference


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

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
在处理硬件设计优化时,熟练掌握HDL Compiler for Verilog的各种编译选项是至关重要的。本回答将结合《Synopsys HDL Compiler Verilog参考手册评论指南》中的相关内容,为你详细解释如何正确设置编译选项优化设计流程。 参考资源链接:[Synopsys HDL Compiler Verilog参考手册评论指南](https://wenku.youkuaiyun.com/doc/29aowrxjmu?spm=1055.2569.3001.10343) 首先,你需要阅读并理解HDL Compiler Verilog Reference Manual V2000.05版本中的编译器设置部分。手册中详细介绍了各种编译选项及其用途,例如: - -综合选项(synthesis options):包括逻辑优化级别、技术映射、面积与速度权衡等,它们直接影响逻辑电路的性能。 - -调试选项(debugging options):用于在编译过程中生成额外的调试信息,帮助设计者跟踪问题和理解综合过程。 - -报告选项(reporting options):生成各种设计报告,如资源使用情况、时序分析报告,用于评估设计的质量。 - -性能优化选项(performance optimization options):通过设置不同的优化策略,例如area_opt、speed_opt,来达到设计的特定性能指标。 例如,在进行综合时,可以通过以下命令行参数设置优化级别: ``` hdlin -综合技术 map=asic -综合优化 speed ``` 这条命令指示HDL Compiler使用ASIC技术映射,并对设计进行速度优化。你还可以结合手册中介绍的其他选项,如area_optimization或timing_optimization,以达到更加精细的优化控制。 在使用这些编译选项时,务必遵循Synopsys的版权和保密规定,保证所有使用都在内部许可的范围内,并且遵守许可证协议。 在学习过程中,若遇到任何疑问或需要进一步的指导,可以通过电子邮件***与Synopsys公司取得联系,公司鼓励用户积极参与产品改进和技术交流。 通过本回答所述的步骤,结合《Synopsys HDL Compiler Verilog参考手册评论指南》提供的指南,你将能够有效地利用HDL Compiler的编译选项进行设计优化,提高硬件描述语言设计的性能。 参考资源链接:[Synopsys HDL Compiler Verilog参考手册评论指南](https://wenku.youkuaiyun.com/doc/29aowrxjmu?spm=1055.2569.3001.10343)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值