I’m trying to display the umpires with the best score for each home and away team. The way I have it set up is a two-dimensional set with home and away teams in the matchup set. The best scores set has all the best scores for each type of home and away team. The scores parameter has a value attached to it. I’ve been playing around with it for a while but can’t figure it out.
set results(home,away);
results(home,away)$(home.ord ne away.ord) = yes;
set best_scores(home,away);
best_scores(index,umpire,home,away)$(home.ord ne away.ord) = yes;
loop(scores(index,umpire,home,away),
if (scores.val(index,umpire,home,away) > best_scores(index,umpire,home,away), results(home,away) = umpire$(scores(index,umpire,home,away)));
);
display matchups;