Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.
Originally posted by: mathygirl
Is there a way to get unordered sets in OPL/OPL script? By default, the sets in OPL are ordered, even though this is not consistent with the mathematical definition of "set".
Hi,
have you had a look at
sorted. Purpose. OPL keyword to specify the ascending order for sets. Context. Model files (.mod). Syntax. SetTypeModifier: "ordered" | "sorted" | "reversed".
?
regards
Yes, I was wondering if there was some other functionality I was not aware of.
sorted sets should help you.
Whether you add the elements 1,2,3 or 3,1,2 or 2,1,3 you get the same set.
So you get what you have in mathematical sets : not twice the same element and no order
Regards