Skip to content

EmbersArc/EiCOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Eigen Conic Solver

A C++ Second Order Cone Solver for problems of the form

equation

symbols

The last constraint is generalized and includes both the positive orthant and second order cones, so that the top rows of G represent the linear constraints

equation

and the remaining rows contain stacked representations of the second order cones:

equation

Usage

#include "eicos.hpp"

Eigen::SparseMatrix<double> G, A;
Eigen::VectorXd c, h, b;
Eigen::VectorXi q;

// (Set up problem data)

// Construct a solver instance
EiCOS::Solver solver(G, A, c, h, b, q);

// Solve the problem
solver.solve()

// Save the solution
Eigen::VectorXd s = solver.solution();

// (Change entries in G, A, c, h, b)

// Update problem data: Using this method instead of constructing a new problem can
// save a lot of time, especially for larger problems. The only restriction is that 
// the sparsity pattern and dimensions must be the same as in the original problem.
solver.updateData(G, A, c, h, b);

// Rinse and repeat
solver.solve()

Dependencies

  • Eigen for linear algebra functionality
  • fmt (optional) for printing and formatting

CMake

To use the solver with a cmake project, simply include the subdirectory and link the library.

add_subdirectory(EiCOS)
target_link_libraries(my_library eicos)

Credits

This solver is entirely based on ECOS.

  • Alexander Domahidi (ECOS principal developer)
  • Eric Chu (ECOS unit tests)
  • Stephen Boyd (methods and maths)

About

A C++ Second Order Cone Solver based on Eigen

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published