7

I am dealing with optimization of functions for which I do not have derivatives available, and the optimization is not constrained. I am searching for a high quality GNU Public License-compatible optimization library compatible with the C++ language. So far I have managed to find OPT++.

Can someone recommend this or some other library?

Aron Ahmadia
  • 6,951
  • 4
  • 34
  • 54
tmaric
  • 1,916
  • 1
  • 11
  • 22
  • 2
    Why are you restricting yourself to C++ and GPL? Does the library merely need to be compatible with C++ and GPL licensing? I can't think of a good reason for restricting yourself in this search. – Aron Ahmadia Jul 31 '12 at 11:31
  • @Aron Ahmadia: I need to couple it with OpenFOAM, which is GPL based and written in C++. An alternative would be a library written in another language that has a C++ wrapper layer. – tmaric Jul 31 '12 at 12:30
  • Okay, please update your question since you are looking for a library that is GPL-compatible and easy to interface with C++ (this is almost always done through C bindings, which C++, unsurprisingly, provides). – Aron Ahmadia Jul 31 '12 at 13:31

2 Answers2

11

OPT++ is used internally by Dakota (Sandia), which is much more than an optimization library and is released under the LGPL. You should also take a look at TAO (ANL), released under a BSD-like license. An introduction to both OPT++ and TAO can be found here. Other alternatives are MOOCHO, NOMAD, and HOPSPACK, which are, as far as I know, also LGPL licensed.

Both Sandia and ANL offer automatic differentiation packages, like Sacado and ADIFOR/ADIC, that should play well with their general purpose numerical libraries Trilinos/PETSc.

gnzlbg
  • 1,075
  • 10
  • 18
5

The library NLopt meets your requirements. I have used it in the past and I am satisfied with its interface and results.

Juan M. Bello-Rivas
  • 3,994
  • 16
  • 24
  • Is there similar library with the ability to run in parallel? – Alexander Aug 05 '12 at 18:01
  • I don't know of any such library. With NLopt it is possible to parallelize the evaluation of constraints (see http://ab-initio.mit.edu/wiki/index.php/NLopt_Reference#Vector-valued_constraints ) but I don't know if there are any plans for implementing parallelism at the objective function evaluation level. – Juan M. Bello-Rivas Aug 05 '12 at 18:26