How do I get zeros in my GAMS Output?

Hey guys,

I’m a GAMS beginner and I have some problems getting zeros into my output.
I have 2 variables d_S(t, i); c_S(t, i), which I want to use in MATLAB. But if I import my GAMS Output into MATLAB, I get:

[8, 12, 21, 10] instead of [0, 8, 0, 0, 12, 0, 21, 0, 0, 0, 10]

I found the following page:
http://support.gams.com/doku.php?id=gams:output_zero_values_with_a_display_statement

So I tried to include this code in my text:

Model my_model /all/;

Solve my_model using minlp minimizing zf;

file output;

d_S(t, i)(Not d_S(t, i)) = EPS; c_S(t, i)(Not c_S(t, i)) = EPS;

execute_unload “result”

I get the Error 143 “A suffix is missing”. What should i do? What did I wrong?

Thanks for your help!



\

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.

Hi Banolli,

I think you should use “.l” after your variable name (d_S.l(t, i)).

Look for ‘The ’.lo, .l, .up, .m’ Database’ section in GAMS - User’s Guide.

.lo lower bound
.l level or primal value
.up upper bound
.m marginal or dual value

Regards,

Morteza Shabanzadeh








On Tuesday, June 24, 2014 6:55 PM, Banolli wrote:


Hey guys,

I’m a GAMS beginner and I have some problems getting zeros into my output.
I have 2 variables d_S(t, i); c_S(t, i), which I want to use in MATLAB. But if I import my GAMS Output into MATLAB, I get:

[8, 12, 21, 10] instead of [0, 8, 0, 0, 12, 0, 21, 0, 0, 0, 10]

I found the following page:
http://support.gams.com/doku.php?id=gams:output_zero_values_with_a_display_statement

So I tried to include this code in my text:

Model my_model /all/;

Solve my_model using minlp minimizing zf;

file output;

d_S(t, i)(Not d_S(t, i)) = EPS; c_S(t, i)(Not c_S(t, i)) = EPS;

execute_unload “result”

I get the Error 143 “A suffix is missing”. What should i do? What did I wrong?

Thanks for your help!



\

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.

\

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.

Thank you! It is working :slight_smile:


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.