Added the function to set the number of threads to gurobi.