The goal of the Coek project is to develop performant optimization modeling capabilities in both C++ and Python. This is a monorepo that contains the C++ Coek library, along with related C++ and Python libraries that support fast interfaces to large, complex optimization applications. Although the existing APIs for Coek and other libraries are stable, these capabilities are expected to evolve significantly in response to targetted experiments that demonstrate new strategies for performant optimization modeling.
Coek: A fast C++ library that supports the definition of expressions used to formulate and solve optimization problems.
pycoek: A library of Python bindings for Coek.
Poek: A performant Python library that supports the definition of expressions used to formulate and solve optimization problems.
pyomo_coek: Pyomo hybrids that leverage Coek to accelerate common operations.
aml_comparisons: Performance tests for Coek, Poek and related optimization modeling environments.
demos: Demonstrations that illustrate Coek capabilities.
The Coek Project uses CMake to manage configuration of the build:
- mkdir build
- cd build
- cmake ..
The default installation directory is set to build/install. Coek relies on a variety of third-party libraries, and CMake is setup to automatically download, install and configure the use of these libraries:
- make install_tpls
Third-party packages are installed in the installation directory. This uses a CMAKE superbuild process that requires multiple executions of the make command.
The default build logic for Coek is executed using make
:
- make
By default, this does the following:
- Build the Coek library.
- If third-party libraries are automatically installed, this includes support for automatic differentiation using CppAD.
- Build and install pycoek extensions.
- If third-party libraries are automatically installed, this includes support for pybind11 extensions.
- Install the Poek library in
editable
mode. - Build the aml_comparisons performance testing utilities.
- mkdir build
- cd build
- cmake -Dwith_tests=ON ..
- make intall_tpls
- make
- make test # Test all libraries
- make test_coek # Test the Coek library
- make test_poek # Test the Poek library
- mkdir build
- cd build
- cmake -Dinsecure_downloads=ON ..
- make install_tpls
- make
- mkdir build
- cd build
- cmake -Dwith_gurobi=ON ..
- make install_tpls
- make
- mkdir build
- cd build
- cmake ..
- make install_tpls
- make format-cpp-check # Show C++ files that would be reformatted with clang-format
- make format-cpp # Reformat C++ files with clang-format
- make format-py-check # Show Python files that would be reformatted with black
- make format-py # Reformat Python files with black