I want to import elements or members into a GAMS set from other sources, say SQL DB. For example set p plant /p1,p2,p3.../ These elements are successfully imported, however, it seems that they are not ordered, because errors will be reported when I use condition clause like ord(p) > 3 in constraints.
I know that elements are ordered as they initially created. So these imported elements are supposed to follow the sequence as imported. When I display this set, elements are shown as p1, p2, p3...
So I am really confused about the ordering of imported elements. I want to figure out the reason and if there are ways I can fix their order. Thanks.