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.
Ecos-cpp solves the following optimization problem:
where
- Eigen 3
- CMake
- A C++ compiler that can compile C++11 (test code uses C++17 features.)
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.
mkdir build
cd build
cmake ..
make ecos-cpp-test
./ecos-cpp-test 1 1 1