2D set: Matlab=>GAMS

Dear all,

I’m trying to input 2d set into GAMS from Matlab. Matdata.gdx file is correctly created, but when I run GAMS file from matlab I get error: 579 Cannot clear a set used as a domain or used in log/ord operations.
I’m not sure what I’m doing wrong? The files are attached! Thanks!


TEST_DC_OPF.m (254 Bytes)
DC_OPF.gms (110 Bytes)

Never mind, i solved the problem. Thanks anyway!

Dana utorak, 17. prosinca 2013. 22:15:07 UTC+1, korisnik daja napisao je:

Dear all,

I’m trying to input 2d set into GAMS from Matlab. Matdata.gdx file is correctly created, but when I run GAMS file from matlab I get error: 579 Cannot clear a set used as a domain or used in log/ord operations.
I’m not sure what I’m doing wrong? The files are attached! Thanks!


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.

Hi,

I am having the same problem here, how can i solve it?

Thanks


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/d/optout.

Here is an example how to input 2D set from Matlab to GAMS. Hope it helps!


GEN_MAP.gms (180 Bytes)
GEN_MAP_v1.m (486 Bytes)
GEN_MAP_v2.m (559 Bytes)
MAP.gdx (619 Bytes)

This is a nice example and way to do the job, thanks.
I attach a version 3 that “puts some magic code” into a defined function guel,
and then does the same thing. Note that guel could be called with an empty string “” to get the same output as in v2.

Cheers, Michael





On Jun 30, 2014, at 2:05 AM, daja wrote:

Here is an example how to input 2D set from Matlab to GAMS. Hope it helps!


GEN_MAP_v3.m (532 Bytes)