BenBrostoff / draftfast

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

With DK NFL Rules Set I got 3 RBs #168

Closed jpmorgenthal closed 3 years ago

jpmorgenthal commented 3 years ago

+----------+-------------------+------+-------------------------------+--------+------------+----------+--------+ | Position | Player | Team | Matchup | Salary | Projection | vs. Avg. | Locked | +----------+-------------------+------+-------------------------------+--------+------------+----------+--------+ | QB | Russell Wilson | SEA | DAL@SEA 09/27/2020 04:25PM ET | 7,300 | 34.6 | 0.00 | | | RB | Jonathan Taylor | IND | NYJ@IND 09/27/2020 04:05PM ET | 7,000 | 18.45 | 0.00 | | | RB | Chris Carson | SEA | DAL@SEA 09/27/2020 04:25PM ET | 6,600 | 22.2 | 0.00 | | | RB | Leonard Fournette | TB | TB@DEN 09/27/2020 04:25PM ET | 6,200 | 16.75 | 0.00 | | | WR | Mike Evans | TB | TB@DEN 09/27/2020 04:25PM ET | 6,700 | 16.8 | 0.00 | | | WR | Robby Anderson | CAR | CAR@LAC 09/27/2020 04:05PM ET | 5,200 | 25.15 | 0.00 | | | WR | KJ Hamler | DEN | TB@DEN 09/27/2020 04:25PM ET | 3,000 | 8.7 | 0.00 | | | TE | Mo Alie-Cox | IND | NYJ@IND 09/27/2020 04:05PM ET | 3,800 | 11.55 | 0.00 | | | DST | Colts | IND | NYJ@IND 09/27/2020 04:05PM ET | 4,100 | 9.5 | 0.00 | | +----------+-------------------+------+-------------------------------+--------+------------+----------+--------+

roster = run( rule_set=rules.DK_NFL_RULE_SET, player_pool=players, verbose=True, optimizer_settings=OptimizerSettings( stacks=[ Stack(team='IND', count=3), Stack(team='TB', count=2), ] ),
constraints=LineupConstraints(

locked=['Austin Eckler', 'Russell Wilson', 'Tyler Lockett'],

    banned=['Nyheim Hines', 'Christian McCaffrey', 'Jets', 'Jamison Crowder', 'Melvin Gordon III','Scotty Miller'],
)

)

BenBrostoff commented 3 years ago

Is this not a valid lineup? I get this could be confusing because FLEX isn't explicitly marked.

jpmorgenthal commented 3 years ago

Sorry, I thought I typed this up, but didn't think I submitted. It is valid. Just not used to seeing it in this format for DK QB, RB, RB, WR, WR, WR, TE, FLEX, DST

So, I got thrown off. I thought I just exited without submitting this. Sorry

BenBrostoff commented 3 years ago

No problem! Let me know if you see any issues