How to change GDX dimension limit?

1 Ansicht (letzte 30 Tage)
Biswajit Dipan Biswas
Biswajit Dipan Biswas am 25 Feb. 2019
Hello,
I'm working on optimiziation of power system using GAMS interfaced with MATLAB. To come up with a generalized code which will work for any size of power system I want to send the set including size of the system (i.e., 33 bus system, 123 nodes system etc) from MATLAB to GAMS. I've found that this can be done using GDX files. In my GAMS code I need to define sets having value as "bus1,bus2,bus3,........,bus33". If I create that string in MATLAB and export that as the structure value using the following code:
Is.name = 'bi';
Is.val = M; %M is the string containing bus1,bus2,bus3,........,bus33
Is.type = 'set';
wgdx('tstdat', Is);
then it gives an error that "Input structure field .val must be double matrix".
Then I changed that string and decided to use a vector 1:33 for the set value such as
M=1:33;
then it gives the error
"Input arg exceeds GDX dimension limit of 20"
But I have systems which can be very large, like 123 nodes, 500 nodes, 3000 nodes etc. How can I resolve this problem so that I can pass the vectors or string arrays of any size.
Thank you.

Antworten (0)

Kategorien

Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by