16 Supported File Formats

MOSEK supports a range of problem and solution formats listed in Table 16.1 and Table 16.2.

The most important are:

  • the Task format, MOSEK‘s native binary format which supports all features that MOSEK supports. It is the closest possible representation of the internal data in a task and it is ideal for submitting problem data support questions.

  • the PTF format, MOSEK‘s human-readable format that supports all linear, conic and mixed-integer features. It is ideal for debugging. It is not an exact copy of all the data in the task, but it contains all information required to reconstruct it, presented in a readable fashion.

  • MPS, LP, CBF formats are industry standards, each supporting some limited set of features, and potentially requiring some degree of reformulation during read/write.

Problem formats

Table 16.1 List of supported file formats for optimization problems.

Format Type

Ext.

Binary/Text

LP

QCQO

ACC

SDP

DJC

Sol

Param

LP

lp

plain text

X

X

MPS

mps

plain text

X

X

PTF

ptf

plain text

X

X

X

X

X

X

CBF

cbf

plain text

X

X

X

Task format

task

binary

X

X

X

X

X

X

X

Jtask format

jtask

text/JSON

X

X

X

X

X

X

X

OPF (deprecated for conic problems)

opf

plain text

X

X

X

X

The columns of the table indicate if the specified file format supports:

  • LP - linear problems, possibly with integer variables,

  • QCQO - quadratic objective or constraints,

  • ACC - affine conic constraints,

  • SDP - semidefinite cone/variables,

  • DJC - disjunctive constraints,

  • Sol - solutions,

  • Param - optimizer parameters.

Solution formats

Table 16.2 List of supported solution formats.

Format Type

Ext.

Binary/Text

Description

SOL

sol

plain text

Interior Solution

bas

plain text

Basic Solution

int

plain text

Integer

Jsol format

jsol

text/JSON

All solutions


Compression

MOSEK supports GZIP and Zstandard compression. Problem files with extension .gz (for GZIP) and .zst (for Zstandard) are assumed to be compressed when read, and are automatically compressed when written. For example, a file called

problem.mps.zst

will be considered as a Zstandard compressed MPS file.