Hi, I am using GDXMRW to link Matlab and GAMS, following the instruction given in www.gams.com/dd/docs/tools/gdxmrw.pdf. I encounter a problem on how to deal with subset.
If I define subset like this :
Xs.name = ‘X’;
Xs.ts = ‘all branches’;
Xs.val = [ linspace(1,6,6) ]';
Xs.type = ‘set’;
Xs.form = ‘sparse’;
Xs.uels = {‘L1’, ‘L2’,‘L3’,‘L4’,‘L5’,‘L6’};
Ks.name = ‘K(X)’;
Ks.ts = ‘new branches’;
Ks.val = [ linspace(1,3,3) ]';
Ks.type = ‘set’;
Ks.form = ‘sparse’;
Ks.uels = {‘L4’,‘L5’,‘L6’};
Matlab says
"??? Undefined function or variable ‘X’.
Error in ==> small5run at 117
wgdx (‘smalldat5’, Xs, Ys, K(X), ALs,loads,ress,capexs, opexs,curts,incids,volls,volus,ms,Ibs);"
If I define it as “Ks.name = ‘K’;”, in GAMS define K as a normal set, it will say “Domain violation for set”
Anyone has experience on this issue? Thanks a lot for sharing your solution!
Or if anyone has some ideas on how to solve it, please enlighten me, thanks a lot!
Yalin
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.
\