Initializing help system before first use

XPRS_msp_getsollist

XPRS_msp_getsollist


Purpose
Returns a list of solution ids of solutions with the same number of columns as prob_to_rank_against. The list may be sorted by the value of some attribute of the solutions e.g., the objective function. The list may be filtered to contain either only feasible solutions or only infeasible solutions.
Synopsis
int XPRS_CC XPRS_msp_getsollist(XPRSmipsolpool msp, XPRSprob prob_to_rank_against, const int iRankAttrib, const int bRankAscending, const int iRankFirstIndex, const int iRankLastIndex, int iSolutionIds_Zb[], int * const nReturnedSolIds, int * const nSols)
Arguments
msp 
The current MIP solution pool.
prob_to_rank_against 
Problem for which the attribute iRankAttrib is evaluated in order to rank the solution ids returned in the iSolutionIds array. Only solutions with the same number of columns as prob_to_rank_against are considered when generating the list of solution ids. May be NULL if the IDs of all solutions are to be returned.
iRankAttrib 
Id of the attribute whose value is used to rank the solution ids returned in the iSolutionIds array. A full list of all available attributes may be found in Chapter MSP Attributes, or from the list in the xprs.h header file. If the attribute represents infeasibility then only infeasible solutions will be returned; otherwise only feasible solutions will be returned. If iRankAttrib is passed in as 0, or if it is not a valid attribute id, then the solution ids of feasible solutions for the problem will be returned unranked. If iRankAttrib is not a valid attribute id then a warning is logged. This argument is ignored if prob_to_rank_against is passed as NULL.
bRankAscending 
If set to a non-zero value the function returns the solution ids ordered in ascending order of the attribute value; otherwise the solution ids are returned in descending order. This argument is ignored if prob_to_rank_against is passed as NULL or if iRankAttrib is passed in as 0, or if it is not a valid attribute id.
iRankFirstIndex 
Index (one-based) in the rank order of solutions for which the associated solution's id number, if there is a solution at this index, is to be returned in the first element of array iSolutionIds. If iRankLastIndex > iRankFirstIndex then any subsequent solutions in the rank ordering are to have their solution ids written to the subsequent elements of iSolutionIds.
iRankLastIndex 
If iSolutionIds is non-NULL then at most iRankLastIndex - iRankFirstIndex + 1 solution ids will be written to iSolutionIds. There will be fewer solution ids written if iRankLastIndex is greater than the number of solutions in the MIP solution pool.
iSolutionIds 
Integer array where the solution ids will be returned. May be NULL if not required.
nReturnedSolIds 
Pointer to an integer where the number of solution ids that were available to be written is returned. This number will always be less than or equal to iRankLastIndex - iRankFirstIndex + 1. A value is returned for this parameter regardless of whether iSolutionIds is passed as NULL. May be NULL if not required.
nSols 
Pointer to an integer where the total number of solution ids that could possibly be written is returned. May be NULL if not required.
Further information
1. If iRankFirstIndex > iRankLastIndex and the nSols argument is passed down as NULL then the routine will return with no solution ids written.
2. Information about the solution with respect to the problem can be obtained via routines XPRS_msp_getdblattribprobsol, XPRS_msp_getintattribprobsol, XPRS_msp_getdblattribsol and XPRS_msp_getintattribsol. The solution values can be obtained via the routine XPRS_msp_getsol.
Related topics