-
Notifications
You must be signed in to change notification settings - Fork 113
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
NFL FD: Try adjusting your query by taking away constraints #198
Comments
Do you mind attaching the CSVs you’re using? I can take a look and work on
debugging
…On Tue, Sep 20, 2022 at 6:12 PM c0inigr ***@***.***> wrote:
Running into No Solution found on the output when I use the below usage -
what am I missing?
from os import environ
from draftfast import rules
from draftfast.optimize import run_multi
from draftfast.csv_parse import salary_download, uploaders
players = salary_download.generate_players_from_csvs(
salary_file_location='./NFL_SALS.csv',
projection_file_location='./NFL_PROJECTIONS.csv',
game=rules.FAN_DUEL,)
rosters, _ = run_multi(
iterations=3,
rule_set=rules.FD_NFL_RULE_SET,
player_pool=players,
verbose=True
)
Output:
_No solution found.
Try adjusting your query by taking away constraints.
OPTIMIZER CONSTRAINTS:
Min teams: 2
LINEUP CONSTRAINTS:
None
PLAYER POOL SETTINGS:
None
PLAYER COUNT: 1602_
—
Reply to this email directly, view it on GitHub
<#198>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVK35DUARMDT4CQY634L5DV7IZFZANCNFSM6AAAAAAQRP5IXU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Here you go, thanks for looking into this. |
Thank you, will take a look
…On Tue, Sep 20, 2022 at 6:47 PM c0inigr ***@***.***> wrote:
NFL_PROJECTIONS.csv
<https://github.com/BenBrostoff/draftfast/files/9611681/NFL_PROJECTIONS.csv>
NFL_SALS.csv
<https://github.com/BenBrostoff/draftfast/files/9611682/NFL_SALS.csv>
—
Reply to this email directly, view it on GitHub
<#198 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVK35DEFFME2ODYQ2I57ZLV7I5JPANCNFSM6AAAAAAQRP5IXU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I can repro; it looks like there are a few issues here that require a library update (1 - DEF not in lookup dict for FD, 2 - FLEX not an ordered position), should be able to get to it this week. In the short term, you can modify the positions to get this to work (issue is that from os import environ
from draftfast.orm import NFLRoster
from draftfast import rules
from draftfast.optimize import run
from draftfast.csv_parse import salary_download
POSITION_ORDER = {
'QB': 0,
'RB': 1,
'WR': 2,
'TE': 3,
'DST': 4,
'D': 5,
'FLEX': 6
}
def sorted_players(self):
return sorted(
self.players,
key=lambda p: POSITION_ORDER[p.pos]
)
NFLRoster.sorted_players = sorted_players
players = salary_download.generate_players_from_csvs(
salary_file_location='./NFL_SALS.csv',
projection_file_location='./NFL_PROJECTIONS.csv',
game=rules.FAN_DUEL
)
for x in players:
if x.pos == 'DEF':
x.pos = 'D'
roster = run(
rule_set=rules.FD_NFL_RULE_SET,
player_pool=players,
verbose=True
) The above works for me and I think in the short term will allow you to generate lineups. |
Thank you so much, this will get me going |
Running into No Solution found on the output when I use the below usage - what am I missing?
from os import environ
from draftfast import rules
from draftfast.optimize import run_multi
from draftfast.csv_parse import salary_download, uploaders
players = salary_download.generate_players_from_csvs(
salary_file_location='./NFL_SALS.csv',
projection_file_location='./NFL_PROJECTIONS.csv',
game=rules.FAN_DUEL,)
rosters, _ = run_multi(
iterations=3,
rule_set=rules.FD_NFL_RULE_SET,
player_pool=players,
verbose=True
)
Output:
_No solution found.
Try adjusting your query by taking away constraints.
OPTIMIZER CONSTRAINTS:
Min teams: 2
LINEUP CONSTRAINTS:
None
PLAYER POOL SETTINGS:
None
PLAYER COUNT: 1602_
The text was updated successfully, but these errors were encountered: