Changes maximum condition to sum(scores)

This commit is contained in:
Nemo 2020-06-10 19:45:22 +05:30
parent 86cff25f11
commit 16f7402436
2 changed files with 10 additions and 2 deletions

View File

@ -38,6 +38,9 @@ constraint forall (a in Artists, r in Rounds, p in Players) (
constraint forall(r in Rounds, p in Players) (
score_per_round_per_player[r,p] = sum(a in Artists) (visible_count_per_round_per_artist_per_player[r,p,a] * ranking_score_per_artist_per_round[r,a])
);
constraint forall(p in Players) (
score_per_player[p] = sum(r in Rounds) (score_per_round_per_player[r,p])
);
% Max number of visible cards can be 6 for any artist per player
var 5..6: max_visible_cards;

View File

@ -21,12 +21,17 @@ array[Rounds,Artists] of var bool: awards_per_round_per_artist;
% Winning artists for each round (just-by-ranking)
array[Rounds,1..card(Artists)] of var Artists: sorted_artists_per_round;
% Score a player gets in each given round
array[Rounds,Players] of var int: score_per_round_per_player;
% Final score of a player
array[Players] of var int: score_per_player;
% Total number of a cards of an artist that were PLAYED this round
array[Rounds, Artists] of var int: cards_per_artist_per_round;
% Dumb constraints to help maximize score
constraint score_per_round_per_player[Round1,Nemo] > score_per_round_per_player[Round1,Jana];
constraint score_per_round_per_player[Round1,Jana] > 15;
solve maximize score_per_round_per_player[Round1,Nemo];
% constraint score_per_round_per_player[Round1,Jana] > 10;
% constraint score_per_round_per_player[Round1,Adam] > 5;
solve maximize sum(p in Players)(score_per_player[p]);