Skip to content

Commit a8fa114

Browse files
committed
Add access functions for row duals
1 parent 14ba422 commit a8fa114

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/pyscipopt/scip.pxd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,6 +1895,8 @@ cdef extern from "scip/pub_lp.h":
18951895
SCIP_Real SCIProwGetLhs(SCIP_ROW* row)
18961896
SCIP_Real SCIProwGetRhs(SCIP_ROW* row)
18971897
SCIP_Real SCIProwGetConstant(SCIP_ROW* row)
1898+
SCIP_Real SCIProwGetDualsol(SCIP_ROW* row)
1899+
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW* row)
18981900
int SCIProwGetLPPos(SCIP_ROW* row)
18991901
SCIP_BASESTAT SCIProwGetBasisStatus(SCIP_ROW* row)
19001902
SCIP_Bool SCIProwIsIntegral(SCIP_ROW* row)

src/pyscipopt/scip.pxi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,28 @@ cdef class Row:
679679
"""
680680
return SCIProwGetConstant(self.scip_row)
681681

682+
def getDualsol(self):
683+
"""
684+
Returns the dual solution of row.
685+
686+
Returns
687+
-------
688+
float
689+
690+
"""
691+
return SCIProwGetDualsol(self.scip_row)
692+
693+
def getDualfarkas(self):
694+
"""
695+
Returns the dual Farkas solution of row.
696+
697+
Returns
698+
-------
699+
float
700+
701+
"""
702+
return SCIProwGetDualfarkas(self.scip_row)
703+
682704
def getLPPos(self):
683705
"""
684706
Gets position of row in current LP, or -1 if it is not in LP.

0 commit comments

Comments
 (0)