Gana Algebraic Modeling Language#

Documentation Status PyPI Downloads Python package PyPI - Python Version

Gana is an Algebraic Modeling Language (AML) for Multiscale Modeling and Optimization. Generated programs (Prg) can be subclasses of Multiparametric Mixed Integer Linear Programming (mpMILP).

Features#

Gana supports:

  • mutable elements, allowing constraints/functions to be updated dynamically

  • multiparametric as well as mixed integer programming

  • formulation in both matrix form and set-based mathematical program

Moreover, Gana uses a simple format to write constraints/functions.

Elements#

Programs in Gana are written using element sets, namely:

  1. I - index

  2. V - variable

  3. P - parameter

  4. T - parametric variable

Solvers#

The list of natively supported solvers are:

  1. PPOPT for multiparametric programming (mp)

  2. Gurobi for Mixed Integer Programming (MIP) Programs can, however, be exported as a .mps or .lp file and passed to most solvers.

Illustration#

Gana is best run in Jupyter as notebook (.ipynb) files, where programs can be visualized as canonical mathematical programs using set-notation.

Additionally, matrices can be exported.

Purpose#

Gana was developed to enable certain functionalities in energia (py). Both were developed as PhD projects and have ample room for improvement. So please reach out to me on cacodcar@gmail.com with suggestions and such.

See also

Energia, a Data-Driven Multiscale Modeling and Optimization Framework which uses Gana as the AML backend.

API Reference#

gana

A barebones mathematical programming package

Indices and tables#