Search found 62 matches

by Clemens
7 hours ago
Forum: API
Topic: Python API: Catching Warnings
Replies: 1
Views: 3722

Re: Python API: Catching Warnings

Jan,

We did change the implementation of those warnings in the Python Control API to use the warnings module instead of print(). This will become available with the next major release of GAMS.

Best,
Clemens
by Clemens
1 week ago
Forum: Syntax
Topic: embeddedcode: Python
Replies: 1
Views: 353

Re: embeddedcode: Python

Hi, With gams.get() in embedded code Python, you will get all values of a symbol - e.g. level, marginal, etc. for a GAMS variable and need to process them manually afterwards. Here is some code snippet that reads and prints a variable x : embeddedCode Python: var_x = list(gams.get('x')) print(var_x)...
by Clemens
1 week ago
Forum: Tools
Topic: Data exchange from excel to gams (on macOS)
Replies: 9
Views: 11473

Re: Data exchange from excel to gams (on macOS)

Hi, The error indicates that you try to set data for your parameter twice. Perhaps your parameter has data already and you try to set data again from an embedded code section. Anyhow, the following code should bring the data from the Excel sheet into a two dimensional GAMS parameter: Parameter p(*,*...
by Clemens
3 weeks ago
Forum: API
Topic: Python API picking up wrong GAMS version
Replies: 3
Views: 2505

Re: Python API picking up wrong GAMS version

Hi,

Something seems to put in the GAMS 38 path into your configuration. Have you checked if the PYTHONPATH environment variable is set? Run from the Anaconda command prompt:

Code: Select all

echo %PYTHONPATH%
Best,
Clemens
by Clemens
3 weeks ago
Forum: Archive Google Group
Topic: GAMS Installation Error
Replies: 3
Views: 3930

Re: GAMS Installation Error

Hi, This is a Windows problem that can most likely be prevented by running the installer from a command prompt with /SILENT or /VERYSILENT. There is a note on this in the documentation: https://www.gams.com/latest/docs/UG_WIN_INSTALL.html image.png 1. Open command prompt 2. Switch to directory conta...
by Clemens
4 months ago
Forum: Bugs
Topic: GDX Export in Studio
Replies: 2
Views: 23183

Re: GDX Export in Studio

Hi again,

GAMS 45.6.0 was released yesterday. It comes with GAMS Studio 1.16.4 which contains the bug fix. Thanks again for reporting.

Best,
Clemens
by Clemens
4 months ago
Forum: Bugs
Topic: GDX Export in Studio
Replies: 2
Views: 23183

Re: GDX Export in Studio

Hi Rob,

Indeed this is a bug. We are going to publish a fix for this as soon as possible. Thanks for reporting.

Best,
Clemens
by Clemens
2 years ago
Forum: API
Topic: ModuleNotFoundError: No module named '_gams2numpy'
Replies: 9
Views: 68206

Re: ModuleNotFoundError: No module named '_gams2numpy'

Jan,

With setuptools>=60.0.0 a breaking change has been introduced. Due to this breaking change the GAMS Python files are not installed correctly. To solve the issue, please try setting SETUPTOOLS_USE_DISTUTILS=stdlib before running setup.py

Let me know if this helps,
Clemens
by Clemens
2 years ago
Forum: Syntax
Topic: Running NEOS from Python API
Replies: 7
Views: 9328

Re: Running NEOS from Python API

I assume that the error is the same when running Kestrel from command line. So it seems that setting the SSL_CERT_FILE in [GAMS dir]\gmske_nt.cmd is not enough. If you allow me an experiment, could you change the following line of code in [GAMS dir]\gmske_nx.py (line 537): self.neos = xmlrpc.client....
by Clemens
2 years ago
Forum: Syntax
Topic: Running NEOS from Python API
Replies: 7
Views: 9328

Re: Running NEOS from Python API

Hi, It seems that the Kestrel solver uses an invalid certificate. Actually it should be aware of cacert.pem located in [GAMS dir]\GMSPython\Lib\site-packages\certifi. Does the Kestrel solver work from command line, if you do not have a Python script in between? There is also a Python example that de...