Skip to content

Commit db1834d

Browse files
committed
fix SolverHighs._{get,set}_bool_option_value
Used incorrect types before.
1 parent a0d4035 commit db1834d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mip/highs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ def _get_double_option_value(self: "SolverHighs", name: str) -> float:
760760
)
761761
return value[0]
762762

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

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

0 commit comments

Comments
 (0)