XiongPengNUS / rsome

Robust Stochastic Optimization Made Easy
GNU General Public License v3.0
282 stars 54 forks source link

catch gurobi errors #47

Open GalPerelman opened 1 year ago

GalPerelman commented 1 year ago

This PR edits the solve function in grb_solver to catch gurobi errors When the solution is infeasible the grb.getAttr('X') in line 72 returns a gurobipy.GurobiError Before this PR the try-except catches only AttributeError and therefore program crash