Skip to content
coin-orPublic

About

An API for stochastic programming problems.

Resources

Stars

2 stars

Watchers

4 watching

Forks

Repository files navigation

Smi

A COIN-OR Project

Projects such as this one are maintained by a small group of volunteers under the auspices of the non-profit COIN-OR Foundation and we need your help! Please consider sponsoring our activities or volunteering to help!

Latest Release

This file is auto-generated from config.yml using the generate_readme script. To make changes, please edit config.yml or the generation scripts here and here.

Smi (Stochastic Modeling Interface) is an interface for problems in which uncertainty and optimization appear together. It is intended to be like Osi in the sense that an SmiXX object is derived from a base class that takes care of a number of commonly encountered programming issues, like handling probability distributions, managing problem generation, and interacting with solvers to obtain solution information.

Smi implements a multiperiod scenario stochastic programming object called SmiScnModel. It supports

  • a reader for Stochastic MPS (SMPS) files,
  • generating scenario trees directly from paths and from discrete random variables,
  • generating the deterministic equivalent problem, which can be solved by any Osi-compatible solver, and
  • getting solution data by stage and scenario.

Smi is written in C++ and is released as open source under the Eclipse Public License 2.0.

It is distributed under the auspices of the COIN-OR Foundation

The Smi development site is https://github.com/coin-or/Smi.

CURRENT BUILD STATUS

Windows Builds

Linux and MacOS Builds

DOWNLOAD

Docker image

There is a Docker image that provides Smi, as well as other projects in the COIN-OR Optimization Suite here

Binaries

For newer releases, binaries will be made available as assets attached to releases in Github here. Older binaries are archived as part of Smi here.

Due to license incompatibilities, pre-compiled binaries may lack some functionality. If binaries are not available for your platform for the latest version and you would like to request them to be built and posted, feel free to let us know in the discussion formum.

Source

Source code can be obtained either by

  • Downloading a snapshot of the source code for the latest release version of Smi from the releases page.
  • Cloning this repository from Github or
  • Using the coinbrew script to get the project and all dependencies (recommended, see below).

Below is a quick start guide for building on common platforms. More detailed build instructions are here.

Dependencies

Smi has a number of dependencies, which are detailed in config.yml. Dependencies on other COIN-OR projects are automatically downloaded when obtaining the source with coinbrew. For some of the remaining third-party dependencies, automatic download scripts and build wrappers are provided (and will also be automatically run for required and recommended dependencies), while other libraries that are aeasy to obtain must be installed using an appropriate package manager (or may come with your OS by default).

BUILDING from source

The quick start assumes you are in a bash shell.

Using coinbrew

To download and build Smi from source, execute the following on the command line.

wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
chmod u+x coinbrew
./coinbrew fetch Smi@master
./coinbrew build Smi

For more detailed instructions on coinbrew, see https://coin-or.github.io/coinbrew. The coinbrew script will fetch the additional projects specified in the Dependencies section of config.yml.

Without coinbrew (Expert users)

  • Download the source code, e.g., by cloning the git repo https://github.com/coin-or/Smi
  • Download and install the source code for the dependencies listed in config.yml
  • Build the code as follows (make sure to set PKG_CONFIG_PTH to install directory for dependencies).
./configure -C
make
make test
make install

Examples

The examples directory has a number of use cases. stoch.cpp contains several distinct examples of input styles; it reads instances from Data-Stochastic if that is available. The flopcpp_examples directory has examples that use FlopC++. After building and installing Smi, they can be built by running make in the corresponding subdirectory of the build directory, e.g.,

cd build/Smi/master/examples
make
./stoch

Doxygen Documentation

If you have Doxygen available, you can build a HTML documentation by typing

make doxydoc

in the build directory. If Smi was built via coinbrew, then the build directory will be ./build/Smi/master by default. The doxygen documentation main file is found at <build-dir>/doxydoc/html/index.html.

If you don't have doxygen installed locally, you can use also find the documentation here.

Project Links

About

An API for stochastic programming problems.

Resources

Stars

2 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages