I have been trying to build a model with the EmbeddedCode Facility of GAMS with python. However, I am not getting a clear picture about the data structure that is going in and out from the embedded code section[https://www.gams.com/latest/docs/UG_EmbeddedCode.html]. So, I have few queries regarding this:
I am passing this parameter to embedded code section and reading it in the embedded code section as
can anyone tell me what is the python data structure that will be created as a result of this process (2-d DataFrame (matrix), array, list, etc.). [For this the error message looks like the one with question d]
I have tried with this command as well:
profiles_source=list(gams.get('NUCLEAR_SCHEDULE')), so I want to know what will be the data structure in this case , I am guessing that this will be a list but what will happen to the indices?
[For this code the error is saying; setting an array element with sequence]
c. If I want to pass a numpy array from the embedded section to gams like this
, where the row indicates 'time' and 'column' indicates 'units' ; how should I declare this parameter in GAMS and if the 'units' have different names like 'unit 1, unit 2, .., etc. should I forcefully rename the columns with those names before passing this back to GAMS and will there be any conflict due to the indexing prcoess since python indexing starts from 0 whereas GAMS indexing may not start with zero (I am not sure about it).
d. Lastly, I am getting error messages like this , can anyone suggest how to debug the python section since this type of message is not helpful at all to debug.
Note: I have separately tested my python script and that is working just fine.
questions about GAMS' tools
1 post • Page 1 of 1