Initializing help system before first use

XPRSaddcbmipthread

Purpose
Declares a MIP thread callback function, called every time a MIP worker problem is created by the parallel MIP code. This callback function will be called in addition to any callbacks already added by XPRSaddcbmipthread.
Topic areas
Synopsis
int XPRS_CC XPRSaddcbmipthread(XPRSprob prob, void (XPRS_CC *mipthread)(XPRSprob cbprob, void *cbdata, XPRSprob threadprob), void *data, int priority);
Arguments
prob 
The current problem.
mipthread 
The callback function which takes three arguments, cbprob, cbdata and threadprob, and has no return value.
cbprob 
The problem passed to the callback function.
cbdata 
The user-defined data passed to the callback function.
threadprob 
The problem pointer for the MIP thread
data 
A user-defined data to be passed to the callback function.
priority 
An integer that determines the order in which multiple callbacks of this type will be invoked. The callback added with a higher priority will be called before a callback with a lower priority. Set to 0 if not required.
Related controls
Integer
Number of MIP threads to create.

Example
The following example clears the message callback for each of the MIP threads:
XPRSaddcbmipthread(prob,mipthread,NULL, 0);
void XPRS_CC mipthread(XPRSprob cbprob, void* cbdata,
                        XPRSprob mipthread)
{
  /* clear the message callback*/
  XPRSremovecbmessage(cbprob, mipthread, NULL);

}
Further information
This function will be called when a new MIP worker problem is created. Each worker problem receives a unique identifier that can be obtained through the MIPTHREADID attribute. Worker problems can be matched with different system threads at different points of a solve, so the system thread that is responsible for executing the callback is not necessarily the same thread used for all subsequent callbacks for the same worker problem. On the other hand, worker problems are always assigned to a single thread at a time and the same nodes are always solved on the same worker problem in repeated runs of a deterministic MIP solve. A worker problem therefore acts as a virtual thread through the node solves.
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.