{"id":22588852,"url":"https://github.com/wolframresearch/gurobilink","last_synced_at":"2025-06-26T21:35:03.842Z","repository":{"id":110872089,"uuid":"388208899","full_name":"WolframResearch/GurobiLink","owner":"WolframResearch","description":"Wolfram Language interface to the Gurobi numerical optimization library","archived":false,"fork":false,"pushed_at":"2021-09-10T17:17:15.000Z","size":19451,"stargazers_count":24,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-10T21:45:23.481Z","etag":null,"topics":["convex","convex-optimization","gurobi","gurobi-library","gurobi-optimization","gurobi-solver","mathematica","minimization","numerical-methods","numerical-modelling","numerical-optimization","optimization","optimization-algorithms","optimization-library","wolfram-language"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WolframResearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-21T18:21:26.000Z","updated_at":"2024-12-14T09:45:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"39b84851-2048-40a7-9a03-9465e50c09d3","html_url":"https://github.com/WolframResearch/GurobiLink","commit_stats":{"total_commits":70,"total_committers":4,"mean_commits":17.5,"dds":0.5,"last_synced_commit":"928dff1fab5e44573612570deb2dc6860e33d8ac"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolframResearch%2FGurobiLink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolframResearch%2FGurobiLink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolframResearch%2FGurobiLink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolframResearch%2FGurobiLink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WolframResearch","download_url":"https://codeload.github.com/WolframResearch/GurobiLink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305879,"owners_count":21081562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convex","convex-optimization","gurobi","gurobi-library","gurobi-optimization","gurobi-solver","mathematica","minimization","numerical-methods","numerical-modelling","numerical-optimization","optimization","optimization-algorithms","optimization-library","wolfram-language"],"created_at":"2024-12-08T08:11:24.680Z","updated_at":"2025-04-10T21:45:35.541Z","avatar_url":"https://github.com/WolframResearch.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GurobiLink for Wolfram Language\n\nGurobiLink is a package implemented in [Wolfram Language](https://www.wolfram.com/language/) and C++\nusing [LibraryLink](https://reference.wolfram.com/language/guide/LibraryLink.html) that provides an interface\nto the [Gurobi](https://www.gurobi.com/) numerical optimization solver. Gurobi can be used\nwith the same ease as the built-in solvers and has excellent performance for particularly large or complicated\n(e.g. mixed-integer) models. It supports continuous and mixed-integer linear programming (LP),\nquadratic programming (QP), quadratically-constrained programming (QCP) and other classes of problems.\n\nThe package requires a Gurobi [license](https://reference.wolfram.com/language/workflow/GetALicenseForGUROBI.html)\n(free academic licenses and evaluation licenses for commercial users are available, please see the\n[Gurobi documentation](https://www.gurobi.com/documentation/quickstart.html) for license installation instructions).\nIt works with Gurobi version 9.0 and later and is bundled with Wolfram Language products (such as [Mathematica](https://www.wolfram.com/mathematica/)\nor [Wolfram Desktop](https://www.wolfram.com/desktop/)) version [12.2](https://writings.stephenwolfram.com/2020/12/launching-version-12-2-of-wolfram-language-mathematica-228-new-functions-and-much-more/) and later.\n\nGurobiLink makes the solver accessible as a plug-in through the Wolfram Language\n[optimization method framework](https://reference.wolfram.com/language/OptimizationMethodFramework/tutorial/OptimizationMethodFramework.html)\nand is used to implement [`Method -\u003e \"Gurobi\"`](https://reference.wolfram.com/language/ref/method/GUROBI.html) in functons like [`NMinimize`](https://reference.wolfram.com/language/ref/NMinimize.html) or\n[`ConvexOptimization`](https://reference.wolfram.com/language/ref/ConvexOptimization.html). This allows seamless integration of the Wolfram Language modeling capabilities\nwith the high performance of Gurobi, for example\n\n```\nIn[1]:= ConvexOptimization[Total[x], Norm[x] \u003c= 1, Element[x, Vectors[10, Integers]],\n            Method -\u003e \"Gurobi\"] // AbsoluteTiming\n\nOut[1]= {0.004534, {x -\u003e {0, 0, -1, 0, 0, 0, 0, 0, 0, 0}}}\n```\n\n## How to build\n\nThe build requires [CMake](https://cmake.org/) 3.15 or later, a C++ compiler with support for C++11, as well\nas installations of Wolfram Language and the [Gurobi Optimizer](https://www.gurobi.com/downloads/gurobi-optimizer-eula/).\n\nThe general steps for building the complete paclet are\n\n```\ngit clone https://github.com/WolframResearch/GurobiLink.git GurobiLink\ncd GurobiLink\nmkdir build\ncd build\ncmake \u003coptions\u003e ..\ncmake --build . --target install\n```\n\nwhich will place the result by default in the `GurobiLink/build/install` directory.\n\nThe typical CMake options required for building are\n\n* `WOLFRAM_INSTALLATION` -- Wolfram layout location, for example, `/usr/local/Wolfram/Mathematica/12.3`\n* `GUROBI_VERSION` -- version number, for example, `9.1.2`\n* `GUROBI_HOME` -- where Gurobi is installed, for example, `/opt/gurobi912/linux64`\n\nIt may not always be necessary to specify all of these, since the build system provides reasonable defaults.\n\nThe built paclet can then be enabled in a particular Wolfram Language session using\n[`PacletDirectoryLoad`](https://reference.wolfram.com/language/ref/PacletDirectoryLoad.html)\nor packed into a `.paclet` archive using\n[`CreatePacletArchive`](https://reference.wolfram.com/language/ref/CreatePacletArchive.html).\n\nThe `.paclet` format is suitable for distribution or permanent installation using\n[`PacletInstall`](https://reference.wolfram.com/language/ref/PacletInstall.html).\n\nSome platform-specific examples follow:\n\n#### Windows\n\nCreate a build directory, e.g. `C:\\dev\\git\\Paclets\\GurobiLink\\build`\n```\ncd C:\\dev\\git\\Paclets\\GurobiLink\nmkdir build\ncd build\n```\nConfigure the build using the 64-bit Visual Studio 2017 generator (see `cmake --help` for\nother possible CMake generators)\n```\ncmake -G \"Visual Studio 15 2017 Win64\" ^\n      -DWOLFRAM_INSTALLATION=\"C:\\Program Files\\Wolfram Research\\Mathematica\\12.3\"^\n      -DGUROBI_VERSION=9.1.2^\n      -DGUROBI_HOME=\"C:\\gurobi912\\win64\"^\n      -DINSTALL_PDB=ON ^\n      ..\n```\nThe generated solution can be opened in the Visual Studio IDE using\n```\ncmake --open .\n```\nTo build, select the appropriate configuration (for example, Debug), right-click\nthe desired target (for example, INSTALL) and choose 'Build' from the context menu.\n\nAlternatively, to build the debug configuration from the command line use\n```\ncmake --build . --config Debug --target INSTALL\n```\nThe development version of the paclet will be assembled in `build\\install` and can be enabled in a\nWolfram Language session by\n\n```\nPacletDirectoryLoad[\"C:\\\\dev\\\\git\\\\Paclets\\\\GurobiLink\\\\build\\\\install\\\\GurobiLink\"];\n```\nSanity-check the build by running the included basic test file:\n\n```\nTestReport[\"C:\\\\dev\\\\git\\\\Paclets\\\\GurobiLink\\\\Tests\\\\GurobiLink_Basic.wlt\"]\n```\n\n#### macOS\n\nCreate a build directory, e.g. `~/git/Paclets/GurobiLink/build`\n```\ncd ~/git/Paclets/GurobiLink\nmkdir build\ncd build\n```\nConfigure the build using the default Unix Makefiles generator (see `cmake --help` for\nother possible CMake generators)\n```\ncmake -DWOLFRAM_INSTALLATION=\"/Applications/Mathematica12.3.app/Contents\" \\\n      -DGUROBI_VERSION=9.1.2 \\\n      -DGUROBI_HOME=/Library/gurobi912/mac64 \\\n      ..\n```\nBuild the debug configuration from the command line\n```\ncmake --build . --config Debug --target install\n```\nThe development version of the paclet will be assembled in `build/install` and can be enabled in a Wolfram Language\nsession by\n\n```\nPacletDirectoryLoad[\"~/git/Paclets/GurobiLink/build/install/GurobiLink\"];\n```\nSanity-check the build by running the included basic test file:\n\n```\nTestReport[\"~/git/Paclets/GurobiLink/Tests/GurobiLink_Basic.wlt\"]\n```\n\n#### Linux\n\nSee the macOS instructions, except the build configuration step would be\n\n```\ncmake -DWOLFRAM_INSTALLATION=\"/usr/local/Wolfram/Mathematica/12.3\" \\\n      -DGUROBI_VERSION=9.1.2 \\\n      -DGUROBI_HOME=/opt/gurobi912/linux64 \\\n      ..\n```\n\n### See also \n * [LICENSE](LICENSE) - GurobiLink license\n * [CONTRIBUTING.md](CONTRIBUTING.md) - Guidelines for contributing to GurobiLink\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolframresearch%2Fgurobilink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolframresearch%2Fgurobilink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolframresearch%2Fgurobilink/lists"}