[Scip] Automated tests with given feasible solutions

Gerald Gamrath gamrath at zib.de
Wed Jan 22 11:22:59 CET 2014


Dear Norbert,

yes, you can do this by adding some lines to the check/check.sh script.
It should be sufficient to set a cutoff bound there, you normally don't
need to read the solution itself.

You can do this by adding in check/check.sh something like the following:

SOLUFILE=testset/$TSTNAME.solu
CUTOFF=`grep "$SHORTFILENAME " $SOLUFILE | grep -v =feas= | grep -v
=inf= | tail -n 1 | awk '{print $3}'`
if test $CUTOFF != ""
then
   echo set limits objective $CUTOFF      >> $TMPFILE
fi

This needs to be after writing to the TMPFILE the command to read in the
problem, i.e., after
echo read $i                           >> $TMPFILE

Then you need a SCIP solu file with the optimal solution values in the
check/testset/ directory, which is named like your test file, but with
extension ".solu". Alternatively, you can hard-code the name of your
solu file in the lines you add and also use another format.

Alternatively, you could also read a solution file by adding
echo read $SOLFILE                     >> $TMPFILE
after the problem is read, where you can construct the solution file
name using SHORTFILENAME and, possibly, the directory name of the instance.

Best,
Gerald

On 21.01.2014 23:13, Norbert Fabritius wrote:
> Dear SCIP developers,
>
> I am planning to run automated tests on a set of instances as described in
> http://scip.zib.de/doc/html/TEST.shtml
> To determine the impact of early primal solutions, I was wondering if it is possible to read pre-computed optimal solutions for each instance, before it is solved.
> I know that this is possible using the read command from the command line interface, but I am not sure how this can be done in an automated way.
>
> Sincerely,
> Norbert Fabritius
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list