Downloading a QPLIB Instance

Downloading a QPLIB Instance#

The OMMX repository provides quadratic programming benchmark instances from QPLIB in OMMX Artifact format.

Note

More details: The QPLIB instances in OMMX Artifact format are hosted in the GitHub Container Registry for the OMMX repository (link).

QPLIB is a library of quadratic programming instances. For more information about QPLIB, see the QPLIB website.

Please see this page for information on GitHub Container Registry.

You can easily download these instances with the OMMX SDK, then directly use them as inputs to OMMX Adapters. For example, to solve the QPLIB_3514 instance (reference) with PySCIPOpt, you can:

  1. Download the 3514 instance with dataset.qplib from the OMMX Python SDK.

  2. Solve with PySCIPOpt via the OMMX PySCIPOpt Adapter.

Here is a sample Python code:

# OMMX Python SDK
from ommx import dataset
# OMMX PySCIPOpt Adapter
from ommx_pyscipopt_adapter import OMMXPySCIPOptAdapter

# Step 1: Download the 3514 instance from QPLIB
instance = dataset.qplib("3514")

# Step 2: Solve with PySCIPOpt via the OMMX PySCIPOpt Adapter
solution = OMMXPySCIPOptAdapter.solve(instance)

This makes it easy to benchmark quadratic programming solvers using the same QPLIB instances.

Note about Annotations with the Instance#

The downloaded instance includes various annotations accessible via the annotations property:

import pandas as pd
# Display annotations in tabular form using pandas
pd.DataFrame.from_dict(instance.annotations, orient="index", columns=["Value"]).sort_index()
Value
org.ommx.qplib.conscurvature indefinite
org.ommx.qplib.convex False
org.ommx.qplib.density 0.0018696071160533081
org.ommx.qplib.laghessianavgblocksize 1.983607
org.ommx.qplib.laghessianmaxblocksize 61
org.ommx.qplib.laghessianminblocksize 1
org.ommx.qplib.nbinvars 15
org.ommx.qplib.nboundedvars 0
org.ommx.qplib.nconcavenlcons 0
org.ommx.qplib.ncons 1860
org.ommx.qplib.ncontvars 1800
org.ommx.qplib.nconvexnlcons 0
org.ommx.qplib.ndiagquadcons 0
org.ommx.qplib.nindefinitenlcons 900
org.ommx.qplib.nintvars 0
org.ommx.qplib.njacobiannlnz 2700
org.ommx.qplib.njacobiannz 5400
org.ommx.qplib.nlaghessianblocks 915
org.ommx.qplib.nlaghessiandiagnz 900
org.ommx.qplib.nlaghessiannz 2700
org.ommx.qplib.nldensity 0.001652892561983471
org.ommx.qplib.nlincons 960
org.ommx.qplib.nlinfunc 961
org.ommx.qplib.nlnz 2700
org.ommx.qplib.nnlbinvars 15
org.ommx.qplib.nnlfunc 900
org.ommx.qplib.nnlintvars 0
org.ommx.qplib.nnlsemi 0
org.ommx.qplib.nnlvars 1815
org.ommx.qplib.nobjnlnz 0
org.ommx.qplib.nobjnz 915
org.ommx.qplib.nobjquaddiagnz 0
org.ommx.qplib.nobjquadnegev 0
org.ommx.qplib.nobjquadnz 0
org.ommx.qplib.nobjquadposev 0
org.ommx.qplib.nquadcons 900
org.ommx.qplib.nquadfunc 900
org.ommx.qplib.nsemi 0
org.ommx.qplib.nsingleboundedvars 1800
org.ommx.qplib.nsos1 0
org.ommx.qplib.nsos2 0
org.ommx.qplib.nvars 1815
org.ommx.qplib.nz 6315
org.ommx.qplib.objcurvature linear
org.ommx.qplib.objquaddensity 0
org.ommx.qplib.objquadproblevfrac 0
org.ommx.qplib.objsense min
org.ommx.qplib.objtype linear
org.ommx.qplib.probtype LMQ
org.ommx.qplib.solinfeasibility 2.220446049e-16
org.ommx.qplib.solobjvalue 366.6218167
org.ommx.qplib.solsource Solution found by SCIP
org.ommx.qplib.url http://qplib.zib.de/QPLIB_3514.html
org.ommx.v1.instance.authors Stefan Vigerske
org.ommx.v1.instance.constraints 1920
org.ommx.v1.instance.created 2025-10-02T22:45:08.030992+09:00
org.ommx.v1.instance.dataset QPLIB
org.ommx.v1.instance.license CC-BY-4.0
org.ommx.v1.instance.title QPLIB_3514
org.ommx.v1.instance.variables 1815

These instances have both dataset-level annotations and dataset-specific annotations.

There are seven dataset-wide annotations with dedicated properties:

Annotation

Property

Description

org.ommx.v1.instance.authors

authors

The authors of the instance

org.ommx.v1.instance.constraints

num_constraints

The number of constraint conditions in the instance

org.ommx.v1.instance.created

created

The date of the instance was saved as an OMMX Artifact

org.ommx.v1.instance.dataset

dataset

The name of the dataset to which this instance belongs

org.ommx.v1.instance.license

license

The license of this dataset

org.ommx.v1.instance.title

title

The name of the instance

org.ommx.v1.instance.variables

num_variables

The total number of decision variables in the instance

QPLIB Annotations#

QPLIB instances include comprehensive annotations that describe the mathematical properties of quadratic programming problems. These annotations are based on the official QPLIB specification and are prefixed with org.ommx.qplib.*.

For detailed information about all available QPLIB annotations and their meanings, please refer to the official QPLIB documentation.

For example, you can check the problem type and objective curvature of the QPLIB instance:

# QPLIB-specific annotations
print(f"Problem type: {instance.annotations['org.ommx.qplib.probtype']}")
print(f"Objective type: {instance.annotations['org.ommx.qplib.objtype']}")
print(f"Objective curvature: {instance.annotations['org.ommx.qplib.objcurvature']}")
print(f"Number of variables: {instance.annotations['org.ommx.qplib.nvars']}")
print(f"Number of constraints: {instance.annotations['org.ommx.qplib.ncons']}")
Problem type: LMQ
Objective type: linear
Objective curvature: linear
Number of variables: 1815
Number of constraints: 1860