help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: C# Examples for glp_term_hook() and glp_error_hook


From: Heinrich Schuchardt
Subject: Re: [Help-glpk] [Fwd: C# Examples for glp_term_hook() and glp_error_hook()]
Date: Mon, 19 Jun 2017 10:21:18 +0200

Hello Edmund,

please, call GlpkCallback.addListener to attach your callback method, cf. 
examples/csharp/Gmpl.cs

Call Glpk.glp_ios_terminate(tree) in the callback method when requested by the 
user.

Best regards

Heinrich Schuchardt

http://www.xypron.de

Am 19.06.17 um 08:18 schrieb Andrew Makhorin

> -------- Forwarded Message --------
> To: address@hidden <address@hidden>
> Subject: C# Examples for glp_term_hook() and glp_error_hook()
> Date: Mon, 19 Jun 2017 03:37:06 +0000 (UTC)
> 
> Hi GLPK developers,
> 
> 
> I am writing a MIP optimisation software using GLPK for C# as the
> engine.
> 
> 
> I intend to build an "abort" function in my software, this function will
> become active once GLPK finds a feasible solution, after which, if the
> user clicks on "abort", it terminates GLPK's branch-and-bound search and
> outputs the current best solution.
> 
> 
> Looking through the help manual, I thought of using glp_term_hook() to
> read whether a feasible solution had been found, then use glp_error_hook
> to terminate and output the current best solution. However documentation
> for these 2 methods for C# seems lacking. Appreciate if you can provide
> me some examples. I have little experience in C/ C++.
> 
>  
> Thanks and best regards
> Edmund Chen
> 
> 
> 
> 
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk



reply via email to

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