sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.31k stars 449 forks source link

sage.numerical.backends.generic_sdp_backend: Allow solver = a user-defined subclass of GenericSDPBackend #30031

Closed mkoeppe closed 4 years ago

mkoeppe commented 4 years ago

... in analogy to #28914.

(However, in contrast to #28914, the solver must be a subclass of GenericSDPBackend.)

CC: @dimpase @yuan-zhou

Component: numerical

Author: Matthias Koeppe

Branch/Commit: 51dd905

Reviewer: Dima Pasechnik

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

mkoeppe commented 4 years ago

Author: Matthias Koeppe

mkoeppe commented 4 years ago

Branch: u/mkoeppe/sage_numerical_backends_generic_sdp_backendallowsolvera_callable

mkoeppe commented 4 years ago

New commits:

ff3d425sage.numerical.backends.generic_sdp_backend: Allow solver = a callable
3d1cca7sage.numerical.sdp, sage.numerical.backends.generic_sdp_backend: Allow duck typing of SDP backends
mkoeppe commented 4 years ago

Commit: 3d1cca7

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

Changed commit from 3d1cca7 to 51dd905

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

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

51dd905sage.numerical.backends.generic_sdp_backend: Allow solver = a user-defined subclass of GenericSDPBackend
mkoeppe commented 4 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,3 @@
 ... in analogy to #28914.

-
+(However, in contrast to #28914, the solver must be a subclass of `GenericSDPBackend`.)
dimpase commented 4 years ago
comment:6

as a concrete example of using this, could we have csdp (an optional sage spkg) as a backend this way?

it does even have a dynamic library available.

mkoeppe commented 4 years ago
comment:7

The doctests already provide a concrete (but useless) example.

Before spending effort on sage-specific SDP backend development, let's survey what kind of interfacing routes for SDP solvers are available. Either by extending
Meta-ticket #26511 (Use Python optimization interfaces: PuLP, Pyomo, cylp...), which is currently LP/MILP-centric, or a separate meta ticket for SDP solvers.

mkoeppe commented 4 years ago
comment:8

Also see #30049 (MatrixSDPBackend).

mkoeppe commented 4 years ago
comment:9

Let's get this in please

dimpase commented 4 years ago

Reviewer: Dima Pasechnik

dimpase commented 4 years ago
comment:10

lgtm.

mkoeppe commented 4 years ago
comment:11

Thanks!

vbraun commented 4 years ago

Changed branch from u/mkoeppe/sage_numerical_backends_generic_sdp_backendallowsolvera_callable to 51dd905