1. Getting Started

This section describes how to get started with OPTALG.

1.1. Installation

In order to install OPTALG, the following tools are needed:

  • Linux and Mac OS X:
  • Windows:
    • Anaconda (for Python 2.7)
    • MinGW (use pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy)
    • 7-Zip (update system path to include the 7z executable, typically in C:\Program Files\7-Zip)

After getting these tools, the OPTALG Python module can be installed using:

pip install numpy cython
pip install optalg

By default, no wrappers are built for any external solvers. If the environment variable OPTALG_IPOPT has the value true during the installation, OPTALG will download and build the solver IPOPT for you, and then build its Python wrapper. Similarly, if the environment variables OPTALG_CLP amd OPTALG_CBC have the value true during the installation, OPTLAG will download and build the solvers Clp and Cbc for you, and then build their Python wrappers.

Note

Currently, the installation with Clp and Cbc does not work on Windows.

To install the module from source, the code can be obtained from https://github.com/ttinoco/OPTALG, and then the following commands can be executed on the terminal or Anaconda prompt from the root directory of the package:

pip install numpy cython
python setup.py install

Running the unit tests can be done with:

pip install nose
python setup.py build_ext --inplace
nosetests -s -v