help me to linearize equation

Dear GAMS users,

I want to linearize the following equation in the format of MILP:
D=abc;
where ‘a’ and ‘b’ are continuous variables with 0<a<1; 0<=b<=1. ‘c’ is binary variable.

Thanks in advance


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HbPGF0LGHTAJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

this is my exam. I think you can find good idea.

variables
x1,x2,y1,y2,func,w1;
positive variables
x1,x2,y1,y2;
parameters
x1L,x2L,y1L,y2L
x1U,x2U,y1U,y2U;

x1L=0;
x2L=0;
y1L=0;
y2L=0;

x1U=0;
x2U=0;
y1U=0;
y2U=0;

equations
eq,eq2,q1,q2,q3,q4,q5,q6,we1,we2,we3,we4;

eq… func=e=x1-x2-y1+x1*y2;
eq2… func=e=x1-x2-y1+w1;

q1… x1+4x2=l=8;
q2… 4
x1+x2=l=12;
q3… 3x1+4x2=l=12;
q4… 2y1+y2=l=8;
q5… y1+2
y2=l=8;
q6… y1+y2=l=5;

we1… x1Ly2+y2Lx1-x1Ly2L-w1=l=0;
we2… x1U
y2+y2Ux1-x1Uy2U-w1=l=0;
we3… -x1Uy2-y2Lx1+x1Uy2L+w1=l=0;
we4… -x1L
y2-y2Ux1+x1Ly2U+w1=l=0;

*x1.lo=0;
*x2.lo=0;
*y1.lo=0;
*y2.lo=0;

*x1.up=10;
*x2.up=10;
*y1.up=10;
*y2.up=10;

model mccormick/eq2,q1,q2,q3,q4,q5,q6,we1,we2,we3,we4 /;

option lp=cplex;

solve mccormick minimizing func using lp;



2012/5/30 Fatemi

Dear GAMS users,

I want to linearize the following equation in the format of MILP:
D=abc;
where ‘a’ and ‘b’ are continuous variables with 0<a<1; 0<=b<=1. ‘c’ is binary variable.

Thanks in advance –
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HbPGF0LGHTAJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thanks Olcay. I try it to find a idea.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/enPxIBBXL24J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.