Search found 187 matches

by Renger
6 days ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 27
Views: 1966

Re: Looping over file names

Hi Jarenka I didn't check the code, but here is an example on how to do that file test / test.txt /; put test; set i / 2008*2010 /; loop(i, * this will flush and close the current put file and rename it * to any name written in the second line of the put statement * put_utilities 'ren' / 'test.':0 i...
by Renger
1 week ago
Forum: Syntax
Topic: Excel printing problem
Replies: 3
Views: 82

Re: Excel printing problem

Just a small clarification:
EPS is not a small value, as I was informed by GAMS. EPS is a stored zero value.
Furthermore: If the dollar control option onEPS is active, zeros in a parameter or table statement are treated as EPS
Cheers
Renger
by Renger
1 week ago
Forum: Syntax
Topic: Excel printing problem
Replies: 3
Views: 82

Re: Excel printing problem

Hi Luca The trick is to add the Gams value EPS (a very small number) to your parameter: myparameter(s) = X.L(s) + EPS; and then use the GDXXRW option EPSOUT = 0 to change the EPS into 0 when you export them to Excel. You can find the solution here: https://support.gams.com/gams:export_all_elements_o...
by Renger
1 week ago
Forum: Modeling
Topic: can't model scheduling problem
Replies: 3
Views: 85

Re: can't model scheduling problem

Hi You have lots of errors in your code, so I would suggest that you have a closer look at the introductory chapter of the GAMS documentation. Gams always usually gives you a clear message on what went wrong. Debugging in Gams starts with correcting the first error that appears and rerun the code ag...
by Renger
1 week ago
Forum: Syntax
Topic: Parameter setting to infinity
Replies: 1
Views: 71

Re: Parameter setting to infinity

Hi
Use +INF or -INF.
Cheers
Renger
by Renger
1 week ago
Forum: Tools
Topic: GDXXRW - writing to excel - no header
Replies: 3
Views: 72

Re: GDXXRW - writing to excel - no header

Hi
As far as I know, this is not possible, but why should you want to do this? Why do the labels bother you?
Cheers
Renger
by Renger
1 week ago
Forum: Modeling
Topic: Model and Solve Statements
Replies: 1
Views: 93

Re: Model and Solve Statements

Hi
If the non-used variables and sets are in your constraints, you are on the right track.
Cheers
Renger
by Renger
2 weeks ago
Forum: Tools
Topic: SAS files into GAMS
Replies: 11
Views: 269

Re: SAS files into GAMS

Hi Irena You could use wgdx to write the dataframe to gdx and then load it. After that you assign the variables lst <- wgdx.reshape(dataframeinR symDIm = 4, symName = "alldata") wgdx.lst("datafromR.gdx", lst) If you have more data, you just define lst2, lst3, etc. for the data and read them with wgd...
by Renger
2 weeks ago
Forum: Syntax
Topic: CSV Input Using SQL2GMS
Replies: 11
Views: 837

Re: CSV Input Using SQL2GMS

It looks like you forgot the *.csv and used the wrong parenthesis: set Ik /Ik01, Ik02, Ik03/ R /R01 * R08/ Vt /Vt01,Vt02/; $set txtfile vand.txt $onecho > fixedtextcmd.txt C=DRIVER={Microsoft Text Driver (*.txt; *.csv)};DBQ=D:\Inbox\cge\; Q=select Ik,Vt,R,var1 from vand.txt O=fixed.inc $offecho $cal...
by Renger
2 weeks ago
Forum: Solvers
Topic: about error 066
Replies: 6
Views: 164

Re: about error 066

There migt be a problem with one of the include files.
Try the following: put a $exit after the equation with z, remove the inclusion of a and define it manually e.g. a(i) = random(0,10);
If the problem still exists, do the same for the other include files.
Cheers
Renger