Changes maximum condition to sum(scores)

pull/1/head
Nemo 3 years ago
parent 86cff25f11
commit 16f7402436
  1. 3
      modernart-game.mzn
  2. 9
      modernart.mzn

@ -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;

@ -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]);
Loading…
Cancel
Save