How to change GDX dimension limit?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String Parsing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!