Before you begin to solve an optimization problem, you must choose the appropriate approach: problem-based or solver-based. For details, seeFirst Choose Problem-Based or Solver-Based Approach.
Formulate your objective and nonlinear constraint functions as expressions in optimization variables, or convert MATLAB®functions usingFCN2OPTIMEXPR
. For problem setup, see基于问题的优化设置.
evaluate |
Evaluate optimization expression |
FCN2OPTIMEXPR |
Convert function to optimization expression |
不可见 |
Constraint violation at a point |
optimproblem |
Create optimization problem |
Optimvar |
Create optimization variables |
prob2struct |
将优化问题或方程问题转换为求解器形式 |
solve |
解决优化问题或方程问题 |
Rational Objective Function, Problem-Based
This example shows how to create a rational objective function using optimization variables and solve the resulting unconstrained problem.
Solve Constrained Nonlinear Optimization, Problem-Based
This example shows how to solve a constrained nonlinear problem based on optimization expressions. The example also shows how to convert a nonlinear function to an optimization expression.
Convert Nonlinear Function to Optimization Expression
通过使用FCN2OPTIMEXPR
.
Shows how to define objective and constraint functions for a structured nonlinear optimization in 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.
How to include derivative information in problem-based optimization when automatic derivatives do not apply.
在由非线性函数中找到额外参数的值prob2struct
.
Objective and Constraints Having a Common Function in Serial or Parallel, Problem-Based
在基于问题的方法中共享目标和非线性约束函数时,请节省时间。
Solve Nonlinear Feasibility Problem, Problem-Based
Solve a feasibility problem, which is a problem with constraints only.
Obtain Solution Using Feasibility Mode
解决问题的问题fmincon
可行性模式。
Use an output function in the problem-based approach to record iteration history and to make a custom plot.
Use multiple processors for optimization.
Using Parallel Computing in Optimization Toolbox
并联执行梯度估计。
Improving Performance with Parallel Computing
Investigate factors for speeding optimizations.
Optimizing a Simulation or Ordinary Differential Equation
Special considerations in optimizing simulations, black-box objective functions, or ODEs.
Minimizing a single objective function inndimensions without constraints.
Constrained Nonlinear Optimization Algorithms
Minimizing a single objective function inn具有各种约束的维度。
Steps thatfminsearch
采取最小化功能。
Optimization Options Reference
Explore optimization options.
Explains why solvers might not find the smallest minimum.
Smooth Formulations of Nonsmooth Functions
Reformulate some nonsmooth functions as smooth functions by using auxiliary variables.
Lists published materials that support concepts implemented in the solver algorithms.