GAMS [ Home | Support | Sales | Solvers | Documentation | Model Library | Search | Contact Us ]

cplex02.gms : CPLEX test suite - tuning test


Contributor: Michael Bussieck

Small Model of Type: GAMS
$TITLE 'CPLEX test suite - tuning test' (CPLEX02,SEQ=356) $ontext Contributor: Michael Bussieck $offtext $ifi %system.platform% == AXU $exit No CPLEX 11 or higher for this platform $ifi %system.platform% == DAR $exit No CPLEX 11 or higher for this platform $call gamslib -q cube $call grep -v Option cube.gms | grep -v Solve > cubex.gms $onecho >> cubex.gms Scalar deftime Default time, tuntime Solution time after tuning; * Solve using default cube.optfile=0; Solve cube minimizing num using mip; deftime = cube.resusd; * Do tuning cube.optfile=1; Solve cube minimizing num using mip; * Use tuned option file cube.optfile=99; Solve cube minimizing num using mip; tuntime = cube.resusd; * Hope for at least 10% improvement display deftime, tuntime; abort$(0.9*deftime<tuntime) 'Less than 10% improvement by tuning'; $offecho $echo * Empty > cplex.o99 $echo tuning cplex.o99 > cplex.opt $call =gams cubex lo=0 optcr=0 mip=cplex $if errorlevel 1 $abort 'problems with CPLEX tuning option'