Use Gurobi to check a solution feasibility
AnsweredHello everyone.
I'm using Gurobi to optimize a PCARP problem. I have a set of constraints which are already implemented in python and all of them works fine.
Now I'm trying to implement a genetic algorithim to check possible impovements on the solutions. To check the quality of a solution gernerated by the algorithm, I want to use Gurobi to check if the solution meets all the constraints. I do not expect the solver optimize the solution, just answer (true or false) if all constraints are met. It is possible to do something like that?
Thanks a lot :) (obs: sorry by my poor english)
-
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 why not try our AI Gurobot?. -
Hi João Paulo,
One way would be to fix the upper and lower bound of every variable to the value of the point you want to check. Then, optimize the model and check the optimization status if it is feasible or not.
Best regards,
Jaromił1
Post is closed for comments.
Comments
2 comments