Blog Post

FICO® Xpress Optimization Blog
7 MIN READ

Solver Tuning, Simplified: The New FICO® Xpress Solver VS Code Extension (BETA)

FICO's avatar
FICO
Community Manager
4 months ago
The Xpress Optimizer has included a powerful automatic tuner for a number of years: given a problem file, it systematically tests hundreds of solver runs with different configurations, compares them objectively, and surfaces the settings that perform best on your specific instance. The new FICO® Xpress Solver extension for VS Code, available as a beta release, enhances the usability of the tuner by bringing solver configuration, tuning, and results visualization into the editor in a unified interface.

We will use `m_10teams` from the MIPLIB benchmark library as our running example: a set partitioning MIP with 1,800 binary variables and 230 constraints, modelling an assignment problem for 10 teams. It is hard enough to take a few seconds to solve to optimality with default settings, making it ideal to quickly demonstrate tuning gains. Note that when tuning for production use, running the tuner on a representative set of instances rather than a single one is strongly recommended to avoid overfitting controls to one specific problem structure (see the Matrix/set file section below for how to configure a problem set).

Getting Started: Installing and Launching the Extension

To install, open the Extensions view in VS Code (Ctrl+Shift+X) and search for "FICO Xpress Solver", then click Install. Make sure Auto Update is enabled so you always receive the latest fixes and features. A valid installation of FICO Xpress Optimization Suite is required. You can also install directly from the VS Code Marketplace page.

Once installed, the extension integrates into VS Code in several ways:
  • A button appears in the status bar at the bottom of the window, always accessible regardless of what file is open.
  • A play button appears in the editor title bar whenever an .mps or .lp file is active in VS Code, giving a one-click shortcut to open the dialog with the matrix file already filled in.
  • The command FICO Xpress: Open Solver/Tuner Dialog is available in the command palette (Ctrl+Shift+P).
Opening the dialog with m_10teams.mps active in the editor, the matrix file field is pre-populated automatically.

The Solver Panel: Configuring and Running a Solve

The Solver tab is where you configure settings for a direct solve. Any controls and time limit set here are fixed and will not be modified by the tuner; they also carry over when switching to Tune mode, allowing you to pin controls you do not want the tuner to vary.

Matrix file: Path to the problem file (.mps or .lp), pre-filled from the active editor file or browsable via a file picker.

Time limit: An optional wall-clock time limit in seconds. Leave blank for an unlimited solve. In Tune mode, this limit applies per individual solver run within the tuning session.

Extra controls: A table where you can add any Xpress solver control by name and value. Each row becomes a command passed to the optimizer before solving. For example, adding HEUREMPHASIS=1 to focus on generating heuristic solutions more intensively, or CUTSTRATEGY=3 to increase root cutting intensity. Control names are not case-sensitive.

Click Solve and the optimizer runs in a VS Code terminal. The output is the standard Xpress console log, including statistics about the branch-and-bound search progress, cuts, heuristics, and the final objective and gap.

The Tuner Panel: Automated Parameter Search

The Tuner tab is where the tuner run is configured. A single tuning session typically evaluates 100-200 configurations. The results are saved to an .xtr file, which the extension opens automatically in an interactive table when the run completes.

Basic Settings

Matrix/set file: Path to the problem file (.mps or .lp) or a problem set file (.set). Only .mps and .lp formats are supported for the individual problem files. A .set file is a plain text file listing one problem path per line, allowing the tuner to find controls that generalize across a family of related problems rather than overfitting to one instance. A typical workspace layout looks like this:

Where tuning.set contains:

Paths in the .set file are resolved relative to the file's location. The subdirectory name (here instances/) is user-defined and not fixed. All problems in the set must be of the same type (e.g., all LP or all MIP problems); the tuner will warn and stop if mixed types are detected.

Time limit: This is the same field as in the Solver tab; both tabs show and edit the same value, so changing it in either tab updates both simultaneously. It applies per individual solver run within the tuning session. Total session time scales with the number of configurations and permutations tested. A good starting point is 2-5x the default solve time of your problem. To cap the entire session regardless of how many runs remain, add `tunermaxtime` via the extra controls table in the Solver tab: set the name to TUNERMAXTIME and the value to the desired number of seconds.

Tuner threads: Number of parallel tuning threads (default: 1, sequential). Each thread evaluates a different parameter combination simultaneously, reducing elapsed session time. Note that individual runs may slow down due to resource sharing, so the speedup is not perfectly linear. As a guideline, keep the product of tuner threads and solver threads at or below the number of logical CPU cores.

Tuner permutations: For each configuration tested, the tuner solves not just the original problem but also N randomly permuted versions of it, then aggregates the results. This guards against performance variability: MIP solving is sensitive to row/column ordering, so a configuration that looks fast on one ordering may not be reliably faster in general. More permutations produce more stable rankings at the cost of proportionally more solve calls. The tuner method sets its own default (for example, MIP default uses 10 permutations). Setting a value here overrides that default; set to 0 to run each configuration only once and significantly reduce total tuning time.

Tuner output: Toggles whether the tuner writes detailed log files alongside the .xtr results file. Set to 1 (the default) to keep full logs for later inspection.

Tuner method file: Optional path to a custom .xtm method file. Advanced users can export, edit, and re-import tuner strategy definitions to focus the search on specific controls or value ranges.

Choosing a Tuner Method

The Tuner method dropdown is the most important setting to understand. It determines which solver controls the tuner will vary and which combinations it will test. Choosing the right method for your problem type ensures the tuner spends its time on parameters that are actually relevant.

The dropdown covers methods for LP, MIP, SLP, and global problems, with MIP variants targeting different bottlenecks such as root cutting, tree search, or primal heuristics. For a full description of each method and guidance on when to use it, see the Xpress Tuner documentation.

The Workflow in Practice

With the dialog configured for m_10teams.mps and 5 - MIP simple as the method, clicking Tune starts the session. The optimizer runs in a VS Code terminal, where you can watch the log live as the tuner progresses through its parameter sweep, seeing each configuration's solve time and final gap as it completes.

Once finished, the extension automatically locates the .xtr file in the tuneroutput/ directory and opens the results table, showing every configuration tested alongside its key metrics.

If you later open a .xtr file from the tuneroutput/ folder directly in the editor, a graph icon appears in the editor title bar to reopen the results viewer at any time. The command FICO Xpress: Tuner: Visualize Active .xtr in the command palette (Ctrl+Shift+P) does the same when a .xtr file is active.

To make the results concrete: m_10teams.mps solves in 3.4s with default settings. After 20 configurations and 162 seconds of total tuning time, the best setting found was CUTSTRATEGY=3, delivering a 4x improvement in solve time.

The table shows, for every configuration: the solver controls applied, whether the solver reached optimality, solve time, objective value, bound, MIP gap, number of solutions found, and B&B nodes explored. The best-performing configurations rise to the top. Click any row to expand the full details panel, or use the Controls button to get the winning parameters formatted as ready-to-copy code in Python, Mosel, or Solver console format.

Applying the tuned controls in Python is then a matter of adding a few lines:
And in Mosel, using the optimizer console commands to load and solve the matrix file:

Installation Guidelines

Using the solve and tune features requires a valid installation of FICO Xpress Optimization Suite with a license that covers the optimizer. If you are a new user, check out the FICO Xpress Community License to get started for free.
  1. Install FICO Xpress Optimization Suite and ensure the XPRESSDIR environment variable is set to your installation directory; the installer sets this automatically on Windows.
  2. Open the Extensions view in VS Code (Ctrl+Shift+X), search for "FICO Xpress Solver", and click Install. Make sure Auto Update is enabled.
  3. Open an .mps or .lp file in VS Code and launch the dialog from the status bar or command palette.
If the extension cannot locate Xpress after installation, it will guide you through the setup steps.

Conclusion

The FICO® Xpress Solver extension brings solver configuration and automatic tuning into the VS Code environment. A single dialog for both solve and tune modes, an interactive results table for comparing configurations, and a one-click copy-to-code feature make the entire workflow faster and more accessible. Solver configuration, tuning, and results inspection are available within a single interface, portable across all platforms where Xpress and VS Code are supported.

Try it yourself: install the extension from the VS Code Marketplace and run the tuner on one of the example matrix files from your Xpress installation (see examples/solver/optimizer/data). As this is a beta release, your feedback is invaluable; share your thoughts, report issues, or suggest features in the comments below.

Subscribe to the FICO Xpress Optimization Blog for more content on optimization, solver techniques, and the latest Xpress features.
Updated 4 months ago
Version 3.0
No CommentsBe the first to comment