BenBrostoff / draftfast

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

No Solution Found FD MVP Rule Set #203

Open aggiefury101 opened 8 months ago

aggiefury101 commented 8 months ago

Good Morning. When I try to run draftfast with the FD MVP ruleset I get the No solution found try adjusting your constraints, but everything is left open. I attached the salaries csv. Please let me know where I missed the mark and thanks for your help!

from draftfast import rules
from draftfast.optimize import run
from draftfast.csv_parse import salary_download

# Generate the player pool from a CSV file:
player_pool = salary_download.generate_players_from_csvs(
    salary_file_location="C:/Users/romahngr/Downloads/salaries (2).csv",
    game=rules.FAN_DUEL,  # Ensure the game is set to FanDuel
)

roster = run(
    rule_set=rules.FD_NFL_MVP_RULE_SET,  # Use the FanDuel MVP rule set
    player_pool=player_pool,
    verbose=True,
   )

print(roster)

# If you later decide to upload to FanDuel (this part wasn't provided in your example, but just in case you need it):
# from draftfast.csv_parse import uploaders

# uploader = uploaders.FanDuelNFLUploader(
#     pid_file='./your_pid_file.csv',
# )
# uploader.write_rosters([roster])
aggiefury101 commented 8 months ago

salaries (2).csv

BenBrostoff commented 8 months ago

Hey @aggiefury101 - have you tried looking at this test https://github.com/BenBrostoff/draftfast/blob/86947ff630624d938c9b20ba2d8ed416a8484e1c/draftfast/test/test_csv_parse.py#L44-L73 ? This is still passing and it would be helpful to know how your example is different from the test.