Opened 5 years ago
add a new function in the C API to allow a premature stop of the solver.
|Reported by:||ycollet||Owned by:||tkr|
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;
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.