Initializing help system before first use

problem.readslxsol

problem.readslxsol


Purpose
Reads an ASCII solution file ( .slx) created by the problem.writeslxsol function.
Synopsis
problem.readslxsol(filename, flags)
Arguments
filename 
A string of up to 200 characters containing the file name to which the solution is to be read. If omitted, the default problem_name is used with a .slx extension.
flags 
(optional) Flags to pass to writeslxsol:
read the solution as an LP solution in case of a MIP problem;
read the solution as a solution for the MIP problem;
reads multiple MIP solutions from the .slx file and adds them to the MIP problem.
Example
p.readslxsol("lpsolution", "") 
This loads the solution to the MIP problem if the problem contains global entities, or otherwise loads it as an LP (barrier in case of quadratic problems) solution into the problem.
Further information
1. When readslxsol is called before a MIP solve, the loaded solutions will not be checked before calling problem.mipoptimize. By default, only the last MIP solution read from the .slx file will be stored. Use the a flag to store all MIP solutions read from the file.
2. When using the a flag, read solutions will be queued similarly to the user of the problem.addmipsol function. Each name string given by the NAME field in the .slx file will be associated with the corresponding solution. Any registered usersolnotify callback will be fired when the solution has been checked, and will include the read name string as one of its arguments.
3. Refer to the Appendix of the Xpress Optimizer reference manual on Log and File Formats for a description of the ASCII Solution (.slx) file format.
Related topics