trajopt
 All Classes Namespaces Files Functions Variables Typedefs Pages
bpmpd_interface.hpp
1 
2 #include "solver_interface.hpp"
3 #include "macros.h"
4 
5 namespace sco {
6 
7 
8 class BPMPDModel : public Model {
9 public:
10  vector<Var> m_vars;
11  vector<Cnt> m_cnts;
12  vector<AffExpr> m_cntExprs;
13  vector<ConstraintType> m_cntTypes;
14  vector<double> m_soln;
15  vector<double> m_lbs, m_ubs;
16 
17  QuadExpr m_objective;
18 
19  int m_pipeIn, m_pipeOut, m_pid;
20 
21  BPMPDModel();
22  virtual ~BPMPDModel();
23 
24  Var addVar(const string& name);
25  Cnt addEqCnt(const AffExpr&, const string& name);
26  Cnt addIneqCnt(const AffExpr&, const string& name);
27  Cnt addIneqCnt(const QuadExpr&, const string& name);
28  void removeVars(const VarVector& vars);
29  void removeCnts(const vector<Cnt>& cnts);
30 
31  void update();
32  void setVarBounds(const vector<Var>& vars, const vector<double>& lower, const vector<double>& upper);
33  vector<double> getVarValues(const VarVector& vars) const;
34  virtual CvxOptStatus optimize();
35  virtual void setObjective(const AffExpr&);
36  virtual void setObjective(const QuadExpr&);
37  virtual void writeToFile(const string& fname);
38  virtual VarVector getVars() const;
39 
40 };
41 
42 }