Hi again Manassaldi,
I have a new question for you and will really appreciate it if you can help me as before. I am still struggling with these kind of logical conditions on endogenous variable in my model. The problem is that p(n) includes a binary variable itself. I mean
p(n) = sum(g, t(g) * c(g,n)) where t(g) is a binary variable. With your help, I ended up with a solution to make the intervals using binary variables (uu(n), vv(n), ww(n) , xx(n), yy(n), zz(n), yy(n)). But after that I have a multiplication of binary variables as below:
eq1(n).. th =g= p(n) * uu(n) + p(n) * (10 ** (-1/2)) * vv(n) + p(n) * (10 ** (-2/2)) * ww(n) + p(n) * (10 ** (-3/2)) * xx(n) + p(n) * (10 ** (-4/2)) * yy(n);
eq2(n).. delay(n) =e= 0.2 * vv(n) + 0.4 * ww(n) + 0.6 * xx(n) + 0.8 * yy(n) + 1 * zz(n);
eq3(n).. th =l= max * uu(n) + (p(n) - exp(-10)) * vv(n) + (p(n) * (10 ** (-1/2)) - exp(-10)) * ww(n) + (p(n) * (10 ** (-1)) - exp(-10)) * xx(n)
+ (p(n) * (10 ** (-3/2)) - exp(-10)) * yy(n) + (p(n) * (10 ** (-4/2)) - exp(-10)) * zz(n);
eq4(n).. uu(n) + vv(n) + ww(n) + xx(n) + yy(n) + zz(n) =e= 1;
const13(n).. p(n) =e= sum(g, t(g) * c(g,n) );
Where c(g,n) is a parameter.
I am getting some wired results and my guess is that multiplication of binary variables makes the model much more complicated. Is there any way to avoid the multiplication of binaries, because I already have some other highly nonlinear constraints in the model.
And actually since you seem to have a very good knowledge of GAMS, I have another question for you
I have a constraint that includes multiplication of two continuous variables (const12 below):
const11(n).. phi(n) =g= 1 - (1 + (d(n) / 229)) ** (-.2) ;
const12(n).. i(n) =g= p(n) * y(n) ;
where d(n), phi(n), y(n), and i(n) are all choice variables. Is there anyway to linearize const12?
Many thanks in advance,