MC++
MC++ (version 2.0): Toolkit for Construction, Manipulation and Bounding of Factorable Functions
Author
Benoit C. Chachuat (b.cha.nosp@m.chua.nosp@m.t@imp.nosp@m.eria.nosp@m.l.ac..nosp@m.uk) and OMEGA Research Group (http://www3.imperial.ac.uk/environmentenergyoptimisation)
Date
2006-2014

MC++ (version 2.0) provides a collection of C++ classes for bounding factorable functions, including interval bounds, convex/concave relaxations, Taylor model estimators, and spectral bounds. The implementation of MC++ relies on operator/function overloading and templates. Our main emphasis in developing MC++ is to make the computation of bounds as simple and natural as possible, similar to computing function values in real arithmetics. In particular, we hope that you will find MC++ most useful for the fast prototyping and testing of new algorithms and ideas, for instance in areas such as global and robust optimization.

How Do I Install and Test MC++?

MC++ is released as open source code under the Eclipse Public License (EPL).

MC++ depends on the following third-party libraries:, which are provided in src/3rdparty/:

  • FADBAD++ (version 2.1) to enable combination of bounding techniques in MC++ with automatic differentiation (AD), which is provided in src/3rdparty/fadbad++/;
  • BLAS and LAPACK (version 4.3) for linear algebra computations, which are not included in the MC++ distribution.

It is strongly recommended that the following software packages be also installed (and used):

  • PROFIL and/or FILIB++ to perform verified interval computation
  • CppUnit for unit testing of the various features in MC++

On distribution, the main directory should contain the files AUTHORS, CHANGELOG, INSTALL, LICENSE and README, as well as 3 subdirectories:

  • src contains the source code of MC++, which consists of header files only; that is, there is no need to build or link a library.
  • doc contains the Doxygen documentation for MC++, which can be accessed by opening the file doc/html/index.html with your favorite browser.
  • examples contains simple examples that should help you understand how to use the types of MC++.
MC++ has been developed and tested primarily under Linux
The tests and examples should compile without warnings with: gcc (ver. 4.6), icpc (ver. 13.1)
Compatibility issues may arise due to the wrapper to LAPACK routine dsyev.
This wrapper (mc::dsyev_wrapper) is in file mclapack.hpp and should be modified if needs be.

To install the library, cd into the src directory, and type:

make install

This creates the include directory (if not yet existing) as well as symbolic links to the header files in this directory.

Running MC++ requires that you alter the makefile in src in order to point to the above-mentioned third-party libraries on your computer. If the library CppUnit is available on your computer, unit testing can then be run by typing:

make test

In order to remove all symbolic links created in the include directory and clean the src directory, type

make cleaninstall

Where Can I Find More Information About the Features of MC++?

A description of the main components of MC++ can be found under Related Pages:

How Do I Run the Examples of MC++?

Change into the examples directory, and select one of the subdirectories, e.g.

cd examples/MC-1D

At the command line, type:

make

to create the executable file MC-1D and run it as:

./MC-1D

This executable generates a file containing the McCormick relaxations and subgradients called MC-1D.out. If the plotting program GNUPLOT is installed on your computer, the resulting bounds and relaxations can be visualized by typing:

gnuplot MC-1D.g

We hope you will enjoy using MC++ and find it useful!
For more information or to provide us feedback, please email Benoit Chachuat

References

A selection of papers which describe or use MC++ are: