MATH 441 Gurobi/Maple Files and Links, Fall 2017

This page concerns some examples that we will use for MATH 441, Fall 2017; we will mostly use Gurobi. The lab LSK 310 has Maple, which you can use.

In class I will call the Gurobi Optimizer from the command line (i.e., a terminal window), so I will use the command line commands (e.g., gurobi_cl).

Installation I recommend that you use the Gurobi Optimizer for projects and homework; it is ranks among the best commercial products (such as CPLEX, Mosek), and Gurobi offers convenient, free academic versions. Visit Gurobi's Academic Center to get a license for University Users.
Some Documentation Links This page gives examples of calling gurobi_cl, the command to run Gurobi from the command line.
This page gives an example of command line commands on a Mac to solve a simple ILP regarding coin production, including viewing results with a ResultFile= type parameter.
This page gives an example of running the Gurobi shell (Windows/Linux/Mac), which is a more powerful environment for running Gurobi that just the command line.
Here is link to the Gurobi optimizer reference manual. This will lead to various pages, including
  • A page describing .lp file format.
  • A page describing the parameters you can give to the Gurobi Optimizer, such as ResultFile=.
  • Simple Gurobi After installing gurobi, you can issue the following commands from a terminal:
  • gurobi_cl mylpfile.lp   Runs runs gurobi your integer/linear program file mylpfile.lp and prints out the optimal value (but doesn't tell you the values of the variables in the optimal solution it found)
  • gurobi_cl ResultFile=mylpfile.sol mylpfile.lp   Runs runs gurobi your integer/linear program file mylpfile.lp and prints out the optimal value, writing the values of the variables to the file mylpfile.sol (it will erase any previous content in this file, so beware...)
  • Sample Files I will put the sample files that we use in class here.
    Here is a simple text file that you can read into Maple to illustrate our first example (lattes and espresso macchiattos).
    Here is a gurobi *.lp file that you can input to gurobi (it has a *.txt extension in case your browser has some other default action on *.lp files)
    First Class Example of Branch and Bound This directory has a bunch of files related to our first investigation of "branch and bound". "Branch and bound" is a very general paradigm; roughly speaking, it is an alternative to investigating every feasible possibility when you are making a decision among a large number of choices.

    UBC Math Home| Joel Friedman Home| Course Materials