Console and Library Functions
Topics covered in this chapter:
A large number of routines are available for both Console and Library users of the FICO Xpress Optimizer, ranging from simple routines for the input and solution of problems from matrix files to sophisticated callback functions and greater control over the solution process. Of these, the core functionality is available to both sets of users and comprises the 'Console Mode'. Library users additionally have access to a set of more 'advanced' functions, which extend the functionality provided by the Console Mode, providing more control over their program's interaction with the Optimizer and catering for more complicated problem development.
Console Mode Functions
With both the Console and Advanced Mode functions described side-by-side in this chapter, library users can use this as a quick reference for the full capabilities of the Optimizer library. For users of Console Optimizer, only the following functions will be of relevance:
Command
|
Description
|
Convexity checker.
|
|
Terminate the Console Optimizer.
|
|
Quick reference help for the Optimizer console.
|
|
Console IIS command.
|
|
Write the current solution to screen.
|
|
Terminate the Console Optimizer.
|
|
Terminate the Console Optimizer.
|
|
Console Tuner command.
|
|
Sets whether to force the same execution path on various CPU architecture extensions, in particular (pre-)AVX and AVX2.
|
|
Alters or changes matrix elements, right hand sides and constraint senses in the current problem.
|
|
Calculates the condition number of the current basis after solving the LP relaxation.
|
|
Calculates various measures for the stability of the current basis, including the basis condition number.
|
|
Changes the problem's objective function sense to minimize or maximize.
|
|
Displays the list of controls and their current value for those controls that have been set to a non default value.
|
|
|
|
Fixes all the MIP entities to the values of the last found MIP solution. This is useful for finding the reduced costs for the continuous variables after the integer variables have been fixed to their optimal values.
|
|
This function begins a search for the optimal continuous (LP) solution. The direction of optimization is given by
OBJSENSE. The status of the problem when the function completes can be checked using
LPSTATUS. Any MIP entities in the problem will be ignored.
|
|
Begins a search for the optimal LP solution.
|
|
This function begins a tree search for the optimal MIP solution. The direction of optimization is given by
OBJSENSE. The status of the problem when the function completes can be checked using
MIPSTATUS.
|
|
This function begins a search for the optimal solution of the problem. The direction of optimization is given by
OBJSENSE.
|
|
Postsolve the current matrix when it is in a presolved state.
|
|
Instructs the Optimizer to read in a previously saved basis from a file.
|
|
Reads a solution from a binary solution file.
|
|
Reads a directives file to help direct the tree search.
|
|
Reads an (X)MPS or LP format matrix from file.
|
|
Reads an ASCII solution file .slx created by the
XPRSwriteslxsol function.
|
|
Executes the MIP solution refiner.
|
|
An extended version of
XPRSrepairweightedinfeas that allows for bounding the level of relaxation allowed.
|
|
Restores the Optimizer's data structures from a file created by
XPRSsave (
SAVE). Optimization may then recommence from the point at which the file was created.
|
|
Saves the current data structures to file and terminates the run
|
|
Re-scales the current matrix.
|
|
Sets a single control to its default value.
|
|
Sets all controls to their default values. Must be called before the problem is read or loaded by
XPRSreadprob,
XPRSloadmip,
XPRSloadlp,
XPRSloadmiqp,
XPRSloadqp.
|
|
This directs all Optimizer output to a log file.
|
|
Sets the current default problem name. This command is rarely used.
|
|
Writes the current basis to a file for later input into the Optimizer.
|
|
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer.
|
|
Writes the tree search directives from the current problem to a directives file.
|
|
Writes the current problem to an MPS or LP file.
|
|
Writes the current solution to a fixed format ASCII file, problem_name .prt.
|
|
Creates an ASCII solution file (.slx) using a similar format to MPS files. These files can be read back into the Optimizer using the
XPRSreadslxsol function.
|
|
Writes the current solution to a CSV format ASCII file, problem_name.asc (and .hdr).
|
For a list of functions by task, refer to Function Quick Reference.
Layout for Function Descriptions
All functions mentioned in this chapter are described under the following set of headings:
Function Name
The description of each routine starts on a new page. The library name for a function is on the left and the Console Optimizer command name, if one exists, is on the right.
Purpose
A short description of the routine and its purpose begins the information section.
Synopsis
A synopsis of the syntax for usage of the routine is provided. "Optional" arguments and flags may be specified as NULL if not required. Where this possibility exists, it will be described alongside the argument, or in the Further Information at the end of the routine's description. If the function is available in the Console, the library syntax is described first, followed by the Console Optimizer syntax.
Arguments
A list of arguments to the routine with a description of possible values for them follows.
Error Values
Optimizer return codes are described in Chapter Return Codes and Error Messages.
Likely error values returned by this for each function are listed in the Error Values section. A description of the error may be obtained using the XPRSgetlasterror function. If no attention need be drawn to particular error values, this section will be omitted.
Associated Controls
Controls which affect a given routine are listed next, separated into lists by type. The control name given here should have XPRS_ prefixed by library users, in a similar way to the XPRSgetintattrib example in the Error Values section above. Console Xpress users should use the controls without this prefix, as described in FICO Xpress Getting Started manual. These controls must be set before the routine is called if they are to have any effect.
Examples
One or two examples are provided which explain certain aspects of the routine's use.
Further Information
Additional information not contained elsewhere in the routine's description is provided at the end.
Related Topics
Finally a list of related routines and topics is provided for comparison and reference.
© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.