Description
This test checks if a solver that provides the "modify problem" capability uses hot starts in GUSS. Contributor: Michael Bussieck, January 2025 (updated)
Small Model of Type : GAMS
Category : GAMS Test library
Main file : scensol8.gms
$title 'Check if solver with modify problem use hotstart in GUSS' (SCENSOL8,SEQ=867)
$onText
This test checks if a solver that provides the "modify problem" capability
uses hot starts in GUSS.
Contributor: Michael Bussieck, January 2025 (updated)
$offText
Set lpsolvers superset of solvers / system.solverNames /
hotstart(lpsolvers) solver with GUSS hotstart capability
/ copt, cplex, gurobi, highs, ipopt, ipopth, soplex /;
execute.checkErrorLevel 'gamslib -q gussex1';
$if "%gams.lp%"=="" $log "Select LP solver from command line"
$if "%gams.lp%"=="" $exit
put_utility 'shell.checkerrorlevel' / 'gams gussex1 lo=2 lp=%gams.lp%';
put_utility 'shell' / 'grep "uses hotstarts" gussex1.log > %system.nullFile%';
abort$(errorLevel<>0 and hotstart('%gams.lp%')) 'Expect %gams.lp% to use hotstarts';
abort$(errorLevel=0 and not hotstart('%gams.lp%')) 'Expect %gams.lp% not using hotstarts';
abort.noError$(not hotstart('%gams.lp%')) 'No test with explicitely turning hotstart off necessary';
* Explicitly prevent hotstarts
put_utility 'shell.checkerrorlevel' / 'sed s/"SkipBaseCase 1"/"SkipBaseCase 1, NoHotStart 1"/ gussex1.gms > gussex1_nhs.gms';
put_utility 'shell.checkerrorlevel' / 'gams gussex1_nhs lo=2 lp=%gams.lp%';
put_utility 'shell' / 'grep "uses hotstarts" gussex1_nhs.log > %system.nullFile%';
abort$(errorLevel=0) 'Expect %gams.lp% to not use hotstarts after disabling';