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

Stefan Heinz heinz at zib.de
Wed Sep 29 11:28:41 MEST 2010


On Wednesday 29 September 2010 11:00:20 XiangyongLi wrote:
> Dear Stefan,
> 
> Now I have another problem after I set the time limit.
> 
> For instances which are exactly solved within the time limit, 
>  SCIPgetSolTime(scip, sol)  can get the correct computation time.
This method returns the time when the solution sol was found. This not the 
time for the overall computation. For that you have to use SCIPgetTotalTime().

> But for instances which cannot be optimally solved within the time limit,
>  it can not return the correct computation time.
see above.

Best Stefan

> 
> 
> 
> Best regards.
> 
> 
> Xiangyong
> 
> 
> 
> 
> 
> 
> 发件人: Stefan Heinz
> 发送时间: 2010-09-29  15:22:04
> 收件人: scip at zib.de
> 抄送: XiangyongLi
> 主题: Re: [Scip] how to set the time limit and get the gap at termination
> 
> 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