gurobi refactoring