Hi,
If we want to linearize and minimize an absolute term like |A-B|, where A and B are free integer variables. How do I do it?
Also, if the term changed to |A-1| what is the linear model for that?
I have solved the second part:
A-1<= x
1-A>=x
X>=0,
Min x
Is this correct?.
Linearizing and minimizing an absolute term
Linearizing and minimizing an absolute term
Monsef Tahir
Re: Linearizing and minimizing an absolute term
Your expression is correct but it involves to minimize x which is hard when you try to just substitute |.| in a model. The absmip model (https://www.gams.com/latest/gamslib_ml/ ... bsmip.html) shows how to reformulate |.| with the help of a binary variable. You will need to have the some bounds on the variables involved or need indicators or a very complex SOS1 reformulation.
-Michael
-Michael