Skip to content

contramundum53/ecos-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecos-cpp

Ecos-cpp is a object-oriented modern-C++ wrapper of ECOS(Embedded Conic Solver), a lightweight Second-Order Cone Programming solver. Ecos-cpp uses Eigen for its interface and is meant to be more user-friendly than the original C interface.

Second-order Cone Programming

Ecos-cpp solves the following optimization problem:

$$\begin{align}\arg\min_{x}\quad & c^T x\\ \mathrm{s.t.}\quad& h-Gx\in K\\ & Ax-b = 0\end{align}$$

where $K$ is a direct product of positive orthant $\mathbb{R}_+^p$, quadratic cone ${(y, z) | |z|_2 \le y}$ and exponential cone $\mathrm{closure}{(x,y,z) | \exp\frac{x}{z} \le \frac{y}{z}, z>0}$.

Prerequisite

  • Eigen 3
  • CMake
  • A C++ compiler that can compile C++11 (test code uses C++17 features.)

Using the library through CMake

Write the following code in your CMakeLists.txt:

add_subdirectory(<path-to-this-directory>)

...

target_link_libraries(<your-target> PUBLIC|PRIVATE ecos-cpp)

#include <ecos_cpp.hpp> in your c++ code.

Building and running tests

mkdir build
cd build
cmake .. 
make ecos-cpp-test
./ecos-cpp-test 1 1 1

About

C++ wrapper for ecos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published