Filter Content By
Version
Languages

Reads a model from a file.

Arguments:

filename: Name of the file to read. Note that the type of the file is encoded in the file name suffix. The filename suffix should be one of .mps, .rew, .lp, .rlp, .ilp, or .opb (see the file formats section for details on Gurobi file formats). The files can be compressed, so additional suffixes of .gz, .bz2, .zip, or .7z are accepted. The file name may contain * or ? wildcards. No file is read when no wildcard match is found. If more than one match is found, this routine will attempt to read the first matching file.

Return value:

A model struct containing multiple named fields. See the gurobi function for a description of these fields and their contents.

Example usage:

model = gurobi_read('etamacro.mps');
result = gurobi(model)