XPRSwritebinsol

WRITEBINSOL


Purpose
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer.
Synopsis
int XPRS_CC XPRSwritebinsol(XPRSprob prob, const char *filename, const char *flags);
WRITEBINSOL [-flags] [filename]
Arguments
prob 
The current problem.
filename 
A string of up to 200 characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a .sol extension.
flags 
Flags to pass to XPRSwritebinsol (WRITEBINSOL):
output the LP solution.
Example 1 (Library)
After an LP has been solved or a MIP solution has been found the solution can be saved to file. If a MIP solution exists it will be written to file unless the -x flag is passed to XPRSwritebinsol (WRITEBINSOL) in which case the LP solution will be written. The Optimizer input commands might then be:
XPRSreadprob(prob, "myprob", "");
XPRSmaxim(prob, "g");
XPRSwritebinsol(prob, "", "");
This reads in a matrix file, maximizes the MIP and saves the last found MIP solution.
Example 2 (Console)
An equivalent set of commands to the above for console users would be:
READPROB
MAXIM -g
WRITEBINSOL
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSreadbinsol (READBINSOL), XPRSwritesol (WRITESOL), XPRSwriteprtsol (WRITEPRTSOL).


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.