Closed chrisbach1 closed 1 year ago
Anything will help. I have been trying to solve this issue for a few days and I'm starting to pull my hair out.
this is what I am trying to do:
optimizer.restrict_positions_for_same_team(('PG', 'PG')) optimizer.restrict_positions_for_same_team(('PF', 'PF')) optimizer.restrict_positions_for_same_team(('SG', 'SG'))
But once I add another position, it ignores the previous
If trying this on DraftKings you will probably have to include the alternate positions as well such as optimizer.restrict_positions_for_same_team(('PG', 'PG', 'PG/SG')) optimizer.restrict_positions_for_same_team(('PF', 'PF', 'PF/C')) and so forth but someone who has more knowledge than me could possibly explain it better
Thanks for your reply @Milkman9691
Unfortunately I have tried that before and it did not work. I mainly use Fanduel. That code generates an error. PG/SG does not work as a position name. It has to be ('PG', 'PG) and you cannot have 3 values in parenthesis
I would just restrict by name myself but if you are looking for an advantage though you need to build yourself a spreadsheet that you can reference players Floors & Ceilings along with that days salary value being I think I have attempted every positional strategy known to DFS and did not have much success doing so
optimizer.restrict_positions_for_same_team(('PG', 'PG'),('SG',
'SG'))
Check to see if this works for you
On Thu, Dec 29, 2022 at 7:10 PM G Dub D @.***> wrote:
I would just restrict by name myself but if you are looking for an advantage though you need to build yourself a spreadsheet that you can reference players Floors & Ceilings along with that days salary value being I think I have attempted every positional strategy known to DFS and did not have much success doing so
— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/397#issuecomment-1367649185, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7SATFMNZGXCUT2QHRDWPYR65ANCNFSM6AAAAAATKZKNMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
--
ĵÖȘΈΦΗ
That works if I only use that restriction. But if my code looks like this, it cancels out the PG SG restriction.
optimizer.restrict_positions_for_same_team(('PG', 'PG'),('SG','SG')) optimizer.restrict_positions_for_same_team(('SF', 'SF'),('PF','PF'))
@Denwen12
optimizer.restrict_positions_for_same_team(('PG', 'PG'),('SG','SG'),('SF', 'SF'),('PF','PF'))
This worked
Your welcome, you could probably use a loop to make it work also
On Thu, Dec 29, 2022, 10:49 PM Chris Bachmann @.***> wrote:
Closed #397 https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/397 as completed.
— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/397#event-8128882622, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7TPJERSNCEVTI3QJETWPZLUZANCNFSM6AAAAAATKZKNMY . You are receiving this because you were mentioned.Message ID: @.*** .com>
Or you could of the edited the rule to have 3 str in the ()
On Fri, Dec 30, 2022, 12:25 AM joseph offen @.***> wrote:
Your welcome, you could probably use a loop to make it work also
On Thu, Dec 29, 2022, 10:49 PM Chris Bachmann @.***> wrote:
Closed #397 https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/397 as completed.
— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/397#event-8128882622, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7TPJERSNCEVTI3QJETWPZLUZANCNFSM6AAAAAATKZKNMY . You are receiving this because you were mentioned.Message ID: <DimaKudosh/pydfs-lineup-optimizer/issue/397/issue_event/8128882622@ github.com>
Hi all,
I have been having an issue trying to get the optimizer to not put 2 positions from the same team in a lineup. I have tried this:
optimizer.restrict_positions_for_same_team(('PG', 'PG'))
Does it not work because a player can be multiple positions technically? Jordan Poole can be a PG/SG. Is there anyway for it to work?