We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5671eb1 commit 962b17eCopy full SHA for 962b17e
1 file changed
linopy/solvers.py
@@ -1702,7 +1702,11 @@ def get_solver_solution() -> Solution:
1702
sol = pd.Series(m.getSolution(), index=var, dtype=float)
1703
1704
try:
1705
- _dual = m.getDuals()
+ try: # Try new API first
1706
+ _dual = m.getDuals()
1707
+ except AttributeError: # Fallback to old API
1708
+ _dual = m.getDual()
1709
+
1710
try: # Try new API first
1711
constraints = m.getNameList(
1712
xpress_Namespaces.ROW, 0, m.attributes.rows - 1
0 commit comments