MIP Start with CPLEX from a file

Solver related questions
Fred
Posts: 54
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by Fred » 1 month ago

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 non-integer value (set e.g. binaries to 0.5).

I know this can be confusing but I hope things are clearer now.

Fred

cladelpino
User
User
Posts: 108
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by cladelpino » 1 month ago

Fred wrote:
1 month ago
GAMS/CPLEX does not distinguish between a default 0 and an explicitly set 0.
wow Fred! I know I will regret forgetting this when I try to use mipstart. :) This should be in the GAMS/CPLEX mipstart docu, imho.

Thanks for this insight !!
Claudio

PeterBe
User
User
Posts: 61
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by PeterBe » 1 month ago

Thanks Fred for your answer,
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.
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.
you can circumvent this by initializing discrete variables that should not be considered as fixed during mipstart to an obviously non-integer value (set e.g. binaries to 0.5).
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.

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.

Fred
Posts: 54
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by Fred » 1 month ago

PeterBe wrote:
1 month ago
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.
It seems that you are confusing two different things.

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

Post Reply