dispaset package

Submodules

dispaset.solve module

This worksheet contains the two main functions to solve the DispaSET optimization problem using PYOMO or GAMS.

Solve with GAMS and the high level API

The high level interface is recommended for Linux users because it solves the “whitespace in the simulation folder” issue.

Installation:

To install the high-level API in Python 2.x:

cd gams24.4_linux_x64_64_sfx/apifiles/Python/api
python gamssetup.py install

To install the high-level API in Python 3.x:

cd gams24.6_linux_x64_64_sfx/apifiles/Python/api_34
python setup.py install    

Solve with GAMS and the low level APIs

Use lower level apis to run GAMS. BAsed on GAMS xpexample2.py

The advantage of the low level API is that it can easily be installed from pip:

pip install gdxcc
pip install gamsxcc
pip install optcc

Solve with PYOMO

The Pyomo version of Dispa-SET is currently not up-to-date. Use at your own risk.

dispaset.solve.is_sim_folder_ok(sim_folder)[source]

Function that checks if the provided path is a valid Dispa-SET simulation folder. The following files are required:

  • Inputs.gdx
  • UCM_h.gms
Parameters:sim_folder – path (absolute or relative) to the simulation folder
dispaset.solve.solve_GAMS(sim_folder, gams_folder=None, output_lst=False)[source]

Function used to run the optimization using the GAMS engine.

Parameters:
  • sim_folder – path to a valid Dispa-SET simulation folder
  • gams_folder – path to the gams folder. If not provided, the script will try to find it automatically
  • work_dir – path to the working directory (does not need to be provided)
  • output_lst – Set to True to conserve a copy of the GAMS lst file in the simulation folder
dispaset.solve.solve_pyomo(sim_folder)[source]

Function used to run the optimization using the PYOMO engine.

Parameters:sim_folder – path to a valid Dispa-SET simulation folder

Module contents