Hola que tal? En si, mi duda es que tengo modelo MIP, el cual encuentra solución y necesito volver resolver ese mismo modelo pero ahora fijando las variables binarias para poder utilizar un solucionado LP.
Por lo cual mi pregunta es ¿Es posible volver a resolver un modelo pero fijando ciertas variables (binarias) de una solución anterior?.
Gracias por su tiempo
Hello
Actually, my question is that I have MIP model, which finds solution and I need to re-solve that same model but now fixing the binary variables to be able to use a LP solver.
So my question is: Is it possible to re-solve a model but fixing certain variables (binary) of a previous solution?
Thank you for your time
Re-solve model Fixing Variables
-
- User
- Posts: 118
- Joined: 7 years ago
- Location: Rosario - Argentina
Re: Re-solve model Fixing Variables
Hi, this was discussed here: viewtopic.php?f=9&t=12390
After solving I recommend you to fix (with .fx) the binary variables in this way:
solve yourmodel using mip min z
x.fx(i)$(x.l(i) ge 0.99) = 1;
x.fx(i)$(x.l(i) le 0.01) = 0;
solve yourmodel using mip min z
x is your binary variable and i its set
Best
After solving I recommend you to fix (with .fx) the binary variables in this way:
solve yourmodel using mip min z
x.fx(i)$(x.l(i) ge 0.99) = 1;
x.fx(i)$(x.l(i) le 0.01) = 0;
solve yourmodel using mip min z
x is your binary variable and i its set
Best
Re: Re-solve model Fixing Variables
Thank you Manassaldi
Your information helped me a lot.
Your information helped me a lot.
Re: Re-solve model Fixing Variables
Hi,
Why do you want to solve the fixed MIP as an LP? If this is about the duals you would like to get for that fixed MIP, many solver links (e.g. GAMS/CPLEX) have a built-in option to solve the LP which you would get when fixing all discrete variables. For GAMS Cplex, this can be controlled via solver option solvefinal and is enabled by default.
I hope this helps!
Fred
Why do you want to solve the fixed MIP as an LP? If this is about the duals you would like to get for that fixed MIP, many solver links (e.g. GAMS/CPLEX) have a built-in option to solve the LP which you would get when fixing all discrete variables. For GAMS Cplex, this can be controlled via solver option solvefinal and is enabled by default.
I hope this helps!
Fred