trajopt
 All Classes Namespaces Files Functions Variables Typedefs Pages
Public Member Functions | Public Attributes | List of all members
sco::ConvexObjective Class Reference

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

Modelmodel_
 
QuadExpr quad_
 
vector< Varvars_
 
vector< AffExpreqs_
 
vector< AffExprineqs_
 
vector< Cntcnts_
 

Detailed Description

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.


The documentation for this class was generated from the following file: