title: Get Gurobi IIS using Pyomo and gurobipy
body: <p>Could someone walk me through the steps to get the IIS from a Pyomo model using gurobipy? </p>
  
  <p><code>opt = SolverFactory('gurobi',solver_io='python')</code></p>
  
  <p>As a reference, this is what I use in JuMP</p>
  
  <pre><code>function getIIS(m::JuMP.Model)
    grb_model = m.internalModel.inner
    num_constrs = Gurobi.num_constrs(grb_model)
    Gurobi.computeIIS(grb_model)
    iis_constrs = Gurobi.get_intattrarray(grb_model, "IISConstr",  1, num_constrs)
    m.linconstr[find(iis_constrs)]
  end
  </code></pre>
  
  <p>So, basically I need access to the internal gurobi model to run the <code>computeIIS</code> function, and then I need a way to map the array of rows to the actual Pyomo constraints.</p>
  
  <p>thanks! </p>