Initializing help system before first use

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:
-2 
Solution id does not exist;
-1 
Solution with the given id is already deleted;
Solution id was for an active solution.
sFileName 
Null terminated string containing the file name to which the solution(s) is to be written.
sFlags 
use full precision for numerical values;
use hexadecimal format to write values.
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