sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.19k stars 411 forks source link

Package ortools #33493

Open mkoeppe opened 2 years ago

mkoeppe commented 2 years ago

OR-Tools is fast and portable software for combinatorial optimization, developed at Google in C++, that can be used from C++, Python, C#, or Java.

Instruction to install OR-Tools for Python:

Relevant third-party instructions:

or-tools has a linear_solver wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS.

If a more detailed simplex interface was added, we could replace the Sage-specific interfaces sage.numerical.backends.glpk etc. with a general or-tools backend.

Depends on #31098

CC: @dimpase

Component: packages: optional

Author: Matthias Koeppe

Branch/Commit: u/mkoeppe/package_ortools @ 3e7244c

Issue created by migration from https://trac.sagemath.org/ticket/33493

mkoeppe commented 2 years ago

Branch: u/mkoeppe/package_ortools

mkoeppe commented 2 years ago

Commit: 5970495

mkoeppe commented 2 years ago

New commits:

5970495build/pkgs/ortools: New
mkoeppe commented 2 years ago

Author: Matthias Koeppe

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 5970495 to 3e7244c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

3e7244cbuild/pkgs/ortools/requirements.txt: Require >= 9.3.0
dimpase commented 2 years ago
comment:4

Hmm, should we rather build from source? This branch just gets a binary wheel, on Linux at least.

mkoeppe commented 2 years ago
comment:5

Also there's no macOS wheel for Python 3.10 yet, so I can't even test at the moment

dimpase commented 2 years ago
comment:6

apparently one can build from source using cmake, see https://github.com/google/or-tools/blob/stable/cmake/README.md

slel commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,2 +1,6 @@
-https://developers.google.com/optimization/install#python
+[OR-Tools](https://developers.google.com/optimization) is fast and portable software for combinatorial optimization, developed at Google in C++, that can be used from C++, Python, C#, or Java.

+Instruction to install OR-Tools for Python:
+
+- https://developers.google.com/optimization/install#python
+
mkoeppe commented 2 years ago
comment:9

Building the Python modules depends on swig (#31098), another dependency

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -4,3 +4,5 @@

 - https://developers.google.com/optimization/install#python

+`or-tools` has a [linear_solver](https://github.com/google/or-tools/tree/stable/ortools/linear_solver) wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS. [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)
+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -4,5 +4,6 @@

 - https://developers.google.com/optimization/install#python

-`or-tools` has a [linear_solver](https://github.com/google/or-tools/tree/stable/ortools/linear_solver) wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS. [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)
-
+`or-tools` has a [linear_solver](https://github.com/google/or-tools/tree/stable/ortools/linear_solver) wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS. 
+- [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)
+- [linear_solver: Add methods getBInvARow, getBInvRow, getBInvACol, getBInvCol](https://github.com/google/or-tools/issues/3205)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -6,4 +6,6 @@

 `or-tools` has a [linear_solver](https://github.com/google/or-tools/tree/stable/ortools/linear_solver) wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS. 
 - [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)
+
+If a more detailed simplex interface was added, we could replace the Sage-specific interfaces [sage.numerical.backends.glpk](https://github.com/sagemath/sage-prod/blob/develop/src/sage/numerical/backends/glpk_backend.pyx) etc. with a general or-tools backend.
 - [linear_solver: Add methods getBInvARow, getBInvRow, getBInvACol, getBInvCol](https://github.com/google/or-tools/issues/3205)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -8,4 +8,4 @@
 - [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)

 If a more detailed simplex interface was added, we could replace the Sage-specific interfaces [sage.numerical.backends.glpk](https://github.com/sagemath/sage-prod/blob/develop/src/sage/numerical/backends/glpk_backend.pyx) etc. with a general or-tools backend.
-- [linear_solver: Add methods getBInvARow, getBInvRow, getBInvACol, getBInvCol](https://github.com/google/or-tools/issues/3205)
+- [linear_solver: Add methods getBInvARow, getBInvRow, getBInvACol, getBInvCol](https://github.com/google/or-tools/issues/3205) (closed as "wontfix")
mkoeppe commented 2 years ago

Dependencies: #31098

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,6 +3,7 @@
 Instruction to install OR-Tools for Python:

 - https://developers.google.com/optimization/install#python
+- https://developers.google.com/optimization/install/python/source_linux

 `or-tools` has a [linear_solver](https://github.com/google/or-tools/tree/stable/ortools/linear_solver) wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS. 
 - [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -5,6 +5,15 @@
 - https://developers.google.com/optimization/install#python
 - https://developers.google.com/optimization/install/python/source_linux

+Relevant third-party instructions:
+- https://developers.google.com/optimization/install/python/source_mac#scip
+- https://developers.google.com/optimization/install/python/source_linux#gurobi
+https://developers.google.com/optimization/install/python/source_linux (instead of editing the Makefile as indicated, we should check whether it is enough to set this as environment variables)
+
+
+
+
+
 `or-tools` has a [linear_solver](https://github.com/google/or-tools/tree/stable/ortools/linear_solver) wrapper, supporting CLP, CBC, GLPK, Gurobi, SCIP, XPRESS. 
 - [Issue to add HiGHS solver](https://github.com/google/or-tools/issues/3116)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -8,7 +8,7 @@
 Relevant third-party instructions:
 - https://developers.google.com/optimization/install/python/source_mac#scip
 - https://developers.google.com/optimization/install/python/source_linux#gurobi
-https://developers.google.com/optimization/install/python/source_linux (instead of editing the Makefile as indicated, we should check whether it is enough to set this as environment variables)
+- https://developers.google.com/optimization/install/python/source_linux (instead of editing the Makefile as indicated, we should check whether it is enough to set this as environment variables)