2020-06-10 19:17:54 +00:00
|
|
|
% How much score was made by each artist in each round by just RANKING
|
2020-06-13 20:18:15 +00:00
|
|
|
array[Rounds,Artists] of var 0..3: ranking_score_per_artist_per_round;
|
2020-06-10 19:17:54 +00:00
|
|
|
|
|
|
|
% Winning artists for each round (just-by-ranking)
|
|
|
|
array[Rounds,1..card(Artists)] of var Artists: sorted_artists_per_round;
|
|
|
|
|
2020-06-11 13:54:22 +00:00
|
|
|
% Is any artist ranked in this round or not
|
|
|
|
array[Rounds,Artists] of var bool: IsArtistRanked;
|
|
|
|
|
2020-06-10 19:17:54 +00:00
|
|
|
% Decide the top artists by picking the cards per artist for that round, and sorting them
|
2020-06-13 15:29:41 +00:00
|
|
|
constraint forall(r in Rounds)(
|
|
|
|
row(sorted_artists_per_round,r)= reverse(arg_sort(row(CardsForArtist, r)))
|
|
|
|
);
|
2020-06-10 19:17:54 +00:00
|
|
|
|
|
|
|
% Top three artists get ranking score in each round as 3,2,1 others get 0
|
|
|
|
constraint forall(r in Rounds) (ranking_score_per_artist_per_round[r, row(sorted_artists_per_round,r)[1]] = 3);
|
|
|
|
constraint forall(r in Rounds) (ranking_score_per_artist_per_round[r, row(sorted_artists_per_round,r)[2]] = 2);
|
|
|
|
constraint forall(r in Rounds) (ranking_score_per_artist_per_round[r, row(sorted_artists_per_round,r)[3]] = 1);
|
|
|
|
constraint forall(r in Rounds) (ranking_score_per_artist_per_round[r, row(sorted_artists_per_round,r)[4]] = 0);
|
2020-06-11 13:54:22 +00:00
|
|
|
constraint forall(r in Rounds) (ranking_score_per_artist_per_round[r, row(sorted_artists_per_round,r)[5]] = 0);
|
|
|
|
|
|
|
|
constraint forall(r in Rounds, a in Artists) (
|
|
|
|
IsArtistRanked[r,a] = if ranking_score_per_artist_per_round[r,a] > 0 then true else false endif
|
|
|
|
);
|