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

Missing constraint #1

Closed
michael-quinlan opened this issue Oct 17, 2018 · 1 comment
Closed

Missing constraint #1

michael-quinlan opened this issue Oct 17, 2018 · 1 comment

Comments

@michael-quinlan
Copy link

michael-quinlan commented Oct 17, 2018

Your missing an important constraint (at least in the python code) that you can't use the same player twice. In your notebook example you will notice that Jared Cook was selected as both the TE and the FLEX (in the medium article it's DeSean Jackson as a WR and Flex).

Note: Maybe DraftKings supports the same player twice but that would be surprising as I've never seen any other platform support it.

@breeko
Copy link
Owner

breeko commented Oct 17, 2018

Thanks for bringing up. I did notice this and wrote my R code to reflect that constraint. I actually think the R implementation is a lot cleaner.

I updated my python code. I removed the part where I duplicated the players and increased the number of positions available for RB, WR and TE, and just imposed an additional constraint that says that the sum RB, WR and TE can be at most 5 (allowing for one flex)

@breeko breeko closed this as completed Oct 17, 2018
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