pychoco crashes when solving an optimisation problem multiple times
- Dominant language
- Python
- Stars
- 17
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm trying to solve an optimisation problem multiple times, but I'm running into issues.
As an example see the following code:
```
from pychoco.model import Model
m = Model()
x = m.intvar(1, 10, "x")
sol1 = m.get_solver().find_optimal_solution(objective=x, maximize=False)
print(sol1 is not None, sol1.get_int_val(x)) # True, 1
sol2 = m.get_solver().find_optimal_solution(objective=x, maximize=False)
print(sol2 is not None) # True
print(sol2.get_int_val(x)) # FATAL: empty Solution, crashes
```
As can be seen, after the second call there does seem to be a solution although it is not actually accessible. It might actually be the same issue as #32.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.