diff --git a/symmetry/wind/wind.mzn b/symmetry/wind/wind.mzn index 05411d5..c59bf65 100644 --- a/symmetry/wind/wind.mzn +++ b/symmetry/wind/wind.mzn @@ -37,13 +37,27 @@ output [ "tributes: \n"] ++ [( if j > n then "\n" else show(tribute[i, j]) ++ " ] ++ ["matching: (m = ", show(m), ", n = ", show(n), ", tcoins = ", show(tcoins), ")\n"]; -% variable symmetry breaking -%constraint forall(j in 1..n-1)( +% variable symmetry breaking; + +% Variable symmetry breaking 1: Impose arbitrary order on outgoing branches, +% with the lex-min outgoing branch the one numbered 1: + +% constraint forall(j in 1..n-1)( % lex_lesseq([tribute[i,j] | i in POLYGON], % [tribute[i,j+1] | i in POLYGON]) % ); -%constraint lex_lesseq([tribute[i,j] | i in 1..round(m div 2), j in VERTEX], [tribute[m+1-i,j] | i in 1..round(m div 2), j in VERTEX]); +% Simpler: + constraint forall(j in 1..n-1) - (tribute[1,j] < tribute[1,j+1]); -constraint tribute[1,1] < tribute[m,1]; \ No newline at end of file + (tribute[1,j] < tribute[1,j+1]); + +% Variable symmetry breaking 2: Impose arbitrary order between innermost and outermost +% polygon tribute sequence, with the innermost sequence the lex-lesser of the two: + +% constraint lex_lesseq([tribute[i,j] | i in 1..round(m div 2), j in VERTEX], +% [tribute[m+1-i,j] | i in 1..round(m div 2), j in VERTEX]); + +% Simpler: + +constraint tribute[1,1] < tribute[m,1];