CONOPT
|
Topics | |
C++ examples using automatic differentiation | |
Examples written in C++ using the ADOL-C package for automatic differentiation. | |
Python examples using automatic differentiation | |
Examples written in Python using the ADOL-C package for automatic differentiation. | |
Examples written in C++ and Python that make use of the automatic differentiation package ADOL-C.
Examples have been prepared in C++ and Python that demonstrate the use of the automatic differentiation package ADOL-C. While the examples use ADOL-C, it is possible to use other automatic differentiation packages with CONOPT. However, only the details on how to build CONOPT with ADOL-C will be provided here.
Before building the automatic differentiation examples, the first step is to download, build and install ADOL-C. The source code is available from the repository hosted on Github, which is found at https://github.com/coin-or/ADOL-C. We recommend checking out the tagged version releases/2.7.2
, since this has been used when testing the provided examples. After checking out releases/2.7.2
, ADOL-C can be built as follows:
swig
, numpy
and setuptools
are required for building the Python interface for ADOL-C.releases/2.7.2
, but will not continue with later releases. The examples will be updated with the latest release of ADOL-C.adol-c-swig.patch
that is available in the examples/AD/Python_1thread
directory. This is achieved by executing the following command in the base directory of ADOL-C: autoreconf -fi
../configure
. If you are building the Python interface, it is necessary to include the option --enable-sparse
. Also, if you wish to have an alternative install directory, this can be set by using passing the option --prefix=<install-dir>
to the ./configure
command.make
, then make install
.make
command, you will be provided with some information about how to link against the installed ADOL-C directories.If building ADOL-C on Windows, there is some more information available at https://github.com/coin-or/ADOL-C/blob/releases/2.7.2/INSTALL