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-2017

MC++ (version 2.0) provides a collection of C++ classes for construction, manipulation and bounding of factorable functions. The bounding methods include interval bounds, spectral bounds, convex/concave relaxations, Taylor and Chebyshev model estimators, ellipsoidal bounds, and polyhedral relaxations. 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. The use of DAGs to define factorable functions is recommended for efficiency with complex bounding types and allows manipulating functions, including forward/backward/Taylor automatic differentiation. 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:

  • FADBAD++ (version 2.1) to enable combination of bounding techniques in MC++ with automatic differentiation (AD), which is provided in src/3rdparty/fadbad++/;
  • CPPLAPACK (2014-02-08 version) which provides a C++ wrapper for BLAS and LAPACK and is provided in src/3rdparty/cpplapack/. The libraries BLAS and LAPACK themselves are not included in the MC++ distribution. On linux-Ubuntu systems for instance, you can install both BLAS and LAPACK via:

$ sudo apt-get install liblapack-dev

MC++ can be obtained by clonning the 'mcpp' GitHub repository via:

$ git clone https://github.com/omega-icl/mcpp.git MC++

This will create a folder called 'MC++' containing the currently released distribution. 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.X and 5.X) after enabling the C++11 standard features

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 file makeoptions.mk in src in order to point to the above-mentioned third-party libraries on your computer.

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

$ make cleaninstall

A local copy of this documentation can be generated by moving into the doc/ directory and typing

$ doxygen MC++.dox

The documentation requires Doxygen and uses DOT language.

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

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

Information about the DAG construction and manipulation in MC++ can also 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: