Skip to content

Commit 1dcaae1

Browse files
committed
Fix: use brackets to index into dicts/lists
1 parent a23d168 commit 1dcaae1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mip/highs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def constr_set_rhs(self: "SolverHighs", idx: int, rhs: numbers.Real):
762762
check(self._lib.Highs_changeRowBounds(self._model, idx, lb, ub))
763763

764764
def constr_get_name(self: "SolverHighs", idx: int) -> str:
765-
return self._cons_name(idx)
765+
return self._cons_name[idx]
766766

767767
def constr_get_pi(self: "SolverHighs", constr: "mip.Constr") -> numbers.Real:
768768
if self._pi:
@@ -787,7 +787,7 @@ def remove_constrs(self: "SolverHighs", constrsList: List[int]):
787787
check(self._lib.Highs_deleteRowsBySet(self._model, len(constrsList), set_))
788788

789789
def constr_get_index(self: "SolverHighs", name: str) -> int:
790-
return self._cons_col(name)
790+
return self._cons_col[name]
791791

792792
# Variable-related getters/setters
793793

0 commit comments

Comments
 (0)