[Documentation] [TitleIndex] [WordIndex

  Show EOL distros: 

Package Summary

An Eigen- based interface to Nonlinear Programming solver Ipopt. Inuitive and efficient C++ implementation of variables, costs and constraints using Eigen. Easy integration in your projects in catkin or pure cmake.

Package Summary

An Eigen- based interface to Nonlinear Programming solver Ipopt. Inuitive and efficient C++ implementation of variables, costs and constraints using Eigen. Easy integration in your projects in catkin or pure cmake.

Package Summary

An Eigen- based interface to Nonlinear Programming solver Ipopt. Inuitive and efficient C++ implementation of variables, costs and constraints using Eigen. Easy integration in your projects in catkin or pure cmake.

Package Summary

An Eigen- based interface to Nonlinear Programming solver Ipopt. Inuitive and efficient C++ implementation of variables, costs and constraints using Eigen. Easy integration in your projects in catkin or pure cmake.

Package Summary

An Eigen- based interface to Nonlinear Programming solver Ipopt. Inuitive and efficient C++ implementation of variables, costs and constraints using Eigen. Easy integration in your projects in catkin or pure cmake.


https://i.imgur.com/ZOfGZwB.png

Installation

$ sudo apt-get install ros-<distro>-ifopt

If this package has not yet made it to the binaries or for additional information, visit https://github.com/ethz-adrl/ifopt.

Problem

Nonlinear with constraints.

https://i.imgur.com/YGi4LrR.png

Solution

See here how the above problem is formulated using Eigen. Then it can be solved with, e.g. Ipopt, as:

   1 int main() {
   2 
   3   // Define the solver independent problem
   4   Problem nlp;
   5   nlp.AddVariableSet  (std::make_shared<ExVariables>());
   6   nlp.AddConstraintSet(std::make_shared<ExConstraint>());
   7   nlp.AddCostSet      (std::make_shared<ExCost>());
   8 
   9   // Initialize solver and options
  10   IpoptSolver ipopt;
  11   ipopt.SetOption("linear_solver", "mumps");
  12   ipopt.SetOption("jacobian_approximation", "exact");
  13 
  14   // Solve
  15   ipopt.Solve(nlp);
  16 
  17   std::cout << nlp.GetOptVariables()->GetValues().transpose() << std::endl;
  18 }

Output:

1.00 0.00

Publications

If you use this work in an academic context, please consider citing as

@misc{ifopt,
  author = {Alexander W Winkler},
  title  = {{Ifopt - A modern, light-weight, Eigen-based C++ interface to 
             Nonlinear Programming solvers Ipopt and Snopt.}},
  year   = {2018},
  doi    = {10.5281/zenodo.1135046},
  url    = {https://doi.org/10.5281/zenodo.1135046}
}

This software has been used in the following publications:


2024-10-05 14:14