Changing `Model.sense` makes (feasible) relaxation infeasible
- Dominant language
- Linear Programming
- Stars
- 600
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.