[Scip] getting statistics on LP relaxation

Ambros Gleixner gleixner at zib.de
Wed Jun 11 01:17:56 CEST 2014


Dear Luigi,

scip->stat->rootlowerbound contains the right value, but you should not 
include struct_stat.h and access it directly, since this does not belong 
to the public interface.  It is better to use

   SCIPgetDualboundRoot()

in scip.h.  Note that there also exist

    SCIPgetFirstLPDualboundRoot().

For the time to solve the first LP at the root node, you can use

    SCIPgetFirstLPTime()

but of course there are many LPs solved at the root, e.g., to reoptimize 
after adding cuts, and to my knowledge SCIP currently does not store the 
sum of all the LP times at the root node.  I would not know how to get 
this other than adding a new counter to the statistics in the SCIP core.

You could do this by adding

    SCIP_CLOCK* rootprimallptime;
       /**< primal LP solution time at the root node*/
    SCIP_CLOCK* rootduallptime;
       /**< dual LP solution time at the root node */

to struct_stat.h, and wherever the existing stat->primallptime and 
stat->duallptime are touched, update those if ( stat->maxdepth == 0 ). 
Finally you can make them accessible in scip.{h,c} by methods like 
SCIPget{Primal,Dual}LPTimeRoot().

If you do this and it works for you, we could include it in the next 
release if you send us the patch.

Hope that helps,

ambros




Am 10.06.2014 22:21, schrieb Luigi De Giovanni:
> Dear all,
>
> I have a branch-and-price algorithm and I am going to run some
> computational experiments. I would like to collect some statistics on
> the LP relaxation at the root node.
> I use
>
> scip->stat->rootlowerbound
>
> to get the value of the linear relaxation at the root node. Is this
> correct?
>
> How can I get the overall time needed to solve the LP relaxation at the
> root node?
>
> Thank you very much!
>
> Luigi De Giovanni
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-- 
____________________________________________________________
Ambros M. Gleixner
Zuse Institute Berlin - Matheon - Berlin Mathematical School
http://www.zib.de/gleixner


More information about the Scip mailing list