Hi everyone,
I’m new at GAMS and i’m try to write a code with some knownlage of code writing with other languages like java. Anyway i want to write a code that gives me cordinates of departments in a fabric. I should add to my code some constrains to block overlapping departments and I thought I can add those equations to my code;
sets
i departmants
alias(i,j)
;
variables
x(i) x cord of dep i
y(i) y cord of dep i
w(i) width of dep i
l(i) lenght of dep i
;
Equations
eq13(i,j) .. (x(j)-(w(j)/2))=g=(x(i)+(w(i)/2)) or (x(j)+(w(j)/2))=l=(x(i)-(w(i)/2));
eq14(i,j) .. (y(j)-(l(j)/2))=g=(y(i)+(l(i)/2)) or (y(j)+(l(j)/2))=l=(y(i)-(l(i)/2));
What i want is that;
department j should not be on department i so department j should not between on x(i)-w(i) and x(i)+w(i)
but gams says me you can’t use or statement like that so can you help me?
(p.s.: If anyone wants, i can show full of my code)