As mentioned in the documentation for Pi, this attribute is only available for continuous models. Shadow prices are not well-defined in mixed-integer problems, so we don't provide dual values for an integer program.

Gurobi 9 introduces MIP scenario analysis, which can help with sensitivity analysis for MIP problems.

Note that it is not uncommon (but dangerous) to get dual information from the fixed model by solving the MIP, creating the fixed LP model, solving the fixed model, and then querying the dual values for that model. However, this approach is problematic:

- For continuous models, reduced costs are a
*lower bound*on the rate of change in the objective relative to the change in the variable value. - For integer models, continuous rates of change are not valid because some variables move in discrete steps. Reduced costs on the fixed version of an integer model reveal very little (if anything) about what happens if the integer variables change value. In fact, the dual values are not useful/meaningful for the continuous variables: There are examples where a variable has a very large reduced cost in the fixed model even though you can easily move that variable in the MIP without degrading the objective function value.