How to display more digits for GAMS variables?

Hi all,

I would like to display more digits for GAMS variables. How can I do
it? What kind of float notation does GAMS use in computations?

Best regards,

Germán Benítez.
–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

\

You have to use the option statement in your code. The syntax is:

options decimal=n

where, n is the number of decimals you want to display.

Look into Gams users guide (option statement appendix) for more info.

  • Yogendra.


    On Wed, Jun 17, 2009 at 12:46 PM, fcogerman wrote:


    Hi all,

I would like to display more digits for GAMS variables. How can I do
it? What kind of float notation does GAMS use in computations?

Best regards,

Germán Benítez.



–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

Germán,

If you want to do this for a specific parameter xyz only you can also do

option xyz:decimals:rowitems:columnitems;
display xyz;

E.g.

option xyz:4:1:2;
display xyz;

will display the 3-dimensional parameter xyz with one index displayed
within rows and 2 indices displayed within columns. All elements will be
displayed with 4 decimals.

HTH,
Jan



fcogerman wrote:

Hi all,

I would like to display more digits for GAMS variables. How can I do
it? What kind of float notation does GAMS use in computations?

Best regards,

Germán Benítez.


\

Hi,

Perfect. Thanks for the help.

Best regards,

Germán.

2009/6/18 Jan-H. Jagla


Germán,

If you want to do this for a specific parameter xyz only you can also do

option xyz:decimals:rowitems:columnitems;
display xyz;

E.g.

option xyz:4:1:2;
display xyz;

will display the 3-dimensional parameter xyz with one index displayed
within rows and 2 indices displayed within columns. All elements will be
displayed with 4 decimals.

HTH,
Jan



fcogerman wrote:

Hi all,

I would like to display more digits for GAMS variables. How can I do
it? What kind of float notation does GAMS use in computations?

Best regards,

Germán Benítez.


Jan-H. Jagla mailto:jhjagla@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW Eupener Str. 135-137
Washington DC, 20007, USA 50933 Cologne, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com http://www.gams.de




–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

Hello,

I have a problem in output precision. First, I read data from excel so because I want good precision I wrote above gdxin Option decimal=8;

So when the gams solve my nlp problem the results should had 8 digits but they have only 3 (the default choice).

Except for this, I try what you write above.
For example I wrote, option V:6;
display V.l;
where V is voltage at n bus and at t hour. But this give me results only for 1-bus.

One the other hand, I use the same syntax for Pcharge (active power at n bus and at t hour) but at display’s result says that all are zero (which does not happen at SolVar)

Any help?

Thanks a lot


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.

I found the solution. I should write the display below solve statement

Τη Σάββατο, 17 Αυγούστου 2013 3:52:34 μ.μ. UTC+3, ο χρήστης saosan έγραψε:

Hello,

I have a problem in output precision. First, I read data from excel so because I want good precision I wrote above gdxin Option decimal=8;

So when the gams solve my nlp problem the results should had 8 digits but they have only 3 (the default choice).

Except for this, I try what you write above.
For example I wrote, option V:6;
display V.l;
where V is voltage at n bus and at t hour. But this give me results only for 1-bus.

One the other hand, I use the same syntax for Pcharge (active power at n bus and at t hour) but at display’s result says that all are zero (which does not happen at SolVar)

Any help?

Thanks a lot


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.