Option file Input from GDX

Hello all,
how can I adjust the option optcr in the option file so that I can use a value (scalar) from the gdx file for this?

SCALAR  rel_opt_tolerance         Relative Optimality criterion;
$Onecho > cplex.opt
threads=1
tilim=120
optcr=rel_opt_tolerance
datacheck 2  
mipdisplay 4
$Offecho

I have attached a picture of the error.
error.JPG
Thanks for your help
Janisch

You have to convert rel_opt_tolerance to a compile time variable using $eval as follows

$eval critopt crit_opt

Then you can use %critopt% in the options file.

$Onecho > cplex.opt
optcr= %critopt%
$Offecho

Hope this helps.

  • Atharv

Thank you Atharv!