Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
SCIPBackend.nrows: Use model.getNConss if constraints are not cached
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jan 4, 2023
1 parent 89e5778 commit 38a33e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/numerical/backends/scip_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,8 @@ cdef class SCIPBackend(GenericBackend):
sage: p.nrows()
2
"""
if self.constraints is None:
return self.model.getNConss()
return len(self.get_constraints())

cpdef col_name(self, int index):
Expand Down

0 comments on commit 38a33e0

Please sign in to comment.