Skip to main content

A simple python tool to extract sets and parameters from excel files by creating GDX files for GAMS

Project description

Excel to gdx

A simple python tool to extract sets and parameters from excel files by creating GDX files for GAMS

See sheet name 'py' in the excel files that describes sets and parameters settings. Similar approach for https://www.gams.com/latest/docs/T_GDXXRW.html

Particularly useful for linux and ios where GDXXRW.exe is not compatible, see here: https://forum.gamsworld.org/viewtopic.php?t=10418#p24019

NEW FEATURE (v0.0.5):+INF, -INF, EPS

NEW FEATURE (v0.0.6): gams_dir as new argument.

Required library:

  • gdxpds
  • pandas
  • numpy
  • openpyxl
  • GAMS API for python

Installation

pip install exceltogdx

Delete

 pip uninstall exceltogdx

See notebook example.ipynb and download the excel file test.xlsx

from exceltogdx import exceltogdx
frames = exceltogdx('test.xlsx','test.gdx', gams_dir=None)

Repository: https://github.com/diw-berlin/exceltogdx

If you find and error in the code, please raise an issue or solve it by pushing a commit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exceltogdx-0.0.6.tar.gz (5.7 kB view hashes)

Uploaded source

Built Distribution

exceltogdx-0.0.6-py2.py3-none-any.whl (6.3 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page