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: 1 year 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 month 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