variable ensuring two index are different
Posted: Tue Nov 06, 2018 12:43 pm
Hi Guys,
I am trying to develop a model with one of the decision variable being the following:
W(i,j): store i is the closest alternative store for region j;
i assume that each customer region has a local store and want to study the customer shopping behavior when their local store is closed - e.g. will they travel to the nearest store in another region?
This variable is only meaningful for the model when i is not equal to j. So how should I reflect that in GAMS? Should I put down W(i,j) $(ord(i) ne ord(j)) every single time I use the variable w(i,j) or is there another way to define this once and for all?
Thank you very much indeed for the help.
I am trying to develop a model with one of the decision variable being the following:
W(i,j): store i is the closest alternative store for region j;
i assume that each customer region has a local store and want to study the customer shopping behavior when their local store is closed - e.g. will they travel to the nearest store in another region?
This variable is only meaningful for the model when i is not equal to j. So how should I reflect that in GAMS? Should I put down W(i,j) $(ord(i) ne ord(j)) every single time I use the variable w(i,j) or is there another way to define this once and for all?
Thank you very much indeed for the help.