Go to the documentation of this file.
33 using namespace ifopt;
46 ipopt.
SetOption(
"linear_solver",
"mumps");
47 ipopt.
SetOption(
"jacobian_approximation",
"exact");
52 std::cout << x.transpose() << std::endl;
56 assert(1.0 - eps < x(0) && x(0) < 1.0 + eps);
57 assert(0.0 - eps < x(1) && x(1) < 0.0 + eps);
void Solve(Problem &nlp) override
Creates an IpoptAdapter and solves the NLP.
void AddConstraintSet(ConstraintSet::Ptr constraint_set)
Add a set of multiple constraints to the optimization problem.
void SetOption(const std::string &name, const std::string &value)
A generic optimization problem with variables, costs and constraints.
An interface to IPOPT, fully hiding its implementation.
void AddCostSet(CostTerm::Ptr cost_set)
Add a cost term to the optimization problem.
Example to generate a solver-independent formulation for the problem, taken from the IPOPT cpp_exampl...
void AddVariableSet(VariableSet::Ptr variable_set)
Add one individual set of variables to the optimization problem.
common namespace for all elements in this library.
Composite::Ptr GetOptVariables() const
Read/write access to the current optimization variables.
void PrintCurrent() const
Prints the variables, costs and constraints.
ifopt
Author(s): Alexander W. Winkler
autogenerated on Mon Sep 18 2023 02:14:38