When running this code
import numpy as np
import xpress as xp
z = np.array([xp.var () for i in range (200)]).reshape (4,5,10)
t = np.array([xp.var (vartype = xp.binary) for i in range (200)]).reshape (4,5,10)
p = xp.problem()
p.addVariable(z,t)
p.addConstraint(z <= 1 + t)
I get the following error
Invalid constraint
---------------------------------------------------------------------------
ModelError Traceback (most recent call last)
3 p = xp.problem()
4 p.addVariable(z,t)
----> 5 p.addConstraint(z <= 1 + t)
6 p.addConstraint(xp.Sum(z[i][j][k] for i in range (4) for j in range (5)) <= 4 for k in range (10))
ModelError: Invalid constraint
Any help would be greatly appreciated, since I'm not sure how to fix it!