Clone wiki

dypro / Home

icon.png Dypro - C++ Open-Source Dynamic Programming Package

Dypro is an open-source software package to aid in solving dynamic optimization problems. Currently, Dypro implements the following algorithms:

  • Dynamic programming (DP)
  • Stochastic dynamic programming (SDP)

Dynamic programming problems are solved using full enumeration of discretized decision and state spaces. SDP includes discretized probability mass functions to estimate expected objective function values. XML-based input files provide inputs to each model. Dypro users compile a main program code that defines system simulation and objective function evaluation, and link the program with the Dypro library to use its solving capabilities.

Installation

Download binary builds of Dypro here, and unpack them in a place you would like. You can also download source as described below.

Getting Started / Tutorial

Go to the tutorial page

Build Dypro from source

  1. Install pre-requisites:
    • Software construction tool: scons
    • A Compiler: mingw for Windows users, or gcc and g++ for users of other operating systems
  2. Download and install dypro
  3. Remember to set PATH environment variable to include necessary paths to scons and gcc/g++ executables and libraries
  4. Run runtests.sh (linux) or runtests.bat (Windows, by double-clicking)
    • This builds dypro
    • It also runs tests to make sure that dypro is working. If it is not working, it will either not compile or pass the tests.
    • Note: check PATH (any operating system) and LD_LIBRARY_PATH (linux) variables to make sure all necessary software is accessible.

Examples

Take a look at test files within src/tests/* sub-directories for examples of implementing dynamic optimization problems with Dypro. Here are a few examples:

  1. Bertsekas (2005) Ex. 1.3.2

  2. Miranda and Fackler (2002) Ex. 7.6.1

  3. Miranda and Fackler (2002) Ex. 7.6.2

References

  • Bertsekas, D. P. (2005). Dynamic Programming and Optimal Control (Vol. I). Belmont, Massachusetts: Athena Scientific.
  • Miranda, M. J., & Fackler, P. L. (2002). Applied Computational Economics and Finance. Cambridge, Massachusetts: The MIT Press.

Updated