In my current project, I created a GAMS model that runs either directly on the Engine UI or through GAMS Studio, using the engine for execution. Now, I want to adapt this model to work as a GAMS MIRO application. According to the documentation, I need to use $onExternalInput
and $offExternalInput
to specify the symbols for input data.
However, I’m currently using GAMS Connect to handle data for the project, and MIRO’s approach seems to be closer to GDXXRW for loading data. Given this setup, how can I integrate GAMS Connect with MIRO?
Currently, my input data is loaded using the following code:
parameter hholdData_raw
consoData_raw
gpriData_raw;
$onEmbeddedCode Connect:
- ExcelReader:
file: hholddata_raw_new.xlsx
symbols:
- {name: hholdData_raw, range: hholdData!A1, columnDimension: 1,rowDimension: 1}
- {name: consoData_raw, range: consoData!A1, columnDimension: 1,rowDimension: 2}
- GAMSWriter:
writeAll: True # GAMS 47
#symbols: all # GAMS 48
$offEmbeddedCode
So I try this which obviously doesnt’ work:
$onExternalInput
parameter hholdData_raw
consoData_raw
gpriData_raw;
$onEmbeddedCode Connect:
- ExcelReader:
file: hholddata_raw_new.xlsx
symbols:
- {name: hholdData_raw, range: hholdData!A1, columnDimension: 1,rowDimension: 1}
- {name: consoData_raw, range: consoData!A1, columnDimension: 1,rowDimension: 2}
- GAMSWriter:
writeAll: True # GAMS 47
#symbols: all # GAMS 48
$offEmbeddedCode
$offExternalInput
I would greatly appreciate any help or hint from you. Thanks a lot in advance.
Mathieu