I would like to perform parametric runs with different CPLEX options.
To this end I try to instruct the VTRun.cmd to create an option file by using CmdF_top attribute which before the GAMS call will add something like:
timeout /t 10 /nobreak
REM create/overwrite cplex.opt in current working directory for Parametric
echo * BA120-7 > cplex.opt
echo advind 0 >> cplex.opt
echo baralg 1 >> cplex.opt
echo barcrossalg 2 >> cplex.opt
echo barepcomp 1e-11 >> cplex.opt
for this purpose.
I have tested the use CmdF_top with a regular scenario and works fine, however it doesn’t work in parametric scenario,
as in all cases the VTRun.cmds are not aware of any additional line.
Is this behavior expected or do I miss something?
Is there an alternative way to perform Cplex options parametric runs?
I attach my parametric scenario.
20-03-2026, 08:56 PM (This post was last modified: 20-03-2026, 09:09 PM by Antti-L.)
I am not a VEDA developer, but as there is no response from VEDA support, I can maybe suggest trying to use SFCmd_top / SFCmd_bot instead of CmdF_top. Just write the commands creating the cplex.opt file into the parametric scenario DD file, using GAMS syntax, e.g. the following lines:
I think it should work like this, just the syntax being a bit different.
I tested it, but only directly with GAMS (modifying a parscen DD file), and that worked well. So, what would remain to be tested is that using SFCmd_top / SFCmd_bot will indeed write those lines out.
22-03-2026, 11:51 PM (This post was last modified: 23-03-2026, 12:05 AM by Antti-L.)
Ahh... it appears that neither SFCmd_Top / SFCmd_Bot nor CmdF_Top / CmdF_Bot appears to work with Scen_Par* files, but RFCmd_BOT does work. Actually, I had made that conclusion already earlier on the Forum, but had forgotten about that. But anyway, I tested with RFCmd_BOT now, and it worked fully as expected, and like I understood you were wishing. And Cplex did indeed use the cplex.opt written out by those GAMS statements for each parametric case.
(22-03-2026, 11:51 PM)Antti-L Wrote: Ahh... it appears that neither SFCmd_Top / SFCmd_Bot nor CmdF_Top / CmdF_Bot appears to work with Scen_Par* files, but RFCmd_BOT does work. Actually, I had made that conclusion already earlier on the Forum, but had forgotten about that. But anyway, I tested with RFCmd_BOT now, and it worked fully as expected, and like I understood you were wishing. And Cplex did indeed use the cplex.opt written out by those GAMS statements for each parametric case.
Dear Antti,
Thank you for your suggestions. RFCmd_BOT works fine and the user must be careful when ordering the lines to be added.
I can verify that RFCmd_DD works also fine in parametric runs.
Please allow me to share with other users a Parametric scenario template for using diferrent cplex options.
I still cannot introduce a timebreak between parscen runs, but I hope that in the future CmdF_top will work in parscen mode.