[Symphony-tickets] [SYMPHONY] #95: add a new function in the C API to allow a premature stop of the solver.
SYMPHONY
coin-trac at coin-or.org
Tue Mar 17 03:07:52 EDT 2009
#95: add a new function in the C API to allow a premature stop of the solver.
-------------------------+--------------------------------------------------
Reporter: ycollet | Owner: tkr
Type: enhancement | Status: new
Priority: normal | Milestone: 5.2
Component: Not Sure | Version:
Keywords: |
-------------------------+--------------------------------------------------
LPSolve has such a function. See at:
http://lpsolve.sourceforge.net/5.5/put_logfunc.htm
It is very useful especially in MIP. MIP resolution can be very time
consuming and (I am working on a scilab interface to Symphony), if you
start your resolution, I will control again scilab only at the end of the
resolution.
Here is the function I pass to put_logfunc in my lpsolve interface:
int __WINAPI abortfunction(lprec *lp, void *userhandle)
{
int doabort = (C2F(basbrk).iflag == -1);
C2F(basbrk).iflag = 0;
return(doabort);
}
C2F(basbrk).iflag is a fortran common variable which is set to true if
ctrl+c is hit.
In fortran, true == -1. So, when I hit ctrl+c, this function returns TRUE
and stops the resolution.
YC
--
Ticket URL: <https://projects.coin-or.org/SYMPHONY/ticket/95>
SYMPHONY <http://projects.coin-or.org/SYMPHONY>
The SYMPHONY framework for parallel branch-and-cut algorithms.
More information about the Symphony-tickets
mailing list