Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

二次规划和锥规划

求解具有二次目标和线性约束或锥约束的问题

在开始求解优化问题之前,您必须选择合适的方法:基于问题或基于求解器。有关详细信息,请参阅 首先选择基于问题或基于求解器的方法

对于基于问题的方法,请创建问题变量,然后用这些符号变量表示目标函数和约束。有关基于问题的求解步骤,请参阅Problem-Based Optimization Workflow。要求解生成的问题,请使用 solve

有关基于求解器的求解步骤,包括定义目标函数和约束,以及选择合适的求解器,请参阅基于求解器的优化问题设置。要求解生成的问题,请使用 quadprogconeprog

函数

全部展开

evaluate计算优化表达式
infeasibility一个点处的约束违反度
optimproblem创建优化问题
optimvar创建优化变量
solve求解优化问题或方程问题
coneprogSecond-order cone programming solver
quadprog二次规划
secondorderconeCreate second-order cone constraint

实时编辑器任务

优化Optimize or solve equations in the Live Editor

对象

SecondOrderConeConstraintSecond-order cone constraint object

主题

基于问题的二次规划

Quadratic Programming with Bound Constraints: Problem-Based

Shows how to solve a problem-based quadratic programming problem with bound constraints using different algorithms.

Large Sparse Quadratic Program, Problem-Based

Shows how to solve a large sparse quadratic program using the problem-based approach.

Bound-Constrained Quadratic Programming, Problem-Based

Example showing large-scale problem-based quadratic programming.

Quadratic Programming for Portfolio Optimization, Problem-Based

Example showing problem-based quadratic programming on a basic portfolio model.

基于求解器的二次规划

Quadratic Minimization with Bound Constraints

Example of quadratic programming with bound constraints and various options.

Quadratic Programming with Many Linear Constraints

This example shows the benefit of the active-set algorithm on problems with many linear constraints.

Quadratic Minimization with Dense, Structured Hessian

Example showing how to save memory in a structured quadratic program.

Large Sparse Quadratic Program with Interior Point Algorithm

Example showing how to save memory in a quadratic program by using a sparse quadratic matrix.

Bound-Constrained Quadratic Programming, Solver-Based

Example showing solver-based large-scale quadratic programming.

Quadratic Programming for Portfolio Optimization Problems, Solver-Based

Example showing solver-based quadratic programming on a basic portfolio model.

二阶锥规划

Minimize Energy of Piecewise Linear Mass-Spring System Using Cone Programming, Solver-Based

Solve a mechanical mass-spring problem using cone programming.

Convert Quadratic Constraints to Second-Order Cone Constraints

Convert quadratic constraints into coneprog form.

Convert Quadratic Programming Problem to Second-Order Cone Program

Convert a quadratic programming problem to a second-order cone problem.

代码生成

Code Generation for quadprog Background

Prerequisites to generate C code for quadratic optimization.

Generate Code for quadprog

Learn the basics of code generation for the quadprog optimization solver.

Optimization Code Generation for Real-Time Applications

Explore techniques for handling real-time requirements in generated code.

基于问题的算法

Problem-Based Optimization Algorithms

How the optimization functions and objects solve optimization problems.

Supported Operations on Optimization Variables and Expressions

Lists all available mathematical and indexing operations on optimization variables and expressions.

算法和选项

二次规划算法

在仅具有线性和边界约束的情况下在 n 个维度中最小化二次目标函数。

Second-Order Cone Programming Algorithm

Description of the underlying algorithm.

优化选项参考

了解优化选项。