Decimal figures option file (CPLEX)

Hello everyone,

I have a question: I am using GAMS/CPLEX and I wrote an options file
(objrng all rhsrng all)
to display the sensitivity analysis report, that is, shadow prices ,
allowable increase, allowable decrease, etc. This is working just
fine, but I would like to control the decimal figures of this output.

When I write
option decimals = 8;
in the .gms file it changes the decimal figures of all my displays
but it does not change the output of the sensitivity analysis data.

Anyone knows how to do this?

Best,
Bernardo

\

Bernardo,

The sensitivity figures are written by the GAMS/CPLEX link, you there
is no direct control of the format of these numbers. You can however
instruct the GAMS/CPLEX link to produce a separate file with the
ranging infortion (using option rngrestart). This creates a GAMS
program that can be compiled and the data can be read back into the
GAMS model. Now you can use the information to update your model data,
display the info or even use put files to produce the inforation in
any (ASCII) format you need. Below you find a an extension to the
trnsport.gms GAMS model which you find in the GAMS model library.

Hope this helps,
Michael Bussieck - GAMS World Coordinator


Model transport /all/ ;

$onecho > cplex.opt
objrng all
rhsrng all
rngrestart rng.gms
$offecho

option lp=cplex; transport.optfile=1;
Solve transport using lp minimizing z ;

Display x.l, x.m ;

  • We need this set to read the ranging info at runtime
    set uplo / up, lo /
    parameter
    costRNG(uplo)
    supplyRNG(i,uplo)
    demandRNG(j,uplo)
    xRNG(i,j,uplo)
    zRNG(uplo);

execute ‘gams rng.gms lo=%gams.lo% gdx=rng.gdx’;
abort$errorlevel ‘problems creating rng.gdx’;
execute_load ‘rng.gdx’ costRNG, supplyRNG,demandRNG, xRNG, zRNG;

display costRNG, supplyRNG,demandRNG, xRNG, zRNG;


On Apr 27, 5:38 pm, Bernardo Pagnoncelli wrote:

Hello everyone,

I have a question: I am using GAMS/CPLEX and I wrote an options file
(objrng all rhsrng all)
to display the sensitivity analysis report, that is, shadow prices ,
allowable increase, allowable decrease, etc. This is working just
fine, but I would like to control the decimal figures of this output.

When I write
option decimals = 8;
in the .gms file it changes the decimal figures of all my displays
but it does not change the output of the sensitivity analysis data.

Anyone knows how to do this?

Best,
Bernardo


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 athttp://groups.google.com/group/gamsworld?hl=en.

\