Tsam erroneously raises error after successfully solving k_medoids clustering problem with Gurobi
FlRedder opened this issue · 1 comments
FlRedder commented
tsam/tsam/utils/k_medoids_exact.py
Lines 186 to 187 in 25c5b39
The above code raises an error although Gurobi finds a valid solution for clustering method k_medoids
. Hence, the error message should not be raised.
Possible cause for the bug:
- API changes in Pyomo (my version: 6.0.1) or Gurobi (my version: 9.1.1). The
index
attribute ofresults['Solver'][0]['Termination condition']
seems not to be present in Pyomo 6.0.1 anymore. Could it be replaced byresults['Solver'][0]['Return code']
?
Hotfix:
- If I comment out the above lines everything works just fine.
l-kotzur commented
Dear Florian,
thanks for pointing out!
The issue should be solved with the latest release 1.1.2.
Best
Leander