Search found 9 matches

by Clemens
2 weeks ago
Forum: API
Topic: Modify multidimensional parameter with Python GamsModelInstance
Replies: 1
Views: 49

Re: Modify multidimensional parameter with Python GamsModelInstance

Please have a look at the transport7.py example: https://www.gams.com/latest/docs/apis/examples_python/transport7_8py_source.html Although it doesn't show how to modify a two dimensional parameter, it shows both the use of a scalar parameter and a two dimensional variable. Instead of adding a scalar...
by Clemens
2 weeks ago
Forum: API
Topic: model2tex
Replies: 1
Views: 73

Re: model2tex

It seems that in your GAMS code you did not define an actual model. This is required
since model2tex is meant to create documentation for a specific model in your GAMS code.

Clemens
by Clemens
1 month ago
Forum: Announcements
Topic: GAMS Distribution 24.9.0 (Beta Version) Announcement
Replies: 0
Views: 82

GAMS Distribution 24.9.0 (Beta Version) Announcement

We would like to announce the availability of the GAMS Distribution 24.9.0 (Beta Version). Please consult the beta release notes for details about new features and updated solvers: https://www.gams.com/24.9/docs/releasenotes/index.html If you are interested in experimenting with this beta release, p...
by Clemens
4 months ago
Forum: API
Topic: Installing Python API Topic is solved
Replies: 7
Views: 430

Re: Installing Python API Topic is solved

1. The GAMS Python API is installed using distutils. As far as I know there is no automatic way of uninstalling a package/module that was installed using distutils. If you have accidentally installed the wrong version of GAMS Python API files, you might try to run the setup.py script from the correc...
by Clemens
4 months ago
Forum: API
Topic: Installing Python API Topic is solved
Replies: 7
Views: 430

Re: Installing Python API Topic is solved

I read this over, sorry. Support for Python 3.6 was added recently in GAMS 24.8.4. If you ran the setup script from the directory 'api', you have installed the Python 2.7 version which is not compatible with Python 3.6

Best,
Clemens
by Clemens
4 months ago
Forum: API
Topic: Installing Python API Topic is solved
Replies: 7
Views: 430

Re: Installing Python API Topic is solved

The GAMS Python API comes in separate directories for different versions of Python. Please have a look at the 'Getting Started' section of the tutorial and make sure that you install the correct files for your version of Python: https://www.gams.com/latest/docs/apis/examples_python/index.html Best, ...
by Clemens
6 months ago
Forum: API
Topic: Python API, Jupyter, Solver Log Topic is solved
Replies: 2
Views: 230

Re: Python API, Jupyter, Solver Log Topic is solved

Jan, The GamsModelInstance is a high performance class meant for solving an instance of a GAMS model multiple times (with different data). Currently it is not possible to direct the (debug) output to Jupyter. We will have a look at the implementation details to see if we can make this work. Best, Cl...
by Clemens
6 months ago
Forum: API
Topic: How to make communication of C to Gams?
Replies: 1
Views: 176

Re: How to make communication of C to Gams?

Maria, you might want to have a look at "apifiles/C" in your GAMS installation directory. The examples "xp_example1.c" shows how to read and write GDX files. The example "xp_example2.c" shows how to call a GAMS model programmatically from within your C program. Best, Cl...
by Clemens
7 months ago
Forum: API
Topic: [python API] Running GAMS through Jupyter notebook
Replies: 1
Views: 289

Re: [python API] Running GAMS through Jupyter notebook

Samarth, it should not make too much of a difference whether you are running Python from Jupyter or from a usual cmd prompt. I just installed Anaconda 2.7 (64 bit on Windows) to give the GAMS Python API a try in a Jupyter notebook. After installing the API from the command line using the Python vers...

Go to advanced search