Hello everybody,
Being at a very early stage of using GAMS, I’m facing an error that I cannot fix after multiple attempts, although following GAMS Guide. I want to insert a simple Excel file called demand.xlsx that consists of 2 columns, representing an hourly step on Column A (t1 ~ t672) and the corresponding consumption of each hour on Column B. Using the code below (I have only copied the part that concerns the error), I’m getting an error that seems to be that there is no gdx file creating after importing my Excel file.
I would appreciate some feedback. Thank you in advance!
*=== Import from Excel Demand
PARAMETER demand(t)
$call gdxxrw.exe demand.xls par=Demand rng=A1:B672 rDim=1
$gdxin demand.gdx
$load Demand
$gdxin
DISPLAY Demand
The error that I’m getting is the following.
1 SETS technologies /coal, gas, nuclear, wind_offshore, wind_onshore /
2 timeperiods /t1*t672/;
3 alias(technologies,tech)
4 alias(timeperiods,t)
5
6 SET wind_tech(tech) /wind_offshore, wind_onshore/;
7 SET no_wind(tech) /coal,gas,nuclear/;
8
9 *=== Import from Excel Demand
10 PARAMETER demand(t)
**** File: C:\Users\Nosdi\Desktop\MODELLING & ANALYSIS OF SES USING OPERATIONS RESEARCH\Final Project\GAMS\demand.gdx
**** Msg : No such file or directory
12 $gdxin demand.gdx
**** $510
**** 510 Unable to open gdx file for $GDXIN
13 $load Demand
**** $502
**** 502 GDXIN file not open - ignore rest of line
15 DISPLAY Demand
**** $141
**** 141 Symbol declared but no values have been assigned. Check for missing
**** data definition, assignment, data loading or implicit assignment
**** via a solve statement.
**** A wild shot: You may have spurious commas in the explanatory
**** text of a declaration. Check symbol reference list.