While discussing an issue I found with Cobrapy, it was decided that adding MIP detection in the gurobi interface and updating the reduced costs and shadow prices methods to return a proper error would be beneficial.
This is also because both parameters in the form of the attributes Pi and RC are not well-defined for MIPs, for more information see the gurobi documentation and articles:
The IsMIP attribute is also available since at least version 8.0 of gurobipy, so it shouldn't pose a problem regarding backwards compatibility.
This issue is just the reference point for the pull request I will make later.
While discussing an issue I found with Cobrapy, it was decided that adding MIP detection in the gurobi interface and updating the reduced costs and shadow prices methods to return a proper error would be beneficial. This is also because both parameters in the form of the attributes
Pi
andRC
are not well-defined for MIPs, for more information see the gurobi documentation and articles:The IsMIP attribute is also available since at least version 8.0 of gurobipy, so it shouldn't pose a problem regarding backwards compatibility. This issue is just the reference point for the pull request I will make later.