Skip to content

Commit

Permalink
fix SolverHighs._{get,set}_bool_option_value
Browse files Browse the repository at this point in the history
Used incorrect types before.
  • Loading branch information
rschwarz committed Jan 17, 2025
1 parent a0d4035 commit db1834d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mip/highs.py
Original file line number Diff line number Diff line change
@@ -760,8 +760,8 @@ def _get_double_option_value(self: "SolverHighs", name: str) -> float:
)
return value[0]

def _get_bool_option_value(self: "SolverHighs", name: str) -> float:
value = ffi.new("bool*")
def _get_bool_option_value(self: "SolverHighs", name: str) -> int:
value = ffi.new("int*")
check(
self._lib.Highs_getBoolOptionValue(self._model, name.encode("UTF-8"), value)
)
@@ -779,7 +779,7 @@ def _set_double_option_value(self: "SolverHighs", name: str, value: float):
)
)

def _set_bool_option_value(self: "SolverHighs", name: str, value: float):
def _set_bool_option_value(self: "SolverHighs", name: str, value: int):
check(
self._lib.Highs_setBoolOptionValue(self._model, name.encode("UTF-8"), value)
)

0 comments on commit db1834d

Please sign in to comment.