GLPK for C#/CLI  1.10.0
All Classes Namespaces Functions Properties Pages
Static Public Member Functions | List of all members
org.gnu.glpk.GlpkCallback Class Reference

This class manages callbacks from the MIP solver. More...

Collaboration diagram for org.gnu.glpk.GlpkCallback:
Collaboration graph

Static Public Member Functions

static void callback (IntPtr cPtr)
 Callback method called by native library. More...
 
static void addListener (IGlpkCallbackListener listener)
 Adds a listener for callbacks. More...
 
static bool removeListener (IGlpkCallbackListener listener)
 Removes first occurance of a listener for callbacks. More...
 

Detailed Description

This class manages callbacks from the MIP solver.

The GLPK MIP solver calls method callback in the branch-and-cut algorithm. A listener to the callback can be used to influence the sequence in which nodes of the search tree are evaluated, or to supply a heuristic solution. To find out why the callback is issued use method GLPK.glp_ios_reason.

The listener list is stored in thread local storage. Each thread has to register its own listener.

Definition at line 18 of file GlpkCallback.cs.

Member Function Documentation

◆ addListener()

static void org.gnu.glpk.GlpkCallback.addListener ( IGlpkCallbackListener  listener)
inlinestatic

Adds a listener for callbacks.

Parameters
listenerlistener for callbacks

Definition at line 51 of file GlpkCallback.cs.

◆ callback()

static void org.gnu.glpk.GlpkCallback.callback ( IntPtr  cPtr)
inlinestatic

Callback method called by native library.

Parameters
cPtrpointer to search tree

Definition at line 39 of file GlpkCallback.cs.

Here is the call graph for this function:

◆ removeListener()

static bool org.gnu.glpk.GlpkCallback.removeListener ( IGlpkCallbackListener  listener)
inlinestatic

Removes first occurance of a listener for callbacks.

Parameters
listenerlistener for callbacks
Returns
true if the listener was found

Definition at line 60 of file GlpkCallback.cs.


The documentation for this class was generated from the following file: