> I am looking a command how to read and write lp problem, MipSart file from
> Matlab. anyone can help me please?
Hi Sothea,
You can write an LP file from MATLAB by setting the parameter
ResultFile=myfilename.lp. You can load a MIP start into MATLAB by
specifying a vector for model.start. For example, suppose you solve a
MIP and want to use its solution to specify the start for another
model. Do:
results = gurobi(model1);
model2.start = results.x;
The start attribute is described in detail in the MATLAB documentation:
http://www.gurobi.com/documentation/5.1/reference-manual/node656#sec:MATLAB
See the section titled: "The optimization model." Or type help gurobi
from the MATLAB prompt.
You can also write out a MIP start file by specifying the parameter
ResultFile=mymipstart.mst.
You can read a MIP start file into MATLAB with pure MATLAB code by doing:
fid = fopen('mystart.mst', 'r');
C = textscan(fid, '%s %f', 'HeaderLines', 1);
varnames = C{1};
varvalues = C{2};
fclose(fid);
There is no mechanism for reading a .lp file into MATLAB. If you can
explain what you are trying to accomplish by reading in a .lp file
into MATLAB I might be able to propose a workaround.
Thanks,
Chris