spine-tools / Spine-Toolbox

Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
73 stars 18 forks source link

Importers and Exporters require GAMS 42 or newer #2995

Open soininen opened 3 weeks ago

soininen commented 3 weeks ago

We switched from dgxcc to gamsapi some time ago. I finally figured out the oldest GAMS version that supports gamsapi and it is 42. We should upgrade the note in CHANGELOG.md (for version 0.8.4). If possible, we should also check and warn user if their GAMS installation is too old in "proper places" (find_gams_directory()?).

jkiviluo commented 3 weeks ago

gamsapi may also be used without using gams itself or the gdx files that are created with gamsapi are used with older gams (should be compatible). So, I think it's not necessary to check for the GAMS installation version - we wouldn't know the users intent.

soininen commented 2 weeks ago

The old dgxcc package did require a GAMS installation so I thought it would be the same with the compatibility layer of gamsapi. Looks like I have been wrong all along. This simplifies things a lot as it allow us to drop the requirement of GAMS installation (and the knowledge of GAMS dir) from Exporter and Importer.

soininen commented 2 weeks ago

I misunderstood the situation. The legacy functionality in gamsapi that we use in Importer/Exporter does require a GAMS installation. This should not force users to specific GAMS version in their Tools, though. I guess the solution would be to allow users to set a different GAMS for Importer/Exporter in settings.

jkiviluo commented 2 weeks ago

Settings should have two boxes:

Then in tool spec one can choose which to use. The first one can also be checked for version (at least GAMS 42).