help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Embedding GLPK to user application


From: Axel Simon
Subject: Re: [Help-glpk] Embedding GLPK to user application
Date: Sun, 26 Oct 2008 10:39:26 +0100


On Oct 26, 2008, at 9:15, <address@hidden> wrote:

Hello!



I try to embed  #8220;GLPK-solver #8221;
to user application. The main problem is the application #8217;s #8220;hanging up #8221; during solution process. User what to see solving progress and view best feasible solution during solving process in his GUI application. With #8220;lp_solve #8221; this problem solved by using callback functions. Callbacks raises on each simplex iteration and on each improving solution found. Programmer may put his code to callback functions to iteration with user (handling mouse, keyboard and windows events) and fetching viewing feasible solutions. If callback function return false then solving process is halted. So, programmer may supply user by possibilities stop solving process in any moment
of time.


If you want to give user feedback after each iteration, you could also try to limit the number of iterations the solver performs (by using the it_lim field of the parameter data structure passed to the solver). In principle, by setting the limit to 1, you should get the sequence of solutions that the solver examines.

From the top of my head: I tried this tactic to count the number of iterations the solver takes to find a solution. It didn't always work in the sense that the solver did not always make progress when given one iteration to run. I remember that somehow there was an infinite loop and I had to give it several iterations to guarantee that it terminates. But this might be a starting point.

Cheers,
Axel.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]