I am trying to determine whether the feasibility region of an MIP-relaxation is bounded or not. To do that, I pick a random objective and both minimize and maximize it, checking whether one of the problems is unbounded. Unfortunately, python-mip tells me during minimization that an optimal solution has been found, during maximization it tells me that the problem is infeasible. I'm not sure why that would be the case. Is this a bug or is this somehow expected behavior?
To reproduce
I can reproduce this problem with instances from MIPLIB, e.g. dano3mip:
# `model` is an MIP from MIPLIB, with the original objective etc.
status_min = model.optimize(relax=True) # OptimizationStatus.OPTIMAL
model.sense = mip.MAXIMIZE
status_max = model.optimize(relax=True) # OptimizationStatus.INFEASIBLE
I am happy to provide a complete minimal working example if that should be necessary.
System info
I am running:
- Ubuntu 20.04.4 LTS
- python 3.8.10
- python-mip 1.13.0
I am trying to determine whether the feasibility region of an MIP-relaxation is bounded or not. To do that, I pick a random objective and both minimize and maximize it, checking whether one of the problems is unbounded. Unfortunately, python-mip tells me during minimization that an optimal solution has been found, during maximization it tells me that the problem is infeasible. I'm not sure why that would be the case. Is this a bug or is this somehow expected behavior?
To reproduce
I can reproduce this problem with instances from MIPLIB, e.g. dano3mip:
I am happy to provide a complete minimal working example if that should be necessary.
System info
I am running: