|Subject:||Re: [Help-glpk] interrupt glpk using JNI|
|Date:||Wed, 19 Apr 2006 12:48:52 -0700 (PDT)|
> I am using GLPK JNI for my problem. For the small instances it's ok
> since the solver doesn't take much time to solve. But sometimes
> when the instances are large GLPK takes few minutes to solve the
> instance. Now what if the user wants to interrupt the solver and
> not continue the solution process. I have tried to find out how to
> stop the solver while it is still running but no luck. I have tried
> to stop the java thread that starts GLPK solver native thread but it
> didn't help. Is there any API call or any specific method to interrupt
> the solver? I would highly appreciate any help.
You can limit the solution time. I'm not sure about jni (since never
used it); however, in c this can be attained by the following call:
lpx_set_real_parm(prob, LPX_K_TMLIM, tmlim);
where tmlim is the time limit, in secs, of double type.
|[Prev in Thread]||Current Thread||[Next in Thread]|