Installation

Dependencies

The following packages are required:

  • Python interpreter. This code has been fully tested with Python versions 3.2.3, 3.4.3 and Python 2.7.3, 2.7.6.
  • NumPy, tested with versions 1.6.2, 1.10.4. It basically manages the linear algebra operations, and some extra features are used.
  • A C89/C90 compiler. To compile the generated code, a C/C++ compiler that supports C89/C90 or later standards is required.

Optionally, to get a few more features, the following are required:

  • A C99 compiler. To compile the Python interface to the C code a compiler that supports variable length arrays is needed. Any compiler that supports the C99 standard should work. This excludes old versions of Microsoft Visual C++ Express Edition (it does not support C99, and thus will not work). The recently released Microsoft Visual Studio 2015 added C99 support. We have extensively used GCC, tested with version 4.6, and 4.8. GCC is a popular compiler that supports the C89/C90 and C99 standards of the C programming language. A GCC port for Windows is MinGW.
  • SciPy, version 0.11 or greater is strongly recommended. It is required for several features.
  • Slycot. It is used to compute stabilizing matrices.
  • matplotlib. It is required in some examples to plot results.

Building and installing

muaompc installation is made directly from source code.

Install from source in Linux and Mac OS X

Linux and OS X users typically have all required (and most optional) packages already installed. To install muaompc, switch to the directory where you unpacked muaompc (you should find a file called setup.py in that directory) and in a terminal type:

python setup.py install --user --force

The --user option indicates that no administrator privileges are required. The --force option will overwritte old files from previous installations (if any). Alternatively, for a global installation, type:

sudo python setup.py install --force

And that is all about installing the package. The rest of this document will show you how to use it.

Install from source in Windows Systems

As Windows systems do not contain the required packages by default, we encourage you to install the toolbox under Linux or OS X, if you have the option. If Windows is preferred, we recommend installing the Anaconda platform, as it contains all of the necessary python packages.

If you have no prior experience with installing the software relying on C extensions under Windows, we advice to try an installation of the muaompc toolbox without the Python interface (see below).

For a full installation of muaompc do the following:

  • Install a C99 compiler, for example Visual Studio 2015 Community Edition or MinGW.

  • Install Anaconda. Make sure Anaconda is properly configured to use your chosen compiler.

  • Open an Ananconda Prompt, switch to the directory where you unpacked muaompc (the one containing the file setup.py), and type:

    python setup.py install --force
    

If you prefer to install muaompc without a Python interface to the C code, it is enough to install Anaconda (no Visual Studio or other compiler needed) and follow the instructions from the following section.

Install without Python interface (no compilation option)

For all operating systems (Linux, Windows, OS X), if a C99 compiler is not available, or a Python interface to the C code is not needed, (i.e. you just want to generate C code to use in a microcontroller, other C/C++ application, or for the MATLAB interface) muaompc can be installed without the Python interface as follows:

  • Switch to the directory where you unpacked muaompc (it contains the files setup.py and install.cfg).

  • Deactivate the Python interface by modifying the configuration file install.cfg:

    replace {"interface": 1} with {"interface": 0} and save the file.

  • Continue the installation of the toolbox as shown above, e.g. for Windows open an Ananconda Prompt, switch to the muaompc directory and type:

    python setup.py install --force