Thanks for your quick response but unfortunately this solution doesn't apply in this case. I want to let the user decide whether he wants to interrupt/cancel the solution process or not, and when. To be precise in the GUI I want to provide the cancel button once the solution is in progress. The time limit can be set only before the solution process begins. Once the solver starts solving the process, settting this parameter doesn't help(I actually tried it). Any other suggestions?

Andrew Makhorin <[EMAIL PROTECTED]> wrote:
> 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.



Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to