Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draftkings Tiers Help #301

Open
lightninglarry opened this issue Sep 22, 2021 · 2 comments
Open

Draftkings Tiers Help #301

lightninglarry opened this issue Sep 22, 2021 · 2 comments

Comments

@lightninglarry
Copy link

lightninglarry commented Sep 22, 2021

Heres my code:
Pretty generic, but it cant get past 3

from pydfs_lineup_optimizer import get_optimizer, Site, Sport, CSVLineupExporter
from pydfs_lineup_optimizer.stacks import TeamStack, PositionsStack, PlayersGroup
from pydfs_lineup_optimizer import AfterEachExposureStrategy

optimizer = get_optimizer(Site.DRAFTKINGS_TIERS, Sport.FOOTBALL)

optimizer.load_players_from_csv(r"C:\Users\brand\Downloads\TiersWk3DKSalaries.csv")

lineups = optimizer.optimize(20,exposure_strategy=AfterEachExposureStrategy)
for lineup in lineups:
print(lineup)
optimizer.export(r"C:\Users\brand\Desktop\PYTHON\NFL\NFLFANDUEL.csv")
optimizer.print_statistic()

GenerateLineupException: Can't generate lineups. Following constraints are not valid: min_games

@DimaKudosh
Copy link
Owner

You have an error in min_games constraint, dk tiers settings have configs that at least 2 games must be used. How many games are in your csv?

@lightninglarry
Copy link
Author

10 different games to choose from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants