A Tutorial on Gurobi Interactive Shell

 

$ gurobi.sh

gurobi> m = read('input_file_name')
          /* Read the input file, e.g., in the .lp format */

gurobi> m.setParam(GRB.Param.Threads, 3)
          /* Set the number of threads to 3. This step is optional. */

gurobi> m.optimize()
          /* Run the optimization in order to solve the MILP problem */

gurobi> m.printAttr('X')
          /* Print the values of variables on the screen after running the optimization. */

gurobi> m.write("mysolution.sol")
          /* Write the values of variables to a file after running the optimization */

gurobi> quit()
          /* Quit Gurobi Interactive Shell */

 


last update: March 07, 2010