$title 'CPLEX test suite - bch incumbent checker' (CPLEX07,SEQ=832) $if not '%GAMS.lp%' == '' $set solver %GAMS.lp% $if not set solver $set solver cplex $onText Tests the CPLEX link option 'userincbcall' (BCH incumbent checker). This instance further includes tests of 'miptrace' and BCH heuristics. Contributor: Renke Kuhlmann, October 2020 $offText $call gamslib -q 12 $call =gams magic lo=%GAMS.lo% solver=%solver% $if errorlevel 1 $abort 'problems solving original problem' * testing incumbent report $onEchoV > incubemt_check.gms $echo BCH Incumbent Report > cplex07_empty_report.txt $offEcho $echo userincbicall incubemt_check > %solver%.opt $call =gams magic lo=%GAMS.lo% solver=%solver% optfile=1 $if errorlevel 1 $abort 'problems with %solver% userincbicall option' $call =grep -q "BCH Incumbent Report" magic.lst $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Report" cplex07_empty_report.txt $if errorlevel 1 $abort 'problems with %solver% userincbcall option' * testing incumbent check and miptrace (always accept) $onEchoV > incubemt_check.gms abort 'accept incumbent'; $offEcho $echo userincbcall incubemt_check > %solver%.opt $echo miptrace miptrace.trc >> %solver%.opt $call =gams magic lo=%GAMS.lo% solver=%solver% optfile=1 $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Check: Rejected" magic.lst $if not errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Check: Accepted" magic.lst $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q ".*, E, .*, 988540, 988540" miptrace.trc $if errorlevel 1 $abort 'problems with %solver% miptrace option' * testing incumbent check and miptrace (always reject) $onEchoV > incubemt_check.gms $offEcho $echo userincbcall incubemt_check > %solver%.opt $echo miptrace miptrace.trc >> %solver%.opt $call =gams magic lo=%GAMS.lo% solver=%solver% optfile=1 nodlim=20 $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Check: Rejected" magic.lst $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Check: Accepted" magic.lst $if not errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q ".*, E, .*, na, 988540" miptrace.trc $if errorlevel 1 $abort 'problems with %solver% miptrace option' * testing incumbent check and user heuristics * the user heuristic fixes the n variables which gives a solution of 1320300 $onEchoV > userheur.gms $include magic.gms n.lo(g,t) = n.up(g,t); solve william minimizing cost using mip; $offEcho $onEchoV > incubemt_check.gms Parameter c; $gdxIn bchout_i.gdx $load c=cost.l $gdxIn abort$(c = 1320300) 'accept incumbent'; $offEcho $echo userheurcall userheur.gms >> %solver%.opt $call =gams magic lo=%GAMS.lo% solver=%solver% optfile=1 nodlim=20 $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Check: Rejected" magic.lst $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q "BCH Incumbent Check: Accepted" magic.lst $if errorlevel 1 $abort 'problems with %solver% userincbcall option' $call =grep -q ".*, E, .*, 1320300\|.*, E, .*, 1.3203e+06" miptrace.trc $if errorlevel 1 $abort 'problems with %solver% miptrace option'