GAMSPy Beta

GAMSPy combines the high-performance GAMS execution system with the flexible Python language, creating a powerful mathematical optimization package. It acts as a bridge between the expressive Python language and the robust GAMS system, allowing you to create complex mathematical models effortlessly.


With GAMSPy we introduce a new way to streamline the complete optimization pipeline starting with data input and preprocessing followed by the implementation of the mathematical model and data postprocessing and visualization, in a single, intuitive Python environment. GAMSPy allows you to leverage your favorite Python libraries (e.g. Numpy, Pandas, Networkx) to comfortably manipulate and visualize data. And it allows to import and export data and optimization results to many data formats.

On top, GAMSPy seamlessly works with GAMS MIRO and GAMS Engine which allows you to run your GAMSPy optimization either on your local machine or on your own server hardware (GAMS Engine One) as well as on GAMS Engine SaaS, where you don’t even need to run a server. We make sure you have access to the right resources, any time.

Advantages of using GAMSPy

GAMSPy opens up entirely new opportunities to streamline optimization and data pipelines:

Mathematical Modeling in Python

  • Write complex mathematical models directly in Python.
  • Create robust, readable, and maintainable mathematical models, preserving the essence of algebraic notation.
  • Leverage the power of separating instance data and model notation.

Uncompromised Performance

  • Solver Independence: Choose and integrate different solvers based on your specific requirement.
  • No loss in performance: GAMSPy offloads the heavy lifting, to the efficient GAMS backend.
  • Sparsity Handling: Let GAMSPy take care of handling sparse data cubes and focus on the formulation of the model.

Seamless Pipeline Management

  • No switching of environments: Manage data preprocessing and optimization tasks within a single, intuitive environment.
  • Leverage Python libraries to comfortably manipulate and visualize data.
  • Import and export data and optimization results to many data formats.
  • Leverage the seamless integration of GAMS MIRO, and GAMS Engine.

Getting Started

  1. Read the Installation and Licensing instructions in our documentation.
  2. Check out the Quickstart Guide to learn basic concepts.
  3. The GAMSPy open-source GitHub repository can be accessed here.
  4. Please email us at gamspy@gams.com for questions and support.