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

XiangyongLi lixiangyong at 163.com
Wed Sep 29 11:00:20 MEST 2010


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.

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



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
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20100929/05bd491a/attachment.html


More information about the Scip mailing list