Changes maximum condition to sum(scores)
This commit is contained in:
parent
86cff25f11
commit
16f7402436
|
@ -38,6 +38,9 @@ constraint forall (a in Artists, r in Rounds, p in Players) (
|
||||||
constraint forall(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])
|
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
|
% Max number of visible cards can be 6 for any artist per player
|
||||||
var 5..6: max_visible_cards;
|
var 5..6: max_visible_cards;
|
||||||
|
|
|
@ -21,12 +21,17 @@ array[Rounds,Artists] of var bool: awards_per_round_per_artist;
|
||||||
% Winning artists for each round (just-by-ranking)
|
% Winning artists for each round (just-by-ranking)
|
||||||
array[Rounds,1..card(Artists)] of var Artists: sorted_artists_per_round;
|
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;
|
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
|
% Total number of a cards of an artist that were PLAYED this round
|
||||||
array[Rounds, Artists] of var int: cards_per_artist_per_round;
|
array[Rounds, Artists] of var int: cards_per_artist_per_round;
|
||||||
|
|
||||||
% Dumb constraints to help maximize score
|
% 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,Nemo] > score_per_round_per_player[Round1,Jana];
|
||||||
constraint score_per_round_per_player[Round1,Jana] > 15;
|
% constraint score_per_round_per_player[Round1,Jana] > 10;
|
||||||
solve maximize score_per_round_per_player[Round1,Nemo];
|
% constraint score_per_round_per_player[Round1,Adam] > 5;
|
||||||
|
solve maximize sum(p in Players)(score_per_player[p]);
|
Loading…
Reference in New Issue