MiniZinc: syntax error: syntax error, unexpected set
Any help, advice or direction would be appreciated. Thanks in advance.
% Use this editor as a MiniZinc scratch book
% Define the enum types for activities and players
enum ACTIVITY = {CHECKERS, HORSESHOES, DARTS, TABLE_TENNIS};
enum PLAYER = {A, B, C, D, E, F, G, H};
% Define the array of integers for sessions
array[1..4] of int: SESSION = [9, 10, 11, 12];
% Define the set of pairs of players for teams
set of set of PLAYER: TEAMS = {{A, B}, {A, C}, {A, D}, {A, E}, {A, F}, {A, G}, {A, H},
{B, C}, {B, D}, {B, E}, {B, F}, {B, G}, {B, H},
{C, D}, {C, E}, {C, F}, {C, G}, {C, H},
{D, E}, {D, F}, {D, G}, {D, H},
{E, F}, {E, G}, {E, H},
{F, G}, {F, H},
{G, H}};
% Define the decision variable for the assignment of teams to activities in sessions
array[TEAMS, ACTIVITY, SESSION] of var bool: x;
% Define the constraints of the problem
constraint forall(t in TEAMS, a in ACTIVITY) (
% A team can only play one activity one time and then that combination/team is excluded from further play
sum(s in SESSION) (x[t, a, s]) <= 1
);
constraint forall(p in PLAYER, a in ACTIVITY) (
% A player can only participate once in a specific activity, regardless of the team and the session
sum(t in TEAMS where p in t, s in SESSION) (x[t, a, s]) <= 1
);
constraint forall(a in ACTIVITY, s in SESSION) (
% Each activity in each session has exactly one team assigned to it
sum(t in TEAMS) (x[t, a, s]) == 1
);
solve satisfy;
MiniZinc: syntax error: syntax error, unexpected ';'
MiniZinc: syntax error: syntax error, unexpected ';', expecting ++ or ':'
y =
[| Session(9): Session(10): Session(11): Session(12):
| CHECKERS: 1, 14, 23, 28
| HORSESHOES: 1, 14, 23, 28
| DARTS: 1, 14, 23, 28
| TABLE_TENNIS: 1, 14, 23, 28
|];