XPRS_msp_writeslxsol (MSP_WRITESLXSOL)
XPRS_msp_writeslxsol |
MSP_WRITESLXSOL |
Purpose
Creates an ASCII solution file (
.slx) using a similar format to MPS files. The file can contain one or more solutions. These files can be read back into a MIP solution pool using the
XPRS_msp_readslxsol function.
Synopsis
int XPRS_CC XPRS_msp_writeslxsol(XPRSmipsolpool msp, XPRSprob prob_context, int iSolutionId, int * iSolutionIdStatus, const char * sFileName, const char * sFlags)
Arguments
msp
|
The current MIP solution pool.
|
||||||
prob_context
|
Pointer to a problem. Can be NULL. See table below for interpretation in terms of function behaviour.
|
||||||
iSolutionId
|
The id of a solution to write; otherwise a flag. See table below for interpretation in terms of function behaviour.
|
||||||
iSolutionIdStatus
|
Pointer to an
int where the status of the
iSolutionId will be returned. The returned value is one of:
|
||||||
sFileName
|
Null terminated string containing the file name to which the solution(s) is to be written.
|
||||||
sFlags
|
Flags for
XPRS_msp_writeslxsol:
|
Further information
This table defines the interpretation of the values of arguments
prob_context and
iSolutionId in terms of the behaviour of
XPRS_msp_writeslxsol.
prob_context | iSolutionId | Behaviour |
Non-NULL | 0 | Write out all feasible solutions to prob_context. Use the column names in prob_context. |
Non-NULL | 0 | Write out a feasible solution to prob_context with the best objective (given the OBJSENSE value of prob_context). Use the column names in prob_context. |
Non-NULL | > 0 | Write out the solution with ID iSolutionId. It is an error if the solution does not have the same number of columns as prob_context. Use the column names in prob_context. |
NULL | ≤ 0 | Write out all solutions. Use automatically generated column names. |
NULL | > 0 | Write out the solution with ID iSolutionId. Use automatically generated column names. |
Related topics