Skip to content

onechronos/guroobi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guroobi

guroobi is an OCaml wrapper to the commercial Gurobi optimization library, specifically of its C API. guroobi was developed and tested with Gurobi version 10.

Installation

To build guroobi, first download and install Gurobi; this will require a license, as Gurobi is commercial software. Then, clone the guroobi repository:

git clone https://github.com/onechronos/guroobi.git 
cd guroobi

Next, set two environment variables necessary to build guroobi and run unit tests:

export GUROBI_ROOT=/path/to/gurobi 
export LD_LIBRARY_PATH=$GUROBI_ROOT/lib

Here, /path/to/gurobi must be replaced with the path of the directory where Gurobi architecture-specific files live. Finally, build and install:

opam pin add .

or

dune build
dune install

Examples

guroobi's unit tests offer some examples of guroobi in action. They consist of OCaml translations of some of Gurobi's C examples.

Related

Other OCaml wrappers to Gurobi exist: ocaml-gurobi, ocaml-lp. Unlike these, guroobi is not based on ocaml-ctypes. In the author's opinion, the verbosity emanating from this design decision is worth the extra flexibility.

Testing

Testing for Guroobi is done via the Gurobi C Examples. Tests can be run by

dune runtest

The following tests are replicated:

  • batchmode
  • bilinear
  • callback
  • dense
  • diet
  • facility
  • feasopt
  • fixanddive
  • gc_funcnonlinear
  • gc_pwl
  • gc_pwl_func
  • genconstr
  • lp
  • lpmethod
  • lpmod
  • mip1
  • mip2
  • multiobj
  • multiscenario
  • params
  • piecewise
  • poolsearch
  • qcp
  • qp
  • sensitivity
  • sos
  • sudoku
  • tsp
  • tune
  • workforce1
  • workforce2
  • workforce3
  • workforce4
  • workforce5

About

OCaml wrapper for Gurobi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published