Hello everybody,

I’m conducting a research and I need to write a constraint for my model in GAMS. Can you help me?

L(A(i),C(m)) +e =l= L(A(i),C(k))-r

In this constraint L is distance function it calculates the distance between A(i) and C(m). i is alternative set. m is class set. The constraint compares their distance values. The constraint will work for every i and m not equal to k set. (m and k is the same set) However for each i, I have a defined m value. So LHS of the constaint for each i is defined. I need to write RHS of the equation m not equal to k. (for any i, m is specified and k can not be equal to the m)

This is the point that I cannot write. I thought new defined parameter for unique i and m combination can be used but I can ot add it to the existing equation. Up to now I write their open form but for each data set I need to write the model again.

Please help me.

Thanks a lot.

Note: e is error decision variable. r is very small constant value to get rid of equality of L functions.