Feature Request: MIP Starting solution in MATLAB API
回答済みHello,
I am solving MIP / MINLP models using the MATLAB API and I realized that there is no way to provide starting values for some / all the integer variables. I know there is a Start variable attribute in Gurobi, but the page for Attribute Examples does not mention support for MATLAB API. Is this an oversight or is there some genuine reason why the MATLAB API does not allow provision of starting values ?
I am solving many models iteratively where only the objective changes between iterations, so I was hoping that Gurobi would just read from memory the best incumbent solution found in previous iteration and use it as a starting point for next iteration (I believe this is common in C++ etc.). But this is not happening and in fact Gurobi root node heuristics are finding much worse solutions in the next iteration and take a long time to improve. This is why I will have to manually fix the starting values but there seems to be no way to do this in MATLAB.
Any help would be much appreciated, and if this is an oversight / bug then it would be great to fix them in the next minor update (ideally for me, as quickly as possible).
-
Hi Ashkay,
Is this an oversight or is there some genuine reason why the MATLAB API does not allow provision of starting values ?
Gurobi supports start solutions in MATLAB API as a vector field of the
modelvariable. Please check our documentation on “MATLAB API - Common Arguments” and search for “MIP start”. You will see the following:start (optional)
The MIP start vector. The MIP solver will attempt to build an initial solution from this vector. When present, you must specify a start value for each variable. Note that you can set the start value for a variable to
nan, which instructs the MIP solver to try to fill in a value for that variable.You can also check the facility.m script for an example of how to use start values in MATLAB.
I am solving many models iteratively where only the objective changes between iterations
Do you create a new model for each iteration? If you use the same
modelvariable and only update theobjfield when moving to the next iteration, Gurobi would use the information from the previous solve by default.
Best regards,
Maliheh0
サインインしてコメントを残してください。
コメント
1件のコメント