Try our new documentation site (beta).

gurobi_read()

gurobi_read ( filename )
gurobi_read ( filename, env )

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.

env: The env struct, when provided, allows you to use Gurobi Compute Server or Gurobi Instant Cloud. See the env argument section for more information.

Return value:

A model struct variable, as described in the model section.

Example usage:
model = gurobi_read('stein9.mps');
result = gurobi(model);

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization