Superseded by DefineOptimization as of Analytica 4.3.

QpDefine(vars, vars2, constraints, c, Q, rhs, sense, lhs,...)

QpDefine is used to define a quadratic optimization problem -- a problem containing a linear or quadratic objective, and linear or quadratic constraints. It has been superseded by DefineOptimization in Analytica 4.3.

Please see that Analytica Optimizer manual for Analytica 4.2 for a description of QpDefine.

The DefineOptimization function is typically far more convenient to use for specifying quadratic (or any other type of) optimization problems. If you are using Analytica 4.3 or later, use DefineOptimization instead.


When filling in a quadratic matrix, there are, in theory, multiple ways to specify the coefficients. For example, the quadratic expression:

x^2 + 4*x*y + 3*y^2

would be, in theory, represented identically using the lower-triangular Q matrix:

[ 1 0 ]
[ 4 3 ]

its upper-trangular transpose, the symmetric Q-matrix:

[ 1 2 ]
[ 2 3 ]

or any convex combination of these. However, the "SOCP Barrier" engine only interprets the matrix correctly when it is symmetric. It only looks at the upper-triangle, and assumes that the lower-triangle coefficients are the same. In Analytica 4.2 and earlier, QpDefine does not convert a non-symmetric Q into its symmetric counterpart internally for you, so it is important that you provide a symmetric Q matrix, not a lower-triangular one.

See Also


You are not allowed to post comments.