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
you need the model matrix_element_test16650504392567291.bt from cpmpy/bigtest to reproduce this bug
example below prints true, then false.
For z3 it prints twice true
for minizinc it prints twice false
for ortools + mininzinc it returns twice true
for minizinc + ortools it returns false, true
...
import brotli
import pickle
from cpmpy.expressions.variables import _IntVarImpl
f = 'models\matrix_element_test16650504392567291.bt'
with open(f, 'rb') as fpcl:
model = pickle.loads(brotli.decompress(fpcl.read()))
print(model.solve('ortools'))
_IntVarImpl(0, 1)
print(model.solve('ortools'))
The text was updated successfully, but these errors were encountered:
so is this fixed? Or besides minizinc it still crashes?
One way to get over this (and also similar problems with using directly _BoolVarImpl) we could check the function calling the constructor of _IntVarImpl (and _BoolVarImpl) with inspect and return an exception if it is not the expected function(s). However this would require to include inspect in the requirements etc., which I am not sure we want ..
I think it still crashes, can verify later. The bug occurred without a user directly calling _intvarimpl, but because one of the transformations called it. I just tried to write a minimized bug report here ;)
you need the model matrix_element_test16650504392567291.bt from cpmpy/bigtest to reproduce this bug
example below prints true, then false.
For z3 it prints twice true
for minizinc it prints twice false
for ortools + mininzinc it returns twice true
for minizinc + ortools it returns false, true
...
import brotli
import pickle
from cpmpy.expressions.variables import _IntVarImpl
f = 'models\matrix_element_test16650504392567291.bt'
with open(f, 'rb') as fpcl:
model = pickle.loads(brotli.decompress(fpcl.read()))
print(model.solve('ortools'))
_IntVarImpl(0, 1)
print(model.solve('ortools'))
The text was updated successfully, but these errors were encountered: