Closed holmes72 closed 2 years ago
Sorry...this has been asked and answered. It looks like if you want to adjust this value on the fly, this is as good as it gets. Has anyone added a setter for this value?
Looks like I added a setter.
In lineup_optimizer.py, within class LineupOptimizer add:
def set_max_from_one_team(self, max: int):
self.settings.max_from_one_team = max
Then you can call this when you're setting up your optimizer:
opt.set_max_from_one_team(maxStack)
I'm not sure how I can get this to work I want to limit the max players for 1 team to 3 from thunders today
If you're saying "I want no more than three OKC players in any given line": players = optimizer.player_pool.get_players(PlayerFilter(teams=['OKC'])) group = PlayersGroup(players, max_from_group=3) optimizer.add_players_group(group)
Cam I use multiple group settings for every team
On Tue, Jan 11, 2022, 3:57 PM holmes72 @.***> wrote:
If you're saying "I want no more than three OKC players in any given line": players = optimizer.player_pool.get_players(PlayerFilter(teams=['OKC'])) group = PlayersGroup(players, max_from_group=3) optimizer.add_players_group(group)
— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/338#issuecomment-1010353260, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7RAY4CYINJ77C2DAPLUVSKTRANCNFSM5LQYP3UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I'm not a fan of "RTFM" responses, but it seems to apply here. The answer is "yes", and I encourage you to check out the readthedocs site: https://pydfs-lineup-optimizer.readthedocs.io/en/latest/index.html
Thanks, I'll check it out.
On Tue, Jan 11, 2022, 4:46 PM holmes72 @.***> wrote:
I'm not a fan of "RTFM" responses, but it seems to apply here. The answer is "yes", and I encourage you to check out the readthedocs site: https://pydfs-lineup-optimizer.readthedocs.io/en/latest/index.html
— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/338#issuecomment-1010388008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7QMSB36FDEAWF7ZFLDUVSQM5ANCNFSM5LQYP3UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I I got a question, why do I get this
Traceback (most recent call last):
File "Fanduel2Finish2.py", line 62, in
On Tue, Jan 11, 2022, 5:04 PM joseph offen @.***> wrote:
Thanks, I'll check it out.
On Tue, Jan 11, 2022, 4:46 PM holmes72 @.***> wrote:
I'm not a fan of "RTFM" responses, but it seems to apply here. The answer is "yes", and I encourage you to check out the readthedocs site: https://pydfs-lineup-optimizer.readthedocs.io/en/latest/index.html
— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/338#issuecomment-1010388008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7QMSB36FDEAWF7ZFLDUVSQM5ANCNFSM5LQYP3UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I want to limit the number of players from a single team in any lineup. I'm currently grouping players by team and setting a max_from_group on each group. Is there a more elegant/simpler way to do this? I see the attribute "max_from_one_team" but don't see how to modify this value.