MIP Start with CPLEX from a file

Solver related questions
Fred
Posts: 72
Joined: 2 years ago

Re: MIP Start with CPLEX from a file

Post by Fred » 6 months 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 » 6 months ago

Fred wrote:
6 months 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: 64
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by PeterBe » 6 months 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: 72
Joined: 2 years ago

Re: MIP Start with CPLEX from a file

Post by Fred » 6 months ago

PeterBe wrote:
6 months 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

ejay
User
User
Posts: 2
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by ejay » 2 weeks ago

Post removed.
Last edited by ejay on Wed Dec 05, 2018 4:15 pm, edited 1 time in total.

Fred
Posts: 72
Joined: 2 years ago

Re: MIP Start with CPLEX from a file

Post by Fred » 2 weeks ago

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

ejay
User
User
Posts: 2
Joined: 1 year ago

Re: MIP Start with CPLEX from a file

Post by ejay » 1 week ago

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.

Post Reply