Try our new documentation site (beta).


To enable recording, you simply need to set the Record parameter to 1 as soon as you create your Gurobi environment. The easiest way to do this is with a gurobi.env file. This file should contain the following line:

Record 1
If you put this file in the same directory as your application, Gurobi will pick up the setting when your application makes its first Gurobi call. You can also set this parameter through the standard parameter modification routines in your program.

Once this parameter is set, you should see the following in your log:

*** Start recording in file recording000.grbr

If your application creates more than one Gurobi environment, you may see more than one of these messages. Each will write to a different file:

*** Start recording in file recording001.grbr

As your program runs, Gurobi will write the commands and data that are passed into Gurobi routines to these files. Recording continues until you free your Gurobi environment (or until your program ends). When you free the environment, if Gurobi logging is enabled you will see the following message:

*** Recording complete - close file recording000.grbr

At this point, you have a recording file that is ready for later replay.

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.