Seemingly unlogical result
AnsweredHi,
I am solving two models that are largely similar, but have one small change. One constraint, which sets a lower bound, has a different lower bound in the first model than in the second one. Otherwise, they are identical. This means that the second model is more restrictive. However, the second model produces a better objective which should not be possible.
Is there any common mistake I might be making? I am not using any stopping criteria; both models report their status as optimal.
Thanks in advance!
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Jochem,
One possible idea to debug this behaviour is to solve the first model with the optimal solution of the second model. Given your explanation, the first model should result in infeasibility. You can then compute an IIS using the Model.computeIIS() and see where the inconsistency comes from.
To solve the first model with the optimal solution of the second model, you can do one of the following:
- Add constraints in the form \(x_i = v_i\) where \(x_i\) is the \(i\)-th decision variable and \(v_i\) is its corresponding value.
- Add a constraint in the form \(z \leq z^*\) where \(z\) is the objective function of the first model and \(z^*\) is the optimal objective value of the second model (assuming minimization problem).
Best regards,
Maliheh
1
Post is closed for comments.
Comments
2 comments