Skip to content

Commit

Permalink
Remove sorting of team's schedule
Browse files Browse the repository at this point in the history
The attempt to sort the remainder of a team's schedule in the Monte
Carlo Simulation was causing errors given the sorting index is no longer
valid. The remaining schedules no longer need to be sorted as they
should already be in the correct order given how the data is presented.
Regardless, the order likely doesn't matter.

Signed-Off-By: Robert Clark <[email protected]>
  • Loading branch information
roclark committed Dec 16, 2019
1 parent 0f4918c commit de9ad16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def determine_conference_standings(num_wins, conference_wins):


def print_probabilities_ordered(probabilities):
sorted_ranks = [(v,k) for k,v in probabilities.iteritems()]
sorted_ranks = [(v,k) for k,v in probabilities.items()]
sorted_ranks.sort(reverse=True)
for probability, team in sorted_ranks:
print('%s: %s%%' % (team, probability * 100.0))
Expand Down
1 change: 0 additions & 1 deletion run-simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def get_remaining_schedule(conference_teams, teams, rankings):
'top_25': top_25
}
remaining_schedule.append(populate_game_info(teams, game))
remaining_schedule.sort()
# Return a list of non-duplicate matches
schedule = list(s for s, _ in itertools.groupby(remaining_schedule))
return schedule, current_records
Expand Down

0 comments on commit de9ad16

Please sign in to comment.