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
when I was flattening wsum expression like [numpy.int64 objects] * [intvars],
(object numbers are about 1e8, which is below int32 upper bound, but the wsum bound may exceed.)
error occured on cpmpy.expressions.core.Operator.get_bounds, which gives false bounds from overflowed numpy.sum().
problem solved after I raised first object over int32 upper bound.
The text was updated successfully, but these errors were encountered:
Thanks for responding. After revisit, I found that the triggering conditions are not as simple as I originally thought it was.
Here's the code for reproduce this problem.
v=intvar(0,1,(2))
v2=np.array([int(1e9),int(1e9)], dtype="int64")
v3= [2,2]
e=min((sum(v*v2*v3),int(1e9)))
print(e.get_bounds()) # this works finem=Model()
m+=e==0m.solve() # AssertionError: assert (lb <= ub) caused by overflow bounds
Hi,
when I was flattening wsum expression like
[numpy.int64 objects] * [intvars]
,(object numbers are about 1e8, which is below int32 upper bound, but the wsum bound may exceed.)
error occured on cpmpy.expressions.core.Operator.get_bounds, which gives false bounds from overflowed numpy.sum().
problem solved after I raised first object over int32 upper bound.
The text was updated successfully, but these errors were encountered: