File Formats

Functions to help read and write MOI models to/from various file formats. See The FileFormats submodule for more details.

    format::FileFormat = FORMAT_AUTOMATIC,
    filename::Union{Nothing, String} = nothing,

Return model corresponding to the FileFormat format, or, if format == FORMAT_AUTOMATIC, guess the format from filename.

The filename argument is only needed if format == FORMAT_AUTOMATIC.

kwargs are passed to the underlying model constructor.


List of accepted export formats.

  • FORMAT_AUTOMATIC: try to detect the file format based on the file name
  • FORMAT_CBF: the Conic Benchmark format
  • FORMAT_LP: the LP file format
  • FORMAT_MOF: the MathOptFormat file format
  • FORMAT_MPS: the MPS file format
  • FORMAT_NL: the AMPL .nl file format
  • FORMAT_SDPA: the SemiDefinite Programming Algorithm format