Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions symmetry/wind/wind.mzn
Original file line number Diff line number Diff line change
Expand Up @@ -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];
(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];