New:a new version of OptimPack is available at GitHub.
OptimPack is a portable C library which implements algorithms for optimization of large scale problems with bound constraints. I wrote this library for my image reconstruction algorithms by inverse problem approach. Hence large scale means some 106 variables (the pixel values) or more.
The most important algorithm is VMLM-B: a variable metric method with limited memory requirements and, possibly, bound constraints on the parameters. The algorithm is based on limited memory BFGS updates [1] with Moré & Thuente inexact line search [2] and gradient projection to account for bounds. The method has been described in [3].
In order to make embedding OptimPack into another language as easy as possible, the routines use reverse communication: all local variables needed by the optimization routines get saved into workspace arrays provided by the caller and the optimization routines never explicitely call the penalty function to optimize. OptimPack routines can be used in different languages via bindings to C, IDL and Yorick:
Most of the documention is in the header file "optimpack.h".
make
make PREFIX=/usr/local installwhich will:
yorick -batch make.i make clean make
make install
OptimPack is written in standard ANSI-C and should pose no problem of portability. However, in order to match the data types used in your software, you may have to set the values of the following macros:
This must be done before "optimpack.h" get included. If these macros are not defined, the default assumed in "optimpack.h" is:
OP_INTEGER = int OP_LOGICAL = int
For instance, one should write:
#define OP_INTEGER long #define OP_LOGICAL int #include "optimpack.h" ...
Of course, the installed OptimPack library must have been compiled with the correct data types. Another possibility is to define these macros when calling CPP (the C preprocessor) e.g. in Makefile:
CPPFLAGS = -DOP_INTEGER=long -DOP_LOGICAL=int -I.
a final possibility is to edit optimpack.h and to adjust the default values of these macros (at the very beginning of this file). If you plan to install in your system, the best is probably to fix the definitions in optimpack.h, then compile the library and finally install the library and the header file optimpack.h in proper system directories (e.g. with:
make install PREFIX=...