optapy / optapy

OptaPy is an AI constraint solver for Python to optimize planning and scheduling problems.

Home Page:https://www.optapy.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error not displayed when using solveAndListen function

adrdv opened this issue · comments

commented

Hello,
I have encountered an issue when using the function solveAndListen. No errors were ever displayed and the program did not stop despite the time limit. I switched to the function afterwards and I could finally see the errors.

I go from this :

solver_manager.solveAndListen(0, lambda the_id: solution, on_best_solution_changed)

to this

solver_factory = optapy.solver_factory_create(solver_config)
solver = solver_factory.buildSolver()
solver.solve(MyClass)

I thought it might be interesting to report.

I know of this issue; it is a major pain point since errors are swallowed, thus not alerting the user something is wrong. I will investigate this.

commented

I think it could be useful to just put a warning message when using this function, to avoid losing time !