DimaKudosh / pydfs-lineup-optimizer

Daily Fantasy Sports lineup optimzer for all popular daily fantasy sports sites
MIT License
424 stars 157 forks source link

Team exposure but leave out a position #425

Open chrisbach1 opened 7 months ago

chrisbach1 commented 7 months ago

Anyone know if its possible to set a max team exposure but exclude a position from it? For instance if I wanted to exclude Pitchers?

Thanks!

Milkman9691 commented 7 months ago

Not sure exactly what you are asking but here is a possible idea

optimizer.add_stack(TeamStack(5, for_teams=['MIN'], for_positions=['1B', '2B', '3B', 'OF', 'SS','C'], max_exposure_per_team={'MIN': 0.6}))

Unlike when doing the opposing restrictions you only have to use the basic positions for these

chrisbach1 commented 7 months ago

So this will provide the max exposure for Minnesota for the positions '1B', '2B', '3B', 'OF', 'SS','C' ?

Milkman9691 commented 7 months ago

So this will provide the max exposure for Minnesota for the positions '1B', '2B', '3B', 'OF', 'SS','C' ?

That will give you 0.6 max exposure in your lineups for MIN yes. If you was playing 20 lineups 12 of them would have 5 MIN players for the listed positions