Search found 70 matches

by Fred
2 months ago
Forum: Archive Google Group
Topic: epgap=0
Replies: 4
Views: 187

Re: epgap=0

Richard, Just change your code to model my_model1/obj1,c1,c2/; my_model1.Optfile =1; file opts cplex option file/ cplex.opt /; putclose opts /'epgap=0' /'epagap=0'; solve my_model1 using mip minimizing z; [...] model my_model2/obj2,c3,c4/;; my_model2.Optfile =1; putclose opts /'epgap=0' /'epagap=0';...
by Fred
2 months ago
Forum: Modeling
Topic: Error in reading 4 dimensional data from EXCEL to GAMS
Replies: 2
Views: 147

Re: Error in reading 4 dimensional data from EXCEL to GAMS

Hi, I am surprised that you claim to get the shown gdx file. Actually, for the Excel file shown in the screenshot, your GDXXRW call should produce a couple of errors and not create a GDX file at all: **** There were 2 duplicate entries for symbol a 1: Refinery 1 2: Refinery 2 **** There were 2 dupli...
by Fred
2 months ago
Forum: Archive Google Group
Topic: epgap=0
Replies: 4
Views: 187

Re: epgap=0

Hi,

You are using the same file statement twice.

Code: Select all

file opts cplex option file/ cplex.opt /;
[...]
file opts cplex option file/ cplex.opt /;
You cannot use the same internal file name ("opts") more than once. Just get rid of the second one and you should be good.

I hope this helps!

Fred
by Fred
2 months ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 385

Re: Reading text or Excel files in execution phase

Hi,

in an earlier post I already suggested to do

Code: Select all

[...]
execute 'CSV2GDX data.csv output=data.gdx...';
execute_load 'data.gdx', ...;
[...]
"execute" is the execution time counterpart to "$call".
"execute_load" is the execution time counterpart to "$gdxin" and "$load".

Cheers,
Fred
by Fred
2 months ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 385

Re: Reading text or Excel files in execution phase

Hi, Is seems that you made a common mistake and confused compilation and execution time commands. GAMS is a two pass system with a compliation phase (1) and an execution phase (2). You can read more about that here: https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_TwoPass While "execute...
by Fred
2 months ago
Forum: API
Topic: Reading text or Excel files in execution phase
Replies: 6
Views: 385

Re: Reading text or Excel files in execution phase

Hi, There are tools to convert data from csv or Excel to gdx: https://www.gams.com/latest/docs/T_CSV2GDX.html https://www.gams.com/latest/docs/T_GDXXRW.html You can run these tools during execution time and load data from gdx at execution time, e.g. [...] execute 'CSV2GDX data.csv output=data.gdx......
by Fred
2 months ago
Forum: Syntax
Topic: Unable to find GDX File for input data from
Replies: 7
Views: 292

Re: Unable to find GDX File for input data from

Hi, Actually, the error message indicates clearly that this is a licensing error: --- POSOCO_Dispatch.gms(101) 9 Mb --- 17,166 rows 13,633 columns 54,969 non-zeroes *** Status: Terminated due to a licensing error *** Inspect listing file for more information --- Job POSOCO_Dispatch.gms Stop 08/21/18...
by Fred
3 months ago
Forum: Modeling
Topic: Generate Equation and Column Listing without solving
Replies: 3
Views: 150

Re: Generate Equation and Column Listing without solving

Hi,

You could set the resource limit (reslim) to 0 (https://www.gams.com/latest/docs/UG_Gam ... MSAOreslim).
That way the solver would still be called but should terminate immediately (after a short initialization phase).

I hope this helps!

Best,
Fred
by Fred
3 months ago
Forum: Syntax
Topic: Unable to find GDX File for input data from
Replies: 7
Views: 292

Re: Unable to find GDX File for input data from

Hi, The gdx file gets created by GDXXRW if the tool is properly called. The log you get clearly indicates that this is not the case: --- call GDXXRW I=D:\SCS\My_GAMS\Programs\Learning_Folder\Despatch_96Blocks\InputData.xls O=InputData.gdx set=g RDim=1 rng=GenData!a2:a10000 par=GenData RDim=1 CDim=1 ...
by Fred
3 months ago
Forum: Syntax
Topic: Unable to find GDX File for input data from
Replies: 7
Views: 292

Re: Unable to find GDX File for input data from

Hi, The GDX file InputData.gdx cannot be found. Probably because it is not there... I guess the previous GDXXRW call might have failed. The log should tell you more about it. You might also want to add trace=3 to the GDXXRW call to get more detailed Feedback. If you share the log (or even better, th...