Initializing help system before first use

Console and Library Functions

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
CHECKCONVEXITY
Convexity checker.
EXIT
Terminate the Console Optimizer.
HELP
Quick reference help for the Optimizer console.
IIS
Console IIS command.
PRINTRANGE
Writes the ranging information to screen.
PRINTSOL
Write the current solution to screen.
QUIT
Terminate the Console Optimizer.
STOP
Terminate the Console Optimizer.
TUNE
Console Tuner command.
SETARCHCONSISTENCY
Sets whether to force the same execution path on various CPU architecture extensions, in particular (pre-)AVX and AVX2.
ALTER
Alters or changes matrix elements, right hand sides and constraint senses in the current problem.
BASISCONDITION
This function is deprecated, and will be removed in future releases. Please use the XPRSbasisstability function instead. Calculates the condition number of the current basis after solving the LP relaxation.
BASISSTABILITY
Calculates various measures for the stability of the current basis, including the basis condition number.
CHGOBJSENSE
Changes the problem's objective function sense to minimize or maximize.
DUMPCONTROLS
Displays the list of controls and their current value for those controls that have been set to a non default value.
FIXGLOBALS
Fixes all the global entities to the values of the last found MIP solution. This is useful for finding the reduced costs for the continuous variables after the global variables have been fixed to their optimal values.
GLOBAL
Starts the global search for an integer solution after solving the LP relaxation with XPRSmaxim (MAXIM) or XPRSminim (MINIM) or continues a global search if it has been interrupted. This function is deprecated and might be removed in a future release. XPRSmipoptimize should be used instead.
GOAL
This function is deprecated, and will be removed in future releases. Perform goal programming.
LPOPTIMIZE
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 global entities in the problem will be ignored.
MAXIM, MINIM
Begins a search for the optimal LP solution. These functions are deprecated and might be removed in a future release. XPRSlpoptimize or XPRSmipoptimize should be used instead.
MIPOPTIMIZE
This function begins a global 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.
POSTSOLVE
Postsolve the current matrix when it is in a presolved state.
RANGE
Calculates the ranging information for a problem and saves it to the binary ranging file problem_name.rng.
READBASIS
Instructs the Optimizer to read in a previously saved basis from a file.
READBINSOL
Reads a solution from a binary solution file.
READDIRS
Reads a directives file to help direct the global search.
READPROB
Reads an (X)MPS or LP format matrix from file.
READSLXSOL
Reads an ASCII solution file .slx created by the XPRSwriteslxsol function.
REFINEMIPSOL
Executes the MIP solution refiner.
REPAIRINFEAS
An extended version of XPRSrepairweightedinfeas that allows for bounding the level of relaxation allowed.
RESTORE
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.
SAVE
Saves the current data structures, i.e. matrices, control settings and problem attribute settings to file and terminates the run so that optimization can be resumed later.
SCALE
Re-scales the current matrix.
SETDEFAULTCONTROL
Sets a single control to its default value.
SETDEFAULTS
Sets all controls to their default values. Must be called before the problem is read or loaded by XPRSreadprob, XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp.
SETLOGFILE
This directs all Optimizer output to a log file.
SETPROBNAME
Sets the current default problem name. This command is rarely used.
WRITEBASIS
Writes the current basis to a file for later input into the Optimizer.
WRITEBINSOL
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer.
WRITEDIRS
Writes the global search directives from the current problem to a directives file.
WRITEPROB
Writes the current problem to an MPS or LP file.
WRITEPRTRANGE
Writes the ranging information to a fixed format ASCII file, problem_name.rrt. The binary range file (.rng) must already exist, created by XPRSrange (RANGE).
WRITEPRTSOL
Writes the current solution to a fixed format ASCII file, problem_name .prt.
WRITERANGE
Writes the ranging information to a CSV format ASCII file, problem_name.rsc (and .hdr). The binary range file (.rng) must already exist, created by XPRSrange (RANGE) and an associated header file.
WRITESLXSOL
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.
WRITESOL
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. For library users, however, a return code of 32 indicates that additional error information may be obtained, specific to the function which caused the error. Such is available by calling

XPRSgetintattrib(prob,XPRS_ERRORCODE,&errorcode);

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.