BenBrostoff / draftfast

A tool to automate and optimize DraftKings and FanDuel lineup construction.
278 stars 113 forks source link

No solution found #137

Closed dimitry-ishenko closed 5 years ago

dimitry-ishenko commented 5 years ago

Total newb here. Tried to run your tool and got the above error message. Here's the link with downloaded salaries.csv file: https://repl.it/@dimitry_ishenko/no-workie

Am I doing something wrong?

BenBrostoff commented 5 years ago

@dimitry-ishenko You need to add the NHL rules to the ruleset arg in salary_download.generate_players_from_csvs - this unfortunately is undocumented :-(. Here's a repl.it with the fix. Let me look into a way to change this behavior more obvious or somehow document it.

dimitry-ishenko commented 5 years ago

@BenBrostoff oh that's a pretty simple fix. Maybe just throw and exception if the ruleset is not defined?

BenBrostoff commented 5 years ago

Definitely, I can go that route 👍

malpaso commented 5 years ago

I've added a different sport & site and I'm using the run_multi() and it's returning 'No solution found'. I'm finding it really hard to diagnose why. I have the NBA working for the same site. The projections and salary files are identical in structure. At a loss to find out what the solver is 'seeing'... @BenBrostoff Any ideas on how I can better debug this?

BenBrostoff commented 5 years ago

@malpaso Just to be clear, is this working for run and not run_multi? If so it's possible there is a bug. If not, I would recommend creating the smallest example possible using manually created Players (with the number of players equal to the roster size). I'm not saying the bug is with the CSV ingestion but if we do this first we can at least rule it out. It would also help if you could post your branch with the No solution example case and I can take a look.

malpaso commented 5 years ago

@BenBrostoff Thanks for replying Ben. Here is the branch on my fork with the changes. I'm getting 'no solution found' for run as well. https://github.com/malpaso/draftfast/tree/aus

BenBrostoff commented 5 years ago

@malpaso Got this to work on repl.it - see link here. I think your issue may have been using general_position_limits. This is meant for sports where players can have position designations that cover multiple positions (ex. a SF or a PF are both F).

BenBrostoff commented 5 years ago

Closing this since we're now throwing on missing rulesets and this issue was related to a bad param.