XPRS_mse_getcullchoice
XPRS_mse_getcullchoice |
Purpose
Generates a list of solution ids for solutions recommended to be dropped assuming that the given number of solutions are required to be dropped and the solutions are to be compared with each other with respect to the given metric. This function also decides whether a given, new solution defined by its metric value (or its solution values) should also be dropped given that the returned list of solutions are recommended to be dropped.
Synopsis
int XPRS_CC XPRS_mse_getcullchoice(XPRSmipsolenum mse, int iMetricId, int cull_sol_id_list[], int nMaxSolsToCull, int * nSolsToCull, double dNewSolMetric, const double x[], int nCols, int * bRejectSoln)
Arguments
mse
|
The current MIP solution enumerator.
|
iMetricId
|
Id of metric for which the solutions should be compared e.g., the MIP objective value is used when
MSE_METRIC_MIPOBJECT is passed down. A full list of all available metrics may be found in Chapter
MSE Attributes, or from the list in the
xprs.h header file.
|
cull_sol_id_list
|
Integer array where the solution ids will be returned. May be NULL if not required.
|
nMaxSolsToCull
|
The maximum number of solutions required to be returned in
cull_sol_id_list.
|
nSolsToCull
|
Pointer to an integer where the number of solution ids that were written to
cull_sol_id_list is returned. May be NULL if not required.
|
dNewSolMetric
|
The metric value for the new solution for the metric identified by iMetricId. It is assumed that the user wishes to decide whether or not to keep the new solution given that solutions in the returned list
cull_sol_id_list are recommended to be dropped.
|
x
|
The solution values of the new solution. The diversity metric (
MSE_METRIC_DIVERSITY) requires the solution values in order to calculate the new solution's metric with respect to the currently stored solutions. Other metrics simply use
dNewSolMetric and do not require the solution values. May be NULL if not required.
|
nCols
|
The number of columns in the solution array x. This must be the same as the number of (initial) columns in the enumeration problem.
|
bRejectSoln
|
If this is passed down as NULL or if its value is non-zero then the given new solution is ignored.
|
Further information
1. If
cull_sol_id_list is NULL or
nMaxSolsToCull is zero or
nSolsToCull is NULL (i.e., a list of solution ids cannot be returned) then the routine simply decides whether or not to reject the new solution based on the assumption that no currently existing solutions are to be dropped.
2. The user can drop solutions by calling
XPRS_msp_delsol on the MIP solution pool being used by the enumerator.
3. To call the routine ignoring the new solution the user can pass the argument
bRejectSoln as NULL. Note that if the new solution is not to be ignored then the user must pass
bRejectSoln as non-NULL with an initial value of zero.
Related topics