All Projects → WolframResearch → GurobiLink

WolframResearch / GurobiLink

Licence: MIT license
Wolfram Language interface to the Gurobi numerical optimization library

Programming Languages

C++
36643 projects - #6 most used programming language
Mathematica
289 projects
CMake
9771 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to GurobiLink

dfogn
DFO-GN: Derivative-Free Optimization using Gauss-Newton
Stars: ✭ 20 (+25%)
Mutual labels:  numerical-methods, numerical-optimization, optimization-algorithms
gibbous
Convex optimization for java and scala, built on Apache Commons Math
Stars: ✭ 17 (+6.25%)
Mutual labels:  optimization-algorithms, convex-optimization
FirstOrderSolvers.jl
Large scale convex optimization solvers in julia
Stars: ✭ 20 (+25%)
Mutual labels:  optimization-algorithms, convex-optimization
pdfo
Powell's Derivative-Free Optimization solvers
Stars: ✭ 56 (+250%)
Mutual labels:  numerical-optimization, optimization-algorithms
Deep-Learning-Optimization-Algorithms
Visualization of various deep learning optimization algorithms using PyTorch automatic differentiation and optimizers.
Stars: ✭ 47 (+193.75%)
Mutual labels:  optimization-algorithms, convex-optimization
portfolio allocation js
A JavaScript library to allocate and optimize financial portfolios.
Stars: ✭ 145 (+806.25%)
Mutual labels:  optimization-algorithms, convex-optimization
MIPT-Opt
A course on Optimization Methods
Stars: ✭ 128 (+700%)
Mutual labels:  numerical-optimization, convex-optimization
cvxpnpl
A Perspective-n-Points-and-Lines method.
Stars: ✭ 56 (+250%)
Mutual labels:  convex-optimization, convex
osqp
The Operator Splitting QP Solver
Stars: ✭ 929 (+5706.25%)
Mutual labels:  numerical-optimization, convex-optimization
ForBES
Generic and efficient MATLAB solver for nonsmooth optimization problems
Stars: ✭ 19 (+18.75%)
Mutual labels:  numerical-optimization, optimization-algorithms
seminars-fivt
Seminars on optimization methods for DIHT MIPT
Stars: ✭ 23 (+43.75%)
Mutual labels:  numerical-optimization, convex-optimization
cspy
A collection of algorithms for the (Resource) Constrained Shortest Path problem in Python / C++ / C#
Stars: ✭ 64 (+300%)
Mutual labels:  optimization-algorithms, optimization-library
Tf Quant Finance
High-performance TensorFlow library for quantitative finance.
Stars: ✭ 2,925 (+18181.25%)
Mutual labels:  numerical-methods, numerical-optimization
benchopt
Making your benchmark of optimization algorithms simple and open
Stars: ✭ 89 (+456.25%)
Mutual labels:  optimization-algorithms, convex-optimization
AuxiLearn
Official implementation of Auxiliary Learning by Implicit Differentiation [ICLR 2021]
Stars: ✭ 71 (+343.75%)
Mutual labels:  optimization-algorithms
nmmn
Miscellaneous methods for: astronomy, dealing with arrays, statistical distributions, computing goodness-of-fit, numerical simulations and much more
Stars: ✭ 16 (+0%)
Mutual labels:  numerical-methods
optaplanner-quickstarts
OptaPlanner quick starts for AI optimization: many use cases shown in many different technologies.
Stars: ✭ 226 (+1312.5%)
Mutual labels:  optimization-algorithms
SciLean
Scientific computing in Lean 4
Stars: ✭ 86 (+437.5%)
Mutual labels:  numerical-methods
GDLibrary
Matlab library for gradient descent algorithms: Version 1.0.1
Stars: ✭ 50 (+212.5%)
Mutual labels:  optimization-algorithms
lubeck
High level linear algebra library for Dlang
Stars: ✭ 57 (+256.25%)
Mutual labels:  numerical-methods

GurobiLink for Wolfram Language

GurobiLink is a package implemented in Wolfram Language and C++ using LibraryLink that provides an interface to the Gurobi numerical optimization solver. Gurobi can be used with the same ease as the built-in solvers and has excellent performance for particularly large or complicated (e.g. mixed-integer) models. It supports continuous and mixed-integer linear programming (LP), quadratic programming (QP), quadratically-constrained programming (QCP) and other classes of problems.

The package requires a Gurobi license (free academic licenses and evaluation licenses for commercial users are available, please see the Gurobi documentation for license installation instructions). It works with Gurobi version 9.0 and later and is bundled with Wolfram Language products (such as Mathematica or Wolfram Desktop) version 12.2 and later.

GurobiLink makes the solver accessible as a plug-in through the Wolfram Language optimization method framework and is used to implement Method -> "Gurobi" in functons like NMinimize or ConvexOptimization. This allows seamless integration of the Wolfram Language modeling capabilities with the high performance of Gurobi, for example

In[1]:= ConvexOptimization[Total[x], Norm[x] <= 1, Element[x, Vectors[10, Integers]],
            Method -> "Gurobi"] // AbsoluteTiming

Out[1]= {0.004534, {x -> {0, 0, -1, 0, 0, 0, 0, 0, 0, 0}}}

How to build

The build requires CMake 3.15 or later, a C++ compiler with support for C++11, as well as installations of Wolfram Language and the Gurobi Optimizer.

The general steps for building the complete paclet are

git clone https://github.com/WolframResearch/GurobiLink.git GurobiLink
cd GurobiLink
mkdir build
cd build
cmake <options> ..
cmake --build . --target install

which will place the result by default in the GurobiLink/build/install directory.

The typical CMake options required for building are

  • WOLFRAM_INSTALLATION -- Wolfram layout location, for example, /usr/local/Wolfram/Mathematica/12.3
  • GUROBI_VERSION -- version number, for example, 9.1.2
  • GUROBI_HOME -- where Gurobi is installed, for example, /opt/gurobi912/linux64

It may not always be necessary to specify all of these, since the build system provides reasonable defaults.

The built paclet can then be enabled in a particular Wolfram Language session using PacletDirectoryLoad or packed into a .paclet archive using CreatePacletArchive.

The .paclet format is suitable for distribution or permanent installation using PacletInstall.

Some platform-specific examples follow:

Windows

Create a build directory, e.g. C:\dev\git\Paclets\GurobiLink\build

cd C:\dev\git\Paclets\GurobiLink
mkdir build
cd build

Configure the build using the 64-bit Visual Studio 2017 generator (see cmake --help for other possible CMake generators)

cmake -G "Visual Studio 15 2017 Win64" ^
      -DWOLFRAM_INSTALLATION="C:\Program Files\Wolfram Research\Mathematica\12.3"^
      -DGUROBI_VERSION=9.1.2^
      -DGUROBI_HOME="C:\gurobi912\win64"^
      -DINSTALL_PDB=ON ^
      ..

The generated solution can be opened in the Visual Studio IDE using

cmake --open .

To build, select the appropriate configuration (for example, Debug), right-click the desired target (for example, INSTALL) and choose 'Build' from the context menu.

Alternatively, to build the debug configuration from the command line use

cmake --build . --config Debug --target INSTALL

The development version of the paclet will be assembled in build\install and can be enabled in a Wolfram Language session by

PacletDirectoryLoad["C:\\dev\\git\\Paclets\\GurobiLink\\build\\install\\GurobiLink"];

Sanity-check the build by running the included basic test file:

TestReport["C:\\dev\\git\\Paclets\\GurobiLink\\Tests\\GurobiLink_Basic.wlt"]

macOS

Create a build directory, e.g. ~/git/Paclets/GurobiLink/build

cd ~/git/Paclets/GurobiLink
mkdir build
cd build

Configure the build using the default Unix Makefiles generator (see cmake --help for other possible CMake generators)

cmake -DWOLFRAM_INSTALLATION="/Applications/Mathematica12.3.app/Contents" \
      -DGUROBI_VERSION=9.1.2 \
      -DGUROBI_HOME=/Library/gurobi912/mac64 \
      ..

Build the debug configuration from the command line

cmake --build . --config Debug --target install

The development version of the paclet will be assembled in build/install and can be enabled in a Wolfram Language session by

PacletDirectoryLoad["~/git/Paclets/GurobiLink/build/install/GurobiLink"];

Sanity-check the build by running the included basic test file:

TestReport["~/git/Paclets/GurobiLink/Tests/GurobiLink_Basic.wlt"]

Linux

See the macOS instructions, except the build configuration step would be

cmake -DWOLFRAM_INSTALLATION="/usr/local/Wolfram/Mathematica/12.3" \
      -DGUROBI_VERSION=9.1.2 \
      -DGUROBI_HOME=/opt/gurobi912/linux64 \
      ..

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].