Closed hbierlee closed 3 years ago
Yes, I believe you are right that this is necessary. This problem likely originates from when I changed the system to not always send the full configuration in the environmental variable.
There is two things that I'm left wondering:
schedule.py
, because there's not one correct one. Although perhaps we could searialize the Solver itself, so it becomes independant of the driver?instance = minizinc.Instance(config.solver, minizinc.Model(model), driver)
. So it's first used to create the Solver object and then the Instance object. I guess both fundamentally need a driver, right?Oh wait, I see now that you are probably right that we're not done yet, because on my system where my PATH's minizinc is different from my selected driver, it's using both now:
DEBUG:minizinc:CLIDriver:run -> command: "/usr/bin/minizinc --allow-multiple-assignments --version", timeout None
DEBUG:minizinc:CLIDriver:run -> command: "/home/hbierlee/Projects/libminizinc/release --allow-multiple-assignments --version", timeout None
No, I think you are right. We do run using the right version of MiniZinc. The initial use of the other MiniZinc is merely to initial the MiniZinc Package, this will always use the version on the PATH. You then use set_default
to change it.
Okay, so it look like you are right that this is the only real solution that currently works. There is a remaining problem that if one configuration uses the system default and another is set explicitly, then by setting default, it would be unable to find the system default.
I'll add a quick fix for this and then merge that back
Hey! I think I found a better workaround (#17). Could you give that one a quick try? Then I'll merge that into the repository
Otherwise, the default driver (on the user's PATH) might not have that particular solver configuration.
I'm not 100% sure how to solve this except setting the default driver for each instance. The
load
function does not support a driver argument.