SETS: team/a b c d e f g h/; slot/1..8/; nodes(team,slot):x; edges1(nodes,nodes)|(&1#EQ#&3)#AND#(&4#GT#1)#AND#(&2#EQ#&4-1):y1; edges2(nodes,nodes)/ a 1 b 1 h 1 c 1 g 1 d 1 f 1 e 1 a 2 c 2 b 2 d 2 h 2 e 2 g 2 f 2 a 3 d 3 c 3 e 3 b 3 f 3 h 3 g 3 a 4 e 4 f 4 d 4 c 4 g 4 h 4 b 4 a 5 f 5 g 5 e 5 h 5 d 5 b 5 c 5 a 6 g 6 h 6 f 6 b 6 e 6 c 6 d 6 a 7 h 7 b 7 g 7 c 7 f 7 d 7 e 7 a 8 b 8 h 8 c 8 g 8 d 8 f 8 e 8 a 1 a 8 h 1 h 8 g 1 g 8 f 1 f 8 !slot 8 e` il primo del girone di ritorno; /:y2; ENDSETS max=@SUM(edges1:y1)+100*@SUM(edges2:y2); @FOR(edges1(i,j,h,k): x(i,j)+x(h,k) > y1(i,j,h,k);(1- x(i,j))+(1-x(h,k)) > y1(i,j,h,k)); @FOR(edges2(i,j,h,k): x(i,j)+x(h,k) > y2(i,j,h,k);(1- x(i,j))+(1-x(h,k)) > y2(i,j,h,k)); @FOR(edges1(i,j,h,k)|j#GT#1:y1(i,j,h,k)+y1(i,j-1,h,k-1) > 1 ); !impedisce breaks di tre turni; @FOR(team(i):@SUM(edges1(i,j,i,h): 1-y1(i,j,i,h) ) < 2 ); !impedisce piu` di due breaks per squadra; @FOR(nodes:@GIN(x)); ! da aggiungere a edges2 se le squadre a e b giocano nello stesso stadio; !a 2 b 2 a 3 b 3 a 4 b 4 a 5 b 5 a 6 b 6 a 7 b 7;