Initializing help system before first use

XPRS_mse_defaulthandler

XPRS_mse_defaulthandler


Purpose
A routine defined in xprs_mse_defaulthandler.h intended only to be passed as a callback into the enumeration-run routines XPRS_mse_minim, XPRS_mse_maxim and XPRS_mse_opt. When used to run an enumeration this routine is called each time a solution is found in the enumeration. This routine provides simple functionality to manage common strategies for keeping a 'good' set of solutions found during enumeration and controlling the enumeration run e.g., n-best solutions. The user may wish to base any customized version of the callback on the contents of this routine.
Synopsis
int XPRS_CC XPRS_mse_defaulthandler(XPRSmipsolenum mse, XPRSprob prob, XPRSmipsolpool msp, void *ctx, int *const nMaxSols, const double *const x, const int nCols, const double dMipObject, double *const dModifiedObject, int *const bRejectSoln, int *const bUpdateMipAbsCutOffOnCurrentSet)
Arguments
mse 
The current MIP solution enumerator.
prob 
The problem used to enumerate solutions.
msp 
The MIP solution pool used to store the solutions found during enumeration.
ctx 
The user-defined object passed into the enumeration-run routine that started this run (i.e., XPRS_mse_minim, XPRS_mse_maxim or XPRS_mse_opt).
nMaxSols 
The integer pointer passed into the enumeration-run routine that started this run (i.e., XPRS_mse_minim, XPRS_mse_maxim or XPRS_mse_opt). Note that this pointer is only used by the callback and is intended to store the maximum number of solutions the user is prepared to capture during the enumeration.
A dense solution array of doubles containing the nCols solution values of the new solution.
nCols 
The number elements in x. This is the same as the column dimension of the problem when the enumeration was started.
dMipObject 
A double with the value of the MIP objective of the solution.
dModifiedObject 
A pointer to a double that contains, on entry to the routine, the MIP objective. The user can assign it a new value that reflects the 'true' objective of the solution in cases where the MIP objective does not completely model the user's problem. The returned value is stored as the MSE_METRIC_MODOBJECT metric of the solution.
bRejectSoln 
A pointer to an integer that is at value zero on entry to the routine. The solution will not be stored if the user returns this variable at a non-zero value.
bUpdateMipAbsCutOffOnCurrentSet 
A pointer to an integer that is at value zero on entry to the routine. If the user returns this variable with a non-zero value then the MIP solution enumerator will update the MIPABSCUTOFF of the problem to reflect the worst MIP objective of the stored solutions (including the new solution if it is not rejected).
Further information
This simple routine uses only four different API function calls. These calls are to the MIP solution enumerator routines XPRS_mse_getcullchoice, XPRS_mse_getintattrib and XPRS_mse_getintcontrol and the MIP solution pool routine XPRS_msp_delsol.
Related topics

© 2001-2020 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.