Skip to content

Commit d52bb62

Browse files
Release Managervbraun
Release Manager
authored andcommitted
Trac #18763: COIN backend should support basis status and tableau data functions
This is for COIN backend support in #18733 and #18688. Should add (1) `getBasisStatus`, `setBasisStatus`, (2) `getBInvARow`, `getBInvACol`, `getBasics`, to src/sage/numerical/backends/coin_backend.{pxd,pyx} Possible that one needs to add other functions as well, such as `enableSimplexInterface`... Reference to the relevant Clp header file: https://projects.coin-or.org/Osi/browser/trunk/Osi/src/OsiClp/OsiClpSolv erInterface.hpp?rev=1472 URL: http://trac.sagemath.org/18763 Reported by: mkoeppe Ticket author(s): Yuan Zhou Reviewer(s): Vincent Delecroix
2 parents ac540da + c2488a8 commit d52bb62

File tree

2 files changed

+378
-5
lines changed

2 files changed

+378
-5
lines changed

src/sage/numerical/backends/coin_backend.pxd

+15
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ cdef extern from "coin/OsiSolverInterface.hpp":
118118
# miscellaneous
119119
double getInfinity()
120120

121+
# info about basis status
122+
void getBasisStatus(int * cstat, int * rstat)
123+
int setBasisStatus(int * cstat, int * rstat)
124+
125+
# Enable Simplex
126+
void enableSimplexInterface(bool doingPrimal)
127+
128+
# Get tableau
129+
void getBInvARow(int row, double* z, double * slack)
130+
void getBInvACol(int col, double* vec)
131+
121132
cdef extern from "coin/CbcModel.hpp":
122133
cdef cppclass CbcModel:
123134
# default constructor
@@ -174,3 +185,7 @@ cdef class CoinBackend(GenericBackend):
174185
cdef str prob_name
175186

176187
cpdef CoinBackend copy(self)
188+
cpdef get_basis_status(self)
189+
cpdef int set_basis_status(self, list cstat, list rstat) except -1
190+
cpdef get_binva_row(self, int i)
191+
cpdef get_binva_col(self, int j)

0 commit comments

Comments
 (0)