Originally posted by: abdulgani
Hi,
I try to convert a tuple to a set. What i do below doesn't give an error in the relevant line but it gives error in other lines. (see the attached screenshot)
.mod
tuple TWeekdays {
key string Day;
};
{TWeekdays} weekdays =...;
string Weekdays[w in weekdays] = item(weekdays,<w.Day>).Day;
.dat
weekdays ={<"Monday">
<"Tuesday">
<"Wednesday">
<"Thursday">
<"Friday">
<"Saturday">
<"Sunday">};
What i try to achieve here is an alternative of the code below in .mod
{string} Weekdays = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
Thanks in advance.
Gani.
#DecisionOptimization#OPLusingCPLEXOptimizer