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

Non-convex optimization problem. More...

#include <modeling.hpp>

Inheritance diagram for sco::OptProb:
trajopt::TrajOptProb

Public Member Functions

VarVector createVariables (const vector< string > &names)
 create variables with bounds [-INFINITY, INFINITY]
 
VarVector createVariables (const vector< string > &names, const vector< double > &lb, const vector< double > &ub)
 create variables with bounds [lb[i], ub[i]
 
void setLowerBounds (const vector< double > &lb)
 set the lower bounds of all the variables
 
void setUpperBounds (const vector< double > &ub)
 set the upper bounds of all the variables
 
void setLowerBounds (const vector< double > &lb, const vector< Var > &vars)
 set lower bounds of some of the variables
 
void setUpperBounds (const vector< double > &ub, const vector< Var > &vars)
 set upper bounds of some of the variables
 
void addLinearConstraint (const AffExpr &, ConstraintType type)
 Note: in the current implementation, this function just adds the constraint to the model.
 
void addCost (CostPtr)
 Add nonlinear cost function.
 
void addConstraint (ConstraintPtr)
 Add nonlinear constraint function.
 
void addEqConstraint (ConstraintPtr)
 
void addIneqConstraint (ConstraintPtr)
 
vector< double > getCentralFeasiblePoint (const vector< double > &x)
 Find closest point to solution vector x that satisfies linear inequality constraints.
 
vector< double > getClosestFeasiblePoint (const vector< double > &x)
 
vector< ConstraintPtr > getConstraints () const
 
vector< CostPtr > & getCosts ()
 
vector< ConstraintPtr > & getIneqConstraints ()
 
vector< ConstraintPtr > & getEqConstraints ()
 
DblVec & getLowerBounds ()
 
DblVec & getUpperBounds ()
 
ModelPtr getModel ()
 
vector< Var > & getVars ()
 
int getNumCosts ()
 
int getNumConstraints ()
 
int getNumVars ()
 

Protected Member Functions

 OptProb (OptProb &)
 

Protected Attributes

ModelPtr model_
 
vector< Varvars_
 
vector< double > lower_bounds_
 
vector< double > upper_bounds_
 
vector< CostPtr > costs_
 
vector< ConstraintPtr > eqcnts_
 
vector< ConstraintPtr > ineqcnts_
 

Detailed Description

Non-convex optimization problem.

Member Function Documentation

void sco::OptProb::addLinearConstraint ( const AffExpr ,
ConstraintType  type 
)

Note: in the current implementation, this function just adds the constraint to the model.

So if you're not careful, you might end up with an infeasible problem.


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