Open dadleyAD opened 2 weeks ago
I was not able to reproduce with debian 12, minizinc-python 0.9.0 and minizinc version 2.8.7. I will try on windows but I have access only to a windows 11 laptop...
I did reproduce it on windows.
Actually the code itself works if launched from a python script.
This is the call to the minizinc solver from within a jupyter notebook under windows which is not working.
On linux/macos, we patch asyncio via nest_asyncio.apply()
so that minizinc can use an async loop from within the jupyter async loop. But it seems this is not working properly on windows.
So i suggest that you use colab for instance to test the notebook (https://colab.research.google.com/github/airbus/discrete-optimization/blob/master/notebooks/RCPSP%20tutorials/RCPSP-5%20Constraint%20Programming.ipynb) and then that you use the library (the part using minizinc solvers) in scripts rather inside notebooks for now on windows.
The CP Solver section in the RCPSP-5 Constraint Programming.ipynb notebook is not working but simply giving a empty output (
len(results)
is empty) when the following is run. The Knapsack Constraint Programming section also suffers from this issue.In addition the following warning is displayed
WARNING:discrete_optimization.generic_tools.cp_tools:local variable 'proc' referenced before assignment
Using latest master branch (394926e59bc40086affc1c700015f92bea7bf043), windows 10, minizinc-python 0.9.0 and minizinc version 2.8.7
Likely an error with the minizinc-python bindings or possibly an update in minizinc itself