Peter,
It seems you set some discrete variable levels explicitly (e.g. certain binary variables that should be equal to 1) while you do not care about others at all. Note that discrete variables that you don't touch have a default level of 0. GAMS/CPLEX does not distinguish between a default 0 and an explicitly set 0. Hence, during Mipstart those zero levels are considered to be fixed as well which might be the reason that your mipstart is not accepted. You either need to assign values to all discrete variables that allow for a feasible solution or you can circumvent this by initializing discrete variables that should not be considered as fixed during mipstart to an obviously noninteger value (set e.g. binaries to 0.5).
I know this can be confusing but I hope things are clearer now.
Fred
MIP Start with CPLEX from a file

 User
 Posts: 108
 Joined: 2 years ago
Re: MIP Start with CPLEX from a file
Thanks Fred for your answer,
I really want to say Thank you Fred and cladelpino for your help and your effort . Your really helped me a lot and I apprecitate it.
But when I just use this one feasible solution I also do not set any of the other discrete variables. Hence GAMS/Cplex will also just fix them to 0 as their is no difference in between what I initialize when just testing the feasible solution and when I want to use the solution as a MipStart according to my understandings.GAMS/CPLEX does not distinguish between a default 0 and an explicitly set 0. Hence, during Mipstart those zero levels are considered to be fixed as well which might be the reason that your mipstart is not accepted.
I tried this and at least the solution is accepted as a MIpStart. However the GAP is initally at 100 % and even after 2 hours the gap is still at 98 %. But I think this is something that I should be discussing in the CPLEX forum.you can circumvent this by initializing discrete variables that should not be considered as fixed during mipstart to an obviously noninteger value (set e.g. binaries to 0.5).
I really want to say Thank you Fred and cladelpino for your help and your effort . Your really helped me a lot and I apprecitate it.
Re: MIP Start with CPLEX from a file
It seems that you are confusing two different things.PeterBe wrote: ↑1 year agoBut when I just use this one feasible solution I also do not set any of the other discrete variables. Hence GAMS/Cplex will also just fix them to 0 as their is no difference in between what I initialize when just testing the feasible solution and when I want to use the solution as a MipStart according to my understandings.
1) You fix some variables using the .fx variable attribute and solve your MIP with those fixed variables. Variables you do not fix with .fx are computed by the solver in this approach.
2) You provide a mipstart where you set the level .l for the same variables you fixed in approach 1. During mipstart all discrete variable levels are considered. Hence, the discrete variables you do not set explicitly are (just for the mipstart!!!) at their default level of 0.
Fred
Re: MIP Start with CPLEX from a file
Post removed.
Last edited by ejay 9 months ago, edited 1 time in total.
Re: MIP Start with CPLEX from a file
Hi,
While the more elaborate description compared to the GAMS/CPLEX solver manual (https://www.gams.com/latest/docs/S_CPLE ... EXmipstart) may be informative, I find your post rather confusing than helpful.
There is an offset between the value of the GAMS/CPLEX option mipstart and the "real" CPLEX option. I also doubt that the IBM Website claims that the values from their documentation are supposed to be used like that in cplex.opt.
Best,
Fred
While the more elaborate description compared to the GAMS/CPLEX solver manual (https://www.gams.com/latest/docs/S_CPLE ... EXmipstart) may be informative, I find your post rather confusing than helpful.
There is an offset between the value of the GAMS/CPLEX option mipstart and the "real" CPLEX option. I also doubt that the IBM Website claims that the values from their documentation are supposed to be used like that in cplex.opt.
Best,
Fred
Re: MIP Start with CPLEX from a file
I get your point Fred. Post removed
I also have a question. Is it possible to include an equation not in the previous model and restarting with MIPStart. It does not seem to work except the same set of equations or less are used.
I also have a question. Is it possible to include an equation not in the previous model and restarting with MIPStart. It does not seem to work except the same set of equations or less are used.