Skip to main content

The instructions of 28.4 in the reference manual

Ongoing

Comments

6 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    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
  • Lars Abrahamsson
    Gurobi-versary
    First Question
    Conversationalist

    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
  • Lars Abrahamsson
    Gurobi-versary
    First Question
    Conversationalist

    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
  • Eli Towle
    Gurobi Staff Gurobi Staff

    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 file

    In 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
  • Lars Abrahamsson
    Gurobi-versary
    First Question
    Conversationalist
    • So .. now the "mps" file is created!
    • What is next?
    • gurobi_cl model.mps?

     

    0
  • Eli Towle
    Gurobi Staff Gurobi Staff

    I see we created a ticket in our online support portal for this issue. I will respond to you there.

    0

Please sign in to leave a comment.