Re-solve model Fixing Variables

Problems with syntax of GAMS
Post Reply
serch199
User
User
Posts: 1
Joined: 2 months ago

Re-solve model Fixing Variables

Post by serch199 » 2 months ago

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 :D

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 :D

Manassaldi
User
User
Posts: 111
Joined: 5 years ago
Location: Rosario - Argentina

Re: Re-solve model Fixing Variables

Post by Manassaldi » 2 months ago

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

Post Reply