> I'm trying to define a set of a set like the following:
>
> set Days;
> set SlotsOfDay{d in Days};
>
>
> and then in the data section:
>
> set TimeslotsOfDay[1] := 1..6;
This syntax is allowed only in the model section. In the data section
you need to specify all elements explicitly (because 1..6 is considered
as a literal "1..6"); for example:
set TimeslotsOfDay[1] := 1 2 3 4 5 6;
>
> so far I don't get any errors, but I can't print it, so I think it's not
> refined correctly.
>
> Is there any way?
>
printf{d in Days, t in SlotsOfDay[d]} "...", d, t, ... ;
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk