You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
MIP allows to create constraint like mip.LinExprTensor <= mip.Var, but not the opposite way.
To Reproduce
>>> import mip
>>> m = mip.Model()
>>> y = m.add_var_tensor((10,2), 'y')
>>> x = m.add_var('x')
>>> m += y >= x
>>> m += x >= y
Traceback (most recent call last):
File "python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "lib\site-packages\mip\entities.py", line 632, in __ge__
raise TypeError("type {} not supported".format(type(other)))
TypeError: type <class 'mip.ndarray.LinExprTensor'> not supported
Expected behavior
Both constraints mip.LinExprTensor <= mip.Var and mip.Var <= mip.LinExprTensor are supported and behave identically.
Desktop (please complete the following information):
Operating System, version: Windows
Python version: 3.10.11
Python-MIP version (we recommend you to test with the latest version): 1.15.0
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Describe the bug
MIP allows to create constraint like
mip.LinExprTensor <= mip.Var
, but not the opposite way.To Reproduce
Expected behavior
Both constraints
mip.LinExprTensor <= mip.Var
andmip.Var <= mip.LinExprTensor
are supported and behave identically.Desktop (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: