Awesome
Kodiak, a C++ Library for Rigorous Branch and Bound Computation
Kodiak is a C++ library that implements a generic branch and bound algorithm for rigorous numerical approximations. Particular instances of the branch and bound algorithm allow the user to refine and isolate solutions to systems of nonlinear equations and inequalities, global optimization problems, and bifurcation sets for systems of ODEs. Kodiak utilizes interval arithmetic (via the filib++ library) and Bernstein enclosure (for polynomials and rational functions) as self-validating enclosure methods. Symbolic operations support procedures such as automatic partial differentiation.
Maintainers
Marco A. Feliu (marco.feliu@nianet.org), National Institute of Aerospace
Aaron M. Dutle (aaron.m.dutle@nasa.gov), NASA Langley Research Center, US.
Previous Contributors
Cesar A. Munoz, formerly at NASA Langley Research Center, US.
Andrew P. Smith, formerly at National Institute of Aerospace, US.
Anthony Narkawicz, formerly at NASA Langley Research Center, US.
Mantas Markevicius, formerly at University of York, UK.
Documentation
Currently, the main documentation is contained in this file. Publications concerning the library and associated algorithms are in preparation. There are also numerous comments in the source code.
Support and Contribution
See the instructions in this file and the linked resources. For further assistance, or to report problems and bugs, please contact the authors. Contributions to the library are welcomed.
Obtaining Kodiak
The repository is located at: https://github.com/nasa/Kodiak/
License
The Kodiak C++ Library is released under NASA's Open Source Agreement.
See the files LICENSES/Kodiak-NOSA.pdf
and LICENSES/Kodiak-BooleanChecker-NOSA.pdf
;
see also the copyright notice at the end of this file.
Installation and Usage Options
Kodiak is installed from source code. Kodiak is run by encoding a problem in a C++ program file, then compiling and running it.
2. Prerequisites
It is recommended to run Kodiak on a Linux or Mac computer with the GNU C++ compiler; so far it has been successfully tested on Ubuntu Linux and Mac OS X. Use of Windows is not supported, although it ought to be feasible, and the authors would welcome any report of successfully running the software on Windows or any other system.
The following software should firstly be installed, if not already present (please follow the links for instructions and support):
-
C++ compiler (standard
>=C++14
required) -
CMake build tool (version
>=3.12
required) -
filib++ interval library (version
3.0.2
required) configured with the following options:$ ./configure CFLAGS=-fPIC CPPFLAGS=-fPIC CXXFLAGS=-fPIC
before invoking the
make
commands:$ make $ make install
-
Boost libraries (only for debugging): http://www.boost.org/users/download/ In addition to the headers, you need at least the library
serialization
.
2. Build Library and Examples
If necessary, unzip the zip file in order to extract the files. The following files and directories should be present:
- In the working directory: this
README.md
file and aCMakeListst.txt
file LICENSES
: licenses and copyrights for Kodiaklogo
: Kodiak's logo and creditssrc
: source code for the libraryexamples
: example C++ files (.cpp
) containing several problems
If any of the prerequisite libraries were installed in non-standard
directories, then the file CMakeLists.txt
should be modified accordingly.
Create a build
directory to keep the compiled libraries and make it
the current working directory:
$ mkdir build
$ cd build
Now, run CMake for creating the build scripts:
$ cmake ..
If this command fails because CMake cannot find FILIB, add the FILIB_ROOT
environment variable with the path to the FILIB source code directory used during the installation.
$ FILIB_ROOT=<FILIB-directory> cmake ..
Finally, build all targets by invoking the CMake build command:
$ cmake --build .
Using the Library
The Kodiak library is used in your own C/C++ programs.
A good way to start is to take one of the existing .cpp
files in the examples
directory and adapt it to your purposes.
You can either invoke the compiler directly with a link to the
filib++ and Kodiak libraries, or else add a new entry to
the examples/CMakeLists.txt
file.
For C programs, please use the src/Adapters/Codiak.h
header file to invoke Kodiak's routines.
Be aware that care must be taken with the order in which commands are invoked. All variables should be declared before any variable resolutions are set.
Version
Kodiak ver. 2.0.5, May 2024
Logo
The Kodiak logo was designed by Mahyar Malekpour (NASA).
License and Copyright Notice
The code in this repository is released under NASA's Open Source
Agreement. See the directory LICENSES
.