The Gurobi command-line tool allows you to perform simple commands without the overhead or complexity of an interactive interface. While the most basic usage of the command-line tool is quite straightforward, the tool has a number of uses that are perhaps less obvious. This section talks about its full capabilities.
To use this tool, you'll need to type commands into a command-line
interface. Linux and Mac users can use a Terminal window.
Windows users will need to open a Command Prompt (also known
as a Console window or a
cmd window). To launch one,
hold down the Start and R keys simultaneously, and
cmd into the Run box that appears.
The command to solve a model using the command-line tool is:
gurobi_cl [parameter=value]* modelfileThe Gurobi log file is printed to the screen as the model solves, and the command terminates when the solve is complete. Parameters are chosen from among the Gurobi parameters. The final argument is the name of a file that contains an optimization model, stored in MPS or LP format. You can learn more about using the command-line tool to solve models in this section.
The command-line tool can also be used to replay recordings of API calls. The command for this usage is:
gurobi_cl recordingfileA recording file is a binary file generated by Gurobi with a
.grbrextension. You can learn more about using the command-line tool to replay recordings in this section.
The command-line tool can also be used to check on the status of a Gurobi token server. The command is:
gurobi_cl --tokensThis command will show you whether the token server is currently serving tokens, and which users and machines are currently using tokens.
You can also type:
gurobi_cl --helpto get help on the use of the tool, or:
gurobi_cl --versionto get version information, or:
gurobi_cl --licenseto get the location of the current Gurobi license file.