The instructions of 28.4 in the reference manual
OngoingDear All,
I'm trying to follow the instructions on p 918, Section 28.4 in the reference manual (PDF)
I have created this "gurobi.env" file with the text "Record 1":
But I cannot find any "*.rec"-files appearing there. Some other files with the name recording in them though ...
Are these the ones that I am supposed to "replay" using "gurobi_cl"?
That can be done accordingly:
However, no "gurobi.rew" file appears:
What is it that I have done wrong or misunderstood?
Thank you in advance
Best Regards,
Lars
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Thanks for bringing this up. Step 1 is not correct. A recording file has a \( \texttt{.grbr} \) extension, not \( \texttt{.rec} \). Additionally, like you noticed, recording files don't necessarily write \( \texttt{.rew} \) model files or \( \texttt{.prm} \) parameter files. We will work on updating this section of the reference manual.
Step 1 should instead say something like the following. As of Gurobi 9, this approach creates an \( \texttt{.mps} \) file instead of an \( \texttt{.rew} \) file. Thus, in step 2, you should instead read the newly created \( \texttt{gurobi.mps} \) file.
1. Isolate the model for testing by exporting a model file and a parameter file. The easiest way to do this is to create a \( \texttt{gurobi.env} \) file in your working directory that contains the following line:
GURO_PAR_DUMP 1
Then, run your Gurobi program, which will produce \( \texttt{gurobi.mps} \) and \( \texttt{gurobi.prm} \) files. Afterwards, you should delete the \( \texttt{gurobi.env} \) file so that other tests do not overwrite these files.
1 -
Thanks Eli
I did now change the ".env" file according to your suggestion.
But then we have another problem:
GUROBI_PAR_DUMP not supported with Gurobi Instant Cloud
/Lars Abrahamsson
0 -
But if I instead keep "Record 1" in the "gurobi.env" file, I get:
and then
But I cannot see any "mps" or "prm" file created in the folder ...
/Lars
0 -
Recording files shouldn't be mentioned in this part of the documentation, since they won't automatically generate the model and parameter files.
Since you're using Gurobi Cloud, can you try using the gurobi_write() function of the MATLAB API to write the \( \texttt{.mps} \) file? This isn't directly available to you if you're using MATLAB's problem-based framework. In that case, you can simply edit the \( \texttt{linprog.m} \) or \( \texttt{intlinprog.m} \) file provided by Gurobi to include a call to \( \texttt{gurobi_write()} \) directly before the model is solved. E.g.:
gurobi_write(model, 'model.mps'); % added by you
result = gurobi(model, params); % already in fileIn this case, the \( \texttt{.prm} \) file isn't important; the recording shows what parameters you're currently using (and none of them would affect the numerical properties of the model anyways).
1 -
- So .. now the "mps" file is created!
- What is next?
- gurobi_cl model.mps?
0 -
I see we created a ticket in our online support portal for this issue. I will respond to you there.
0
Post is closed for comments.
Comments
7 comments