OptimPack

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:

Documentation

Most of the documention is in the header file "optimpack.h".

Installation

  1. Download the source archive OptimPack-1.3.2.tar.bz2 and unpack it.
  2. Edit the Makefile (see "Portability Issues" below).
  3. Compile the library:
    make
    
  4. Optionaly install the software, for instance:
    make PREFIX=/usr/local install
    
    which will:

Yorick Installation

  1. After unpacking the archive (you don't need to build the library), go to directory "yorick".
  2. Edit the very first part of makefile whether you want or don't want support for LBFGS and LBFGSB algorithms.
  3. Setup for compilation and compile the plugin code:
    yorick -batch make.i
    make clean
    make
    
  4. Optionaly install plugin in Yorick tree:
    make install
    

Portability Issues

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=...

References

[1] J. Nocedal, "Updating Quasi-Newton Matrices with Limited Storage," Mathematics of Computation 35, pp. 773—782, 1980. [2] Jorge J. Moré & and David J. Thuente, "Line search algorithms with guaranteed sufficient decrease," in ACM Transactions on Mathematical Software (TOMS) Volume 20, Issue 3, Pages 286—307, September 1994.
[3] pdf É. Thiébaut, "Optimization issues in blind deconvolution algorithms," Proc. SPIE 4847, pp. 174—183, 2002.