Cells | MSF Excel Plugin | GAMS gdxxrw |
---|---|---|
n=100 | 0.7 | 1.2 |
n=1000 | 2.7 | 1.3 |
n=10000 | 23.0 | 1.4 |
Timings are in seconds. We see the MSF timings increase quickly, while the GAMS timings are still dominated by the fixed cost of launching Excel.
MSF Model:
Binding: P<=="Sheet1!$B$2:$CW$101"
Model[
Parameters[Sets,I,J],
Parameters[Reals,P[I,J]],
Decisions[Reals,d],
Constraints[d==0]
]
GAMS Model:
$call gdxxrw i=data.xlsx par=p rng=A1:CW101
parameter p(*,*);
$gdxin data
$load p
scalar n;
n=card(p);
display n;
The MSF code contains a large parameter that is read through data binding, together with a minimal (one variable, one constraint) model. The GAMS code calls GDXXRW to read the spreadsheet and then the intermediate GDX file is read again by GAMS. We display the cardinality of p as a check we read all numbers.
No comments:
Post a Comment