Skip to content

Commit

Permalink
Trac #18763: COIN backend should support basis status and tableau dat…
Browse files Browse the repository at this point in the history
…a 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
  • Loading branch information
Release Manager authored and vbraun committed Sep 13, 2015
2 parents ac540da + c2488a8 commit d52bb62
Show file tree
Hide file tree
Showing 2 changed files with 378 additions and 5 deletions.
15 changes: 15 additions & 0 deletions src/sage/numerical/backends/coin_backend.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ cdef extern from "coin/OsiSolverInterface.hpp":
# miscellaneous
double getInfinity()

# info about basis status
void getBasisStatus(int * cstat, int * rstat)
int setBasisStatus(int * cstat, int * rstat)

# Enable Simplex
void enableSimplexInterface(bool doingPrimal)

# Get tableau
void getBInvARow(int row, double* z, double * slack)
void getBInvACol(int col, double* vec)

cdef extern from "coin/CbcModel.hpp":
cdef cppclass CbcModel:
# default constructor
Expand Down Expand Up @@ -174,3 +185,7 @@ cdef class CoinBackend(GenericBackend):
cdef str prob_name

cpdef CoinBackend copy(self)
cpdef get_basis_status(self)
cpdef int set_basis_status(self, list cstat, list rstat) except -1
cpdef get_binva_row(self, int i)
cpdef get_binva_col(self, int j)
Loading

0 comments on commit d52bb62

Please sign in to comment.