Concepts
Features
Reference
Reads a model from a file.
filename – Name of the file to read. Note that the type of the file isencoded in the file name suffix. The filename suffix should be oneof.mps,.rew,.lp,.rlp,.dua,.dlp,.ilp, or.opb (see thefile formatssection for details on Gurobi file formats). The files can becompressed, so additional suffixes of.zip,.gz,.bz2,.7z or.xz areaccepted.
params – The paramsstruct, when provided, contains a list of modified Gurobiparameters. See theparams argument section formore information.
Amodel struct variable, as described in themodel section.
model=gurobi_read('stein9.mps');result=gurobi(model);
Writes a model to a file.
model – The modelstruct must contain a valid Gurobi model. See themodel argument section for more information.
filename – Name of the file to write. Note that the type of the file isencoded in the file name suffix. The filename suffix should be oneof.mps,.rew,.lp,.rlp,.dua,.dlp,.ilp, or.opb to indicate the desired file format (see thefile formats section for details onGurobi file formats). The files can be compressed, so additionalsuffixes of.zip,.gz,.bz2,.7z or.xz are accepted. Note that thisfunction does not write the result of the IIS computation into an.ilp file format. See sectiongurobi_iis for moredetails.
params – The paramsstruct, when provided, contains a list of modified Gurobiparameters. See theparams argument section formore information.
model.A=sparse([123;110]);model.obj=[112];model.modelsense='max';model.rhs=[4;1];model.sense='<>';gurobi_write(model,'mymodel.mps');gurobi_write(model,'mymodel.lp');gurobi_write(model,'mymodel.mps.bz2');
Help and Feedback