Initializing help system before first use

Introduction

Topics covered in this chapter:

The FICO Xpress Optimization Suite is a powerful mathematical optimization framework well-suited to a broad range of optimization problems. The core solver of this suite is the FICO Xpress Optimizer, which combines ease of use with speed and flexibility. It can be interfaced via the command line Console Optimizer, via the graphical interface application IVE and through a callable library that is accessible from all the major programming platforms. It combines flexible data access functionality and optimization algorithms, using state-of-the-art methods, which enable the user to handle the increasingly complex problems arising in industry and academia.

The Console Optimizer provides a suite of 'Console Mode' Optimizer functionality. Using the Console Optimizer the user can load problems from widely used problem file formats such as the MPS and LP formats and solve them using any of the algorithms supported by the Optimizer. The results may then be processed and viewed in a variety of ways. The Console Mode provides full access to the Optimizer control variables allowing the user to customize the optimization algorithms to tune the solving performance on the most demanding problems.

The FICO Xpress Optimizer library provides full, high performance access to the internal data structures of the Optimizer and full flexibility to manipulate the problem and customize the optimization process. For example, the Cut Manager framework allows the user to exploit their detailed knowledge of the problem to generate specialized cutting planes during branch and bound that may improve solving performance of Mixed Integer Programs (MIPs).

Of most interest to the library users will be the embedding of the Optimizer functionality within their own applications. The available programming interfaces of the library include interfaces for C/C++, .NET and Java. Note that the interface specifications in the following documentation are given exclusively in terms of the C/C++ language. Short examples of the interface usage using other languages may be found in the FICO Xpress Getting Started manual.

The FICO Xpress Optimizer

The FICO Xpress Optimizer is a mathematical programming framework designed to provide high performance solving capabilities. Problems can be loaded into the Optimizer via matrix files such as MPS and LP files and/or constructed in memory and loaded using a variety of approaches via the library interface routines. Note that in most cases it is more convenient for the user to construct their problems using FICO Xpress Mosel or FICO Xpress BCL and then solve the problem using the interfaces provided by these packages to the Optimizer.

The solving algorithms provided with the Optimizer include the primal simplex, the dual simplex, the hybrid gradient and the Newton barrier algorithms. For solving Mixed Integer Programs (MIPs) the Optimizer provides a powerful branch and bound framework. The various types of problems the Optimizer can solve are outlined in Chapter Problem Types.

Solution information can be exported to file using a variety of ASCII and binary formats or accessed via memory using the library interface. Advanced solution information, such as solution bases, can be both exported and imported either via files or via memory, using the library interface. Note that bases can be useful for so called 'warm-starting' the solving of Linear Programming (LP) problems.

Starting the First Time

We recommend that new FICO Xpress Optimizer users first try running the Console Optimizer 'optimizer' executable from the command prompt before using the other interfaces of Optimizer. This is because (i) it is the easiest way to confirm the license status of the installation and (ii) it is an introduction to a powerful tool with many uses during the development cycle of optimization applications. For this reason we focus mainly on discussing the Console Optimizer in this section as an introduction to various basic functions of the Optimizer.

Licensing

To run the Optimizer from any interface it is necessary to have a valid licence file, xpauth.xpr. The FICO Xpress licensing system is highly flexible and is easily configurable to cater for the user's requirements. The system can allow the Optimizer to be run on a specific machine, on a machine with a specific ethernet address or on a machine connected to an authorized hardware dongle.

If the Optimizer fails to verify a valid license then a message can be obtained that describes the reasons for the failure and the Optimizer will be unusable. When using the Console Optimizer the licensing failure message will be displayed on the console. Library users can call the function XPRSgetlicerrmsg to get the licensing failure message.

On Windows operating systems the Optimizer searches for the license file in the directory containing the Xpress libraries, which are installed by default into the C:\xpressmp\bin folder. To avoid unnecessary licensing problems, it is recommended that the XPAUTH_PATH environment variable is not set on Windows.

On Unix systems it is necessary to set the XPAUTH_PATH environment variable to the full path to the license file. For ease of support it is recommended that the license file is placed in the bin directory within your Xpress installation and the XPAUTH_PATH environment variable is set accordingly, e.g., /opt/xpressmp/bin/xpauth.xpr.

Starting the Console Optimizer

The Console Optimizer is an interactive command line interface to the Optimizer. The Console Optimizer is started from the command line using the following syntax:

C:\> optimizer [problem_name] [@filename]

From the command line an initial problem name can be optionally specified together with an optional second argument specifying a text "script" file from which the console input will be read as if it had been typed interactively.

Note that the syntax example above shows the command as if it were input from the Windows Command Prompt (i.e., it is prefixed with the command prompt string C:\>). For Windows users, the Console Optimizer can also be started by typing optimizer into the "Run ..." dialog box in the Start menu.

The Console Optimizer provides a quick and convenient interface for operating on a single problem loaded into the Optimizer. Compare this with the more powerful library interface that allows one or more problems to co-exist in a process. The Console Optimizer problem contains the problem data as well as (i) control variables for handling and solving the problem and (ii) attributes of the problem and its solution information.

Useful features of the Console Optimizer include a help system, auto-completion of command names and integration of system commands.

Typing "help" will list the various options for getting help. Typing "help commands" will list available commands. Typing "help attributes" and "help controls" will list the available attributes and controls, respectively. Typing "help" followed by a command name or control/attribute name will list the help for this item. For example, typing "help lpoptimize" will get help for the LPOPTIMIZE command.

The Console Optimizer auto-completion feature is a useful way of reducing key strokes when issuing commands. To use the auto-completion feature, type the first part of an optimizer command name followed by the Tab key. For example, by typing "lpopt" followed by the Tab key, the Console Optimizer will complete to the LPOPTIMIZE command. Note that once you have finished inputting the command name portion of your command line, the Console Optimizer can also auto-complete on file names. For example, if you have a matrix file named hpw15.mps in the current working directory then by typing "readprob hpw" followed by the Tab key the command should auto-complete to the string "readprob hpw15.mps". Note that the auto-completion of file names is case-sensitive.

The Console Optimizer also features integration with the operating system's shell commands. For example, by typing "dir" (or "ls" under Unix) you will directly run the operating system's directory listing command. Using the "cd" command will change the working directory, which will be indicated in the prompt string:

[xpress bin] cd \
[xpress C:\]

Finally, note that when the Console Optimizer is first started it will attempt to read in an initialization file named optimizer.ini from the current working directory. This is an ASCII file that may contain any lines that can normally be entered at the console prompt, such as commands or control parameter settings. The lines of the optimizer.ini file are run with at start up, and can be useful for setting up a customized default Console Optimizer environment for the user (e.g., defining custom controls settings on the Console Optimizer problem).

Scripting with the Console Optimizer

The Console Optimizer interactive command line hosts a TCL script parser (http://www.tcl.tk). With TCL scripting the user can program flow control into their Console Optimizer scripts. Also TCL scripting provides the user with programmatic access to a powerful suite of functionality in the TCL library. With scripting support the Console Optimizer provides a high level of control and flexibility well beyond that which can be achieved by combining operating system batch files with simple piped script files. Indeed, with scripting support, the Console Optimizer is ideal for (i) early application development, (ii) tuning of model formulations and solving performance and (iii) analyzing difficulties and bugs in models.

Note that the TCL parser has been customized and simplified to handle intuitive access to the controls and attributes of the Optimizer. The following example shows how to proceed with write and read access to the MIPLOG Optimizer control:

[xpress C:\] miplog=3
[xpress C:\] miplog
3

The following shows how this would usually be achieved using TCL syntax:

[xpress C:\] set miplog 3
3
[xpress C:\] $miplog
3

The following set of examples demonstrate how with some simple TCL commands and some basic flow control constructs the user can quickly and easily create powerful programs.

The first example demonstrates a loop through a list of matrix files where a simple regular expression on the matrix file name and a simple condition on the number of rows in the problem decide whether or not the problem is solved using lpoptimize. Note the use of:

  • the creation of a list of file names using the TCL glob command
  • the use of the TCL square bracket notation ([]) for evaluating commands to their string result value
  • the TCL foreach loop construct iterating over the list of file names
  • dereferencing the string value of a variable using '$'
  • the use of the TCL regexp regular expression command
  • the two TCL if statements and their condition statements
  • the use of the two Optimizer commands READPROB and MINIM
  • the TCL continue command used to skip to the next loop iteration
set filelist [glob *.mps]
foreach filename $filelist {
  if { [regexp -all {large_problem} $filename] } continue
  readprob $filename
  if { $rows > 200 } continue
  lpoptimize
}

The second example demonstrates a loop though some control settings and the tracking of the control setting that gave the best performance. Note the use of:

  • the TCL for loop construct iterating over the values of variable i from -1 to 3
  • console output formatting with the TCL puts command
  • setting the values of Optimizer controls CUTSTRATEGY and MAXNODE
  • multiple commands per line separated using a semicolon
  • use of the MIPSTATUS problem attribute in the TCL if statement
  • comment lines using the hash character '#'
set bestnodes 10000000
set p hpw15
for { set i -1 } { $i <= 3 } { incr i } {
  puts "Solving with cutstrategy : $i"
  cutstrategy=$i; maxnode=$bestnodes
  readprob $p
  mipoptimize
  if { $mipstatus == 6 } {
    # Problem was solved within $bestnodes
    set bestnodes $nodes; set beststrat $i
  }
}
puts "Best cutstrategy : $beststrat : $bestnodes"

Interrupting Console Optimizer

Console Optimizer users may interrupt the running of the commands (e.g., lpoptimize) by typing Ctrl-C. Once interrupted, the Console Optimizer will return to its command prompt. If an optimization algorithm has been interrupted in this way, any solution process will stop at the first 'safe' place before returning to the prompt. Optimization iterations may be resumed by re-entering the interrupted command. Note that by using this interrupt-resume functionality the user has a convenient way of dynamically changing controls during an optimization run.

Lastly, note that "typing ahead" while the console is writing output to screen can cause Ctrl-C input to fail on some operating systems.

Manual Layout

So far the manual has given a basic introduction to the FICO Xpress Optimization Suite. The reader should be able to start the Console Optimizer command line tool and have the license verified correctly. They should also be able to enter some common commands used in the Console Optimizer (e.g., READPROB and LPOPTIMIZE) and get help on command usage using the Console Optimizer help functionality.

The remainder of this manual is divided into two parts. These are the first chapters up to but not including Chapter Console and Library Functions and the remaining chapters from Chapter Console and Library Functions.

The first part of the manual, beginning with Chapter Basic Usage, provides a brief overview of common Optimizer usage, introducing the various routines available and setting them in the typical context they are used. This is followed in Chapter Problem Types by a brief overview of the types of problems that the FICO Xpress Optimizer can be used to solve. Chapter Solution Methods provides a description of the solution methods and some of the more frequently used parameters for controlling these methods along with some ideas of how they may be used to enhance the solution process. Finally, Chapter Advanced Usage details some more advanced topics in Optimizer usage.

The second half of the manual is the main reference section. Chapter Console and Library Functions details all functions in both the Console and Advanced Modes alphabetically. Chapters Control Parameters and Problem Attributes then provide a reference for the various controls and attributes, followed by a list of Optimizer error and return codes in Chapter Return Codes and Error Messages. A description of several of the file formats is provided in Appendix Log and File Formats.


© 2001-2025 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.