Stores convex terms in a objective For non-quadratic terms like hinge(x) and abs(x), it needs to add auxilliary variables and linear constraints to the model Note: When this object is deleted, the constraints and variables it added to the model are removed. More...
#include <modeling.hpp>
Public Member Functions | |
| ConvexObjective (Model *model) | |
| void | addAffExpr (const AffExpr &) |
| void | addQuadExpr (const QuadExpr &) |
| void | addHinge (const AffExpr &, double coeff) |
| void | addAbs (const AffExpr &, double coeff) |
| void | addHinges (const AffExprVector &) |
| void | addL1Norm (const AffExprVector &) |
| void | addL2Norm (const AffExprVector &) |
| void | addMax (const AffExprVector &) |
| bool | inModel () |
| void | addConstraintsToModel () |
| void | removeFromModel () |
| double | value (const vector< double > &x) |
Public Attributes | |
| Model * | model_ |
| QuadExpr | quad_ |
| vector< Var > | vars_ |
| vector< AffExpr > | eqs_ |
| vector< AffExpr > | ineqs_ |
| vector< Cnt > | cnts_ |
Stores convex terms in a objective For non-quadratic terms like hinge(x) and abs(x), it needs to add auxilliary variables and linear constraints to the model Note: When this object is deleted, the constraints and variables it added to the model are removed.
1.8.3