ozfortress / tournament-system

A ruby gem that implements various tournament systems.
MIT License
18 stars 8 forks source link

Invalid array of weighted edges (RuntimeError) #16

Open edpratomo opened 1 year ago

edpratomo commented 1 year ago

Tried with a tournament consisting of 7 teams, TournamentSystem::Swiss works for round 1, round 2, but it always throws exception for the third run: $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/graph_matching-0.1.1/lib/graph_matching/graph/weighted.rb:61:in 'assert_weighted_edges': Invalid array of weighted edges (RuntimeError) from $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/graph_matching-0.1.1/lib/graph_matching/graph/weighted.rb:42:in '[]' from $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tournament-system-2.1.0/lib/tournament_system/algorithm/matching.rb:58:in 'maximum_weight_perfect_matching' from $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tournament-system-2.1.0/lib/tournament_system/algorithm/matching.rb:80:in 'minimum_weight_perfect_matching' from $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tournament-system-2.1.0/lib/tournament_system/swiss/dutch.rb:83:in 'generate_best_pairings' from $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tournament-system-2.1.0/lib/tournament_system/swiss/dutch.rb:35:in 'pair' from $HOME/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tournament-system-2.1.0/lib/tournament_system/swiss.rb:22:in 'generate'

It came from TournamentSystem::Swiss.generate driver, pairer: TournamentSystem::Swiss::Dutch, pair_options: { push_byes_to: :bottom_half }

BenjaminSchaaf commented 1 year ago

What driver are you using?