Re-optimization updating the model X Callback Code
Hi Folks,
I trying to solve a two decisions problem with Gurobi C++ API, the first decision is after minimizing one variable with cost as coefficients, the decision to use the machine on the list becomes binaries, 1 unit committed, 0 non-committed per hour in horizon time. First, I did not decide how to turn the first optimization decision into a binary matrix. And second, I need still with first decision constrained the problem that the machine should run for a certain time.
I created one variable Trun to match the constraint about time running but did not work at all in optimization time, and badly when I did first update() then optimize() again. I looking for the strategy used in the TSP problem (https://colab.research.google.com/github/Gurobi/modeling-examples/blob/master/traveling_salesman/tsp_gcl.ipynb#scrollTo=Y5fkBqbR-I1I) It seems that this Trun is more suitably set as a lazy constraint in Callback Code. I also need to obey the time to do not run those machines, T_nrun, which will be the sum of binaries 1 shutdown, 0 is ON.
I am not sure about what strategy to choose, because I do not know exactly what is the difference and consequences in choose one or another. Could you please explain that?
Thanks in advance for the answers.
-
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 Alessandra,
It's not very clear to me what you are asking for. Please try to reformulate your question and also consider adding a small code example.
Cheers,
Matthias0
Post is closed for comments.
Comments
2 comments