Skip to main content

Gana logo

PyPI Python Versions Downloads Documentation

Quality Codacy Badge Coverage License Last Commit

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).

Installation

The current development checkout requires the Rust extension, gana._native. The Python modeling API is unchanged. Use Python 3.12, 3.13 or 3.14; each version is included in the candidate validation matrix. On Intel macOS, use Python 3.12 or 3.13: PPOPT's Numba dependency does not yet provide a stable Python 3.14 wheel for that platform.

Install an available release and its dependencies in a fresh environment:

python3.13 -m venv .venv
.venv/bin/python -m pip install gana

On Windows, use .venv\Scripts\python instead. Published releases may predate the backend retirement described here. A compatible wheel includes the native extension and needs no Rust compiler at runtime. A source installation, including this checkout, needs Rust/Cargo 1.88 or newer and a platform linker; validation uses Rust 1.88.0:

.venv/bin/python -m pip install .

Leave GANA_BACKEND unset. The old rust-parameters value is accepted as an alias; python and unknown values are rejected. A missing extension produces installation guidance instead of selecting a Python backend. See the installation guide and native implementation notes.

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. HiGHS for linear and mixed-integer programming, included with Gana and selected by default with program.opt().
  3. Gurobi for linear and mixed-integer programming with program.opt(using="gurobi").

Programs can 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.

Metadata

Release files for gana 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gana 1.6.0
File Size Uploaded Provenance Actions
gana-1.6.0.tar.gz 298.4 kB With provenance Details for gana-1.6.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for gana 1.6.0
File Actions
gana-1.6.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for gana-1.6.0-cp312-abi3-win_amd64.whl
gana-1.6.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for gana-1.6.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
gana-1.6.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for gana-1.6.0-cp312-abi3-macosx_11_0_arm64.whl
gana-1.6.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for gana-1.6.0-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 2.8 MB

Release files / gana-1.6.0.tar.gz

Download URL gana-1.6.0.tar.gz
Size 298.4 kB
Tags Source
SHA-256 checksum
How to use checksums
129fb6ee41ee588597fe12b3de7817d7cc25967da2a30ebf28ad5cbdb617c76d
BLAKE2b-256 checksum
How to use checksums
62650a53c4452048ed421fd31176d7dd423b84c946378db8bbb0385801f9dd74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / gana-1.6.0-cp312-abi3-win_amd64.whl

Download URL gana-1.6.0-cp312-abi3-win_amd64.whl
Size 553.9 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e6560d991fe59e497de5b9497f8b9094bfd8b3dd1967427890246b679b1c90c3
BLAKE2b-256 checksum
How to use checksums
5407baaa9f206919335d5806e86feb58c569130755102f7a18c37e7808f2c5fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / gana-1.6.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL gana-1.6.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 690.4 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
7c56ece0709fe5ddd3fb01315c4225acf9c51aa79977496a6df1307c866e665b
BLAKE2b-256 checksum
How to use checksums
68c13b5e7a6085d7d39f8140c2bbca0efab7ae0e4fe9b49c27d761fcc45e9c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / gana-1.6.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL gana-1.6.0-cp312-abi3-macosx_11_0_arm64.whl
Size 640.4 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
97b7f3a84681713bbec6d6e7fb227faebf5e2d66bf3d04b6d19bd4d989696dfe
BLAKE2b-256 checksum
How to use checksums
4a0dedf0a115e1787697c9d5f3029fc60e1f39b6404b2ccd06f0081a173c5797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / gana-1.6.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL gana-1.6.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 666.8 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5de872719e2e01cbefb4f4ec83ea86b6b4c8139645853e6534ccffb968ce16c7
BLAKE2b-256 checksum
How to use checksums
b6b49c68bfe9913ca531e1a00ec57b1a0ed9e6d8dff46142ed1172b9712d2e5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for gana 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for gana-1.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page