Main Content

mpcInteriorPointOptions

Create default option set for mpcInteriorPointSolver

Since R2020a

Description

Settings for mpcInteriorPointSolver, that you can use to solve a QP optimization problem. To set options for the interior-point QP solver used within the mpc object instead, access the InteriorPoint object within the Optimizer property of the mpc object using dot notation.

options = mpcInteriorPointOptions creates an InteriorPoint options object containing default options for mpcInteriorPointSolver, which solves a quadratic programming (QP) problem using an interior-point algorithm.

example

options = mpcInteriorPointOptions(type) creates a default option set using the specified input data type. All real options are specified using this data type.

example

Examples

collapse all

Create a default option set.

opt = mpcInteriorPointOptions;

Create a default option set.

opt = mpcInteriorPointOptions;

Specify the maximum number of iterations allowed during computation.

opt.MaxIterations = 100;

Specify a constraint tolerance for verifying that the optimal solution satisfies the inequality constraints.

opt.ConstraintTolerance = 1.0e-4;

Create a default option set, specifying the input argument type.

opt = mpcInteriorPointOptions('single');

Input Arguments

collapse all

Solver input argument data type, specified as either 'double' or 'single'. This data type is used for both simulation and code generation. All real options in the option set are specified using this data type, and all real input arguments to mpcInteriorPointSolver must match this type.

Output Arguments

collapse all

Option set for mpcInteriorPointSolver, returned as an InteriorPoint options object, which has the following properties.

FieldDescriptionDefault
DataTypeInput argument data type, specified as either 'double' or 'single'. This data type is used for both simulation and code generation, and all real input arguments to the solver function must match this type.'double'
MaxIterationsMaximum number of iterations allowed when computing the QP solution, specified as a positive integer.50
ConstraintToleranceTolerance used to verify that equality and inequality constraints are satisfied by the optimal solution, specified as a positive scalar. A larger ConstraintTolerance value allows for larger constraint violations.1e-6
OptimalityToleranceTermination tolerance for first-order optimality (KKT dual residual), specified as a positive scalar. Increasing this value relaxes the condition for the optimality check.1e-6
ComplementarityToleranceTermination tolerance for first-order optimality (KKT average complementarity residual), specified as a positive scalar. Increasing this value improves robustness, while decreasing this value increases accuracy.1e-8
StepToleranceTermination tolerance for decision variables, specified as a positive scalar.1e-8
IntegrityChecksIndicator of whether integrity checks are performed on the solver function input data, specified as a logical value. If IntegrityChecks is true, then integrity checks are performed and diagnostic messages are displayed. Use false for code generation only.true

Extended Capabilities

Version History

Introduced in R2020a