Dear all,
I want to determine the index of elements in an unordered subset in GAMS and I need some help.
for example, I have a set i /1*6/ and I get subset(i) from MATLAB software based on an algorithm that I designed for my problem. a subset(i) contains some elements of i that are sorted in a special way. Consider that I get subset(i) /4,3,1,6,2/ from MATLAB. In my model, I need to have the index of elements in subset(i). for example, I need to have a constraint for elements that are between 3 and 2 in subset(i). I can not use ‘ord’ because subset(i) is an unordered subset based on i. How should I define the mentioned constraint in my model?
I appreciate it if someone can help me.
Thanks and regards,
Bahar