-
Notifications
You must be signed in to change notification settings - Fork 165
Restrict players from same team #435
Copy link
Copy link
Open
Description
Any chance we can have a this rule added, where we can specify on optimizer the number of players from the same team, but any team without specifying a position.
the documents have:
Restrict players from same team
In some cases you would want to restrict creating of lineup with players from same team, for example prevent of 2 RB from same team. For this you can use restrict_positions_for_same_team method of optimizer, it takes tuples with 2 positions.
optimizer.restrict_positions_for_same_team(('RB', 'RB'))
optimizer.restrict_positions_for_same_team(('QB', 'DST'), ('RB', 'DST'))
but say in NBA, where we may just want to set a limit per team (not position based, it would be cool to be able to do:
optimizer.set_max_players_from_team(2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels