 |
Epigraph
Convex Optimization in C++
|
Go to the documentation of this file.
134 friend internal::SOCPWrapperBase;
135 friend internal::QPWrapperBase;
142 std::vector<internal::EqualityConstraint> equality_constraints;
143 std::vector<internal::PositiveConstraint> positive_constraints;
144 std::vector<internal::BoxConstraint> box_constraints;
145 std::vector<internal::SecondOrderConeConstraint> second_order_cone_constraints;
147 std::map<std::string, Scalar> scalar_variables;
148 std::map<std::string, VectorX> vector_variables;
149 std::map<std::string, MatrixX> matrix_variables;
void addConstraint(const std::vector< Constraint > &constraints)
Add multiple constraints to the problem.
void getVariable(const std::string &name, Scalar &var)
Get a scalar variable that exists in the problem.
void getVariable(const std::string &name, MatrixX &var)
Get a matrix variable that exists in the problem.
VectorX addVariable(const std::string &name, size_t rows)
Creates and returns a vector of variables.
void getVariableValue(const std::string &name, Eigen::MatrixXd &var)
Get the value of a matrix variable.
double getOptimalValue() const
Returns the evaluated cost function. Only call this after the problem has been solved.
Definition: constraint.hpp:47
void getVariableValue(const std::string &name, Eigen::VectorXd &var)
Get the value of a vector variable.
Definition: problem.hpp:14
size_t getNumVariables() const
Returns the number of used variables in the problem.
void addCostTerm(const Scalar &term)
Add a cost term to the problem's cost function. This has to be a scalar.
Definition: expressions.hpp:117
MatrixX addVariable(const std::string &name, size_t rows, size_t cols)
Creates and returns a matrix of variables.
void getVariableValue(const std::string &name, double &var)
Get the value of a scalar variable.
void addConstraint(const Constraint &constraint)
Add a single constraint to the problem. found.
Scalar addVariable(const std::string &name)
Creates and returns a variable.
void getVariable(const std::string &name, VectorX &var)
Get a vector variable that exists in the problem.