Fantasy Football Optimization in R
Join Date: Feb 2008
Posts: 9,082
I am still working on this. I've gotten it much faster by breaking the loop up a bit.
I've also been able to tweak it so it just makes optimal teams that don't match previous teams.
Can get the best 10k teams in just a few minutes now. Then I can use that pool to pick my best X teams based on different player exposure levels I want to have.
Join Date: Feb 2015
Posts: 4,460
Re: decimal places
Afaik, rglpk finds one and only one optimal solution. Removing granularity with rounding would make it more likely you miss equally good solutions with the "less than last optimal" loop.
Join Date: Feb 2008
Posts: 9,082
Yeah I was a bit surprised to see how many lineups can be made that have the same projection.
Now I get rglpk to find the optimal lineup, then use that optimal lineup vector as a constraint to find the next team. Since I need 6 golfers on each team I just make sure that vector is less than or equal to 5.