基于问题的非线性优化
使用基于问题的方法以串行或并行方式求解非线性优化问题
在开始求解优化问题之前,您必须选择合适的方法:基于问题或基于求解器。有关详细信息,请参阅首先选择基于问题或基于求解器的方法。
将您的目标和非线性约束函数表示为使用优化变量的表达式,或使用 fcn2optimexpr
转换 MATLAB® 函数。有关问题设置,请参阅基于问题的优化设置。
函数
evaluate | 计算优化表达式 |
fcn2optimexpr | 将函数转换为优化表达式 (自 R2019a 起) |
infeasibility | 一个点处的约束违反值 |
optimproblem | 创建优化问题 |
optimvar | 创建优化变量 |
prob2struct | 将优化问题或方程问题转换为求解器形式 |
solve | 求解优化问题或方程问题 |
实时编辑器任务
优化 | 在实时编辑器中优化或求解方程 (自 R2020b 起) |
主题
基于无约束问题的应用
- Rational Objective Function, Problem-Based
This example shows how to create a rational objective function using optimization variables and solve the resulting unconstrained problem.
基于有约束问题的应用
- 基于问题求解有约束非线性优化
此示例说明如何基于优化表达式求解有约束非线性问题。该示例还说明如何将非线性函数转换为优化表达式。 - 将非线性函数转换为优化表达式
通过使用fcn2optimexpr
转换非线性函数,无论是表示为函数文件还是匿名函数。 - Constrained Electrostatic Nonlinear Optimization Using Optimization Variables
Define objective and constraint functions for a structured nonlinear optimization in the problem-based approach. - Discretized Optimal Trajectory, Problem-Based
This example shows how to solve a discretized optimal trajectory problem using the problem-based approach. - Problem-Based Nonlinear Minimization with Linear Constraints
Shows how to use optimization variables to create linear constraints, andfcn2optimexpr
to convert a function to an optimization expression. - Effect of Automatic Differentiation in Problem-Based Optimization
Automatic differentiation lowers the number of function evaluations for solving a problem. - Supply Derivatives in Problem-Based Workflow
How to include derivative information in problem-based optimization when automatic derivatives do not apply. - Obtain Generated Function Details
Find the values of extra parameters in nonlinear functions created byprob2struct
. - Objective and Constraints Having a Common Function in Serial or Parallel, Problem-Based
Save time when the objective and nonlinear constraint functions share common computations in the problem-based approach. - Solve Nonlinear Feasibility Problem, Problem-Based
Solve a feasibility problem, which is a problem with constraints only. - 使用基于问题的 Optimize 实时编辑器任务求解可行性问题
使用基于问题的优化实时编辑器任务和多个求解器来求解非线性可行性问题。 - Obtain Solution Using Feasibility Mode
Solve a problem with difficult constraints usingfmincon
feasibility mode. - Output Function for Problem-Based Optimization
Use an output function in the problem-based approach to record iteration history and to make a custom plot.
并行计算
- What Is Parallel Computing in Optimization Toolbox?
Use multiple processors for optimization. - 在 Optimization Toolbox 中使用并行计算
并行执行梯度估计。 - Improving Performance with Parallel Computing
Investigate factors for speeding optimizations.
仿真或 ODE
- 优化仿真或常微分方程
优化仿真、黑盒目标函数或 ODE 时的特殊注意事项。
算法和其他理论
- 无约束非线性优化算法
在无约束的情况下,在 n 个维度中最小化单目标函数。 - 约束非线性优化算法
在有各种约束的情况下,在 n 个维度中最小化单目标函数。 - fminsearch 算法
fminsearch
最小化函数所采取的步骤。 - 优化选项参考
了解优化选项。 - 局部最优与全局最优
解释为什么求解器可能找不到最小的最小值。 - Smooth Formulations of Nonsmooth Functions
Reformulate some nonsmooth functions as smooth functions by using auxiliary variables. - 优化参考书目
列出涉及优化求解器算法中所实现概念的已发布资料。