(early) compute IR constraints
Added OPTIMALity flag for GUROBI.