[Scip] how to set the time limit and get the gap at termination

Stefan Heinz heinz at zib.de
Wed Sep 29 09:20:54 MEST 2010


Hi,

there is no method which says something like SCIPsetTimelimit(). Since the 
time limit and all other limits (gap , memory, nodes, ...) are parameters. 
Therefore,  you have to use the parameter methods to set them and get the 
limits. In case of the time limit it looks like that:

SCIP_Real timelimit;

/* for getting the time limit */
SCIP_CALL( SCIPgetRealParam(scip, "limits/time", &timelimit) );


/* for setting the time limit */
SCIP_CALL( SCIPsetRealParam(subscip, "limits/time", timelimit) );

For the gap there is the function SCIPgetGap(scip) in scip.h.

Best Stefan

On Tuesday 28 September 2010 03:31:25 XiangyongLi wrote:
> Dear all,
> 
> 
> When implementing branch and pricie, I want to set the time limit and get
>  the gap between best LP  and upper bound at termination.  Which functions
>  I should use?   I have checked scip.h, but I did not find them.
> 
> 
> Thanks
> 
> 
> Leo
> 


More information about the Scip mailing list