diff --git a/mip/highs.py b/mip/highs.py index 7ca9ee69..001d4c78 100644 --- a/mip/highs.py +++ b/mip/highs.py @@ -720,7 +720,7 @@ def __init__(self, model: mip.Model, name: str, sense: str): # Buffer string for storing names self._name_buffer = ffi.new(f"char[{self._lib.kHighsMaximumStringLength}]") - # type conversion maps + # type conversion maps (can not distinguish binary from integer!) self._var_type_map = { mip.CONTINUOUS: self._lib.kHighsVarTypeContinuous, mip.BINARY: self._lib.kHighsVarTypeInteger, @@ -815,6 +815,8 @@ def add_var( if name: check(self._lib.Highs_passColName(self._model, col, name.encode("utf-8"))) if var_type != mip.CONTINUOUS: + # Note that HiGHS doesn't distinguish binary and integer variables + # by type. There is only a boolean flag for "integrality". self._num_int_vars += 1 check( self._lib.Highs_changeColIntegrality(