34 using namespace ifopt;
48 std::cout << nlp.
GetOptVariables()->GetValues().transpose() << std::endl;
Composite::Ptr GetOptVariables() const
Read/write access to the current optimization variables.
A generic optimization problem with variables, costs and constraints.
void AddCostSet(CostTerm::Ptr cost_set)
Add a cost term to the optimization problem.
void PrintCurrent() const
Prints the variables, costs and constraints.
An interface to SNOPT, fully hiding its implementation.
common namespace for all elements in this library.
Example to generate a solver-independent formulation for the problem, taken from the IPOPT cpp_exampl...
void AddConstraintSet(ConstraintSet::Ptr constraint_set)
Add a set of multiple constraints to the optimization problem.
void AddVariableSet(VariableSet::Ptr variable_set)
Add one individual set of variables to the optimization problem.
void Solve(Problem &nlp) override
Creates a snoptProblemA from nlp and solves it.