Solution violates box constraints
Awaiting user inputI have been using Gurobi for a long time to solve optimization problems, however, recently the solver is giving me a solution that violates the box constraints of the optimization model. There is a variable that must be greater than zero, but the solution gives me a negative value. The negativity is not small, it can be more than -1000.
I already tried to run the problem with .mps and the negativity doesn't happen. An important piece of information is that I solve several problems iteratively and, in the middle of my algorithm, one of the problems that I am solving returns the negative solution. It's not always the same problem, it's not always the same variable that is negative. Honestly, I've tried everything and I don't know how to solve this. It is a linear model.
-
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 Renata,
based on your inputs it is difficult to tell what could be going wrong.
Could you show us at least a minimum working example of your code?
Best regards
Jonasz0
Post is closed for comments.
Comments
2 comments