Search found 10 matches

by patriciars
4 years ago
Forum: API
Topic: GamsException: Error retrieving audit info
Replies: 3
Views: 4926

Re: GamsException: Error retrieving audit info

Yes I’m using version 22.2 because my university hás this licence.
This problem can be because it is old?

Thank you
by patriciars
4 years ago
Forum: API
Topic: GamsException: Error retrieving audit info
Replies: 3
Views: 4926

GamsException: Error retrieving audit info

Hello,

This error " GamsException: Error retrieving audit info" appears when creating the workspace. I've searched and found nothing about it.

Does anyone know help me?

Code: Select all

import numpy as np
from gams import *
  
ws = GamsWorkspace("D:\GAMS22.2")   
by patriciars
5 years ago
Forum: Syntax
Topic: How to store the words in a set?
Replies: 2
Views: 2447

Re: How to store the words in a set?

Sorry, I forgot To write.
I’m working with Python.. using the gams api python.
I need To import the strings of the set. maybe create a vector with this words, something like this.
by patriciars
5 years ago
Forum: Syntax
Topic: How to store the words in a set?
Replies: 2
Views: 2447

How to store the words in a set?

Hello. For example in the code below: Sets i source /REF/ j demand /NHT1, NHT2, NHT3,LNIS, GHT/ k purifiers /PSA1/; I need to store the strings REF in set i, the strings NHT1, NHT2, NHT3,LNIS, GHT in set j and teh string PSA1 in set k. How can I do this? I need to get the words of each set because I...
by patriciars
5 years ago
Forum: API
Topic: GAMS PYTHON API - INTERFACE JUPYTER
Replies: 7
Views: 9189

Re: GAMS PYTHON API - INTERFACE JUPYTER

OK. Thank you. Your idea worked with cases ate leats two dimension(i,j). for rec in t1.out_db["cost"]: print("cost(" + rec.key(0) + "," + rec.key(1) + "): level=" + str(rec.level) + " marginal=" + str(rec.marginal)) And zero dimensional too. rec = t1...
by patriciars
5 years ago
Forum: API
Topic: GAMS PYTHON API - INTERFACE JUPYTER
Replies: 7
Views: 9189

Re: GAMS PYTHON API - INTERFACE JUPYTER

Hello Clemens Now, it's work. Thank you. But I have just onde more doubt. When accessing the variable cost of my gams file, the message that appears is: index too large. Below is the gms file I'm using and the code I used to run the spyder. If you can help me I thank you very much, because I am not ...
by patriciars
5 years ago
Forum: API
Topic: GAMS API Python
Replies: 7
Views: 9919

Re: GAMS API Python

Thank you I didt it. And now the error is: GAMS return code not 0 (6), set the debug flag of the GamsWorkspace constructor to DebugLevel.KeepFiles or higher or define a working_directory to receive a listing file with more details So, i puted the debug like this: from __future__ import print_functio...
by patriciars
5 years ago
Forum: API
Topic: GAMS PYTHON API - INTERFACE JUPYTER
Replies: 7
Views: 9189

Re: GAMS PYTHON API - INTERFACE JUPYTER

Hello. Now the problem is code 2 0 compilation. I'm testing gams api pyhton with the TRNSPORT.gms example and ran it right on the spyder. But when I test for another file I created myself (and this file runs correctly on gams.exe), in spyder it gives: gamslib return code not 0 (2) How can I solve th...
by patriciars
5 years ago
Forum: API
Topic: GAMS API Python
Replies: 7
Views: 9919

Re: GAMS API Python

I am having a problem with gams python api. I have a gams file that runs correctly. When I import to use the interface with python through spyder, it gives compilation error: GamsException: gamslib return code not 0 (2) The code in python to run gams: if __name__ == "__main__": if len(sys....
by patriciars
5 years ago
Forum: API
Topic: GAMS PYTHON API - INTERFACE JUPYTER
Replies: 7
Views: 9189

GAMS PYTHON API - INTERFACE JUPYTER

Hello. I wrote a file in gams and would like to run in python through the Jupyter interface. But it gives the following error: gamsException: Invalid GAMS system directory: D:\JWP\WinPython-32bit-2.7\notebooks\-f It finds another directory for GAMS and not the one that should be used. (THIS SHOULD B...