Search found 268 matches

by Renger
1 day ago
Forum: Syntax
Topic: Conditionalize Variable Attribute
Replies: 1
Views: 43

Re: Conditionalize Variable Attribute

Hi Leo You could try working with a subset: set r region /GER,FRA/; set ra(r) /GER,FRA/; variable INVE(*,r); if( INVE.UP("windOn","FRA")$card(ra) >1) =50; ); display INVE.UP; In your model code, you probably have to define the equations over the main set r and put a $ra(r) behind the equations. Hope...
by Renger
1 week ago
Forum: API
Topic: gams_job.interrupt() does not work in Python 3.6
Replies: 3
Views: 238

Re: gams_job.interrupt() does not work in Python 3.6

Hi

Take a look at this topic: viewtopic.php?f=10&t=10592&p=25161#p25161.
Test the footnote first!
Hope this helps
CHeers
Renger
by Renger
1 month ago
Forum: Solvers
Topic: the solver found no feasible solution
Replies: 1
Views: 225

Re: the solver found no feasible solution

Hi
I don't think the model will only solve with DICOPT. Either your model is not correct or the description is not correct.
You could ask the authors for the code.
Cheers
Renger
by Renger
1 month ago
Forum: Syntax
Topic: Bad dimension error when using gdxxrw
Replies: 3
Views: 178

Re: Bad dimension error when using gdxxrw

Hi Sarah
It looks like you haven't defined AC yet. If I define the parameter PARAMETER ZIMSAM2(*, *) instead of PARAMETER ZIMSAM2(AC,ACP), the import runs fine.
Did you define/import AC before you want to import ZIMSAM2?
Hope this helps
Cheers
Renger
by Renger
1 month ago
Forum: Modeling
Topic: How to use loop to run model several times when some random data is being imported from excel.
Replies: 2
Views: 147

Re: How to use loop to run model several times when some random data is being imported from excel.

Hi If you want, for example, loop over 10 sets of random data, you could define your data indexed over your loop and read all of them before the loop. set iteration /1*10/, sectors /s1*s20/; parameter randSectors(sectors, iteration) Random data for sectors; ** Pseudo code * Read your data from Excel...
by Renger
3 months ago
Forum: API
Topic: Python Embedded in Gams - Import Python Package
Replies: 13
Views: 2683

Re: Python Embedded in Gams - Import Python Package

Hi Clemens Here are my steps on my Windows machine to get the embedded code working with: Install the python distribution of your liking (as long as it is version 3.6.x; not one of the versions 3.7 or 3.5) Adjust your path by adding the path to the python3.dll (in my case: C:\Python36\python-3.6.8.a...
by Renger
3 months ago
Forum: Modeling
Topic: Help in Modelling Equations Related to EVs
Replies: 5
Views: 244

Re: Help in Modelling Equations Related to EVs

It is still not clear to me what you want:
A name of somebody to help? Somebody just saying: yes I can help?
We gladly help you. That is the purpose of the forum.
Cheers
Renger
by Renger
3 months ago
Forum: Modeling
Topic: Help in Modelling Equations Related to EVs
Replies: 5
Views: 244

Re: Help in Modelling Equations Related to EVs

Hi
You could start by reading the "Rules" in this forum as none of us is clairvoyant :-)
Cheers
Renger
by Renger
3 months ago
Forum: API
Topic: Python Embedded in Gams - Import Python Package
Replies: 13
Views: 2683

Re: Python Embedded in Gams - Import Python Package

Hi Clemens I gave up as I wasn't able to get it running (Python in GAMS yes, but plotting no). Even if I set the python path to GMSPython I run into lots of problems and did not manage to install wxpython. My wishes: - It would be great if the information on how to do this would be clear even for Li...
by Renger
3 months ago
Forum: API
Topic: Python Embedded in Gams - Import Python Package
Replies: 13
Views: 2683

Re: Python Embedded in Gams - Import Python Package

Hi Clemens The story continues: I now have Gams on my Ubuntu 18 notebook installed and run in the same kind of problems. I use Anaconda and the following Gams-code: embeddedCode Python: import matplotlib import matplotlib.pyplot as plt matplotlib.use('WXagg') plt.plot([1,2,3,4]) plt.show() endEmbedd...