Message Boards Message Boards

0
|
4743 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Maximization problems and list operation

Posted 9 years ago

I've made a post about CFB fantasy football maximization problem a few days ago, and since then I've managed to import the csv into the mathematica as an array.

And now I'm having problems learning to operate on the lists that form the imported array.

The array has the following form.

{"players", "FPPG", "Salary", "Position", "qb", "wr", "rb", "te", "play", "Played", "ffpg/$", "Team", "Opponent"} ... {"Greg Ward Jr.", 40.5, 10300, "QB", 1, "", "", "", 1, 5, 3.93, "HOU", "TLANE"}

Players are football players, FPPG is the fantasy football point they accumulate per game. The sum of FFPG for 1 qb, 3 WRS, 2 RBs, and 1 TE is what need to be maximized.

And there are 129 rows of those player stats (meaning 129 players to consider)

If I were to transpose them, I can get the lists I need to then dot product and then write a function that I can use the Maximize to optimize. That was I get two lists I need from the excel.. The name list, and the FFPG list, when dot producted, should yield the sum of their fantasy points. Here inlies the problem.

There are a few things I need to accomplish.

1.. I need to find a way to only pick 1 QB, 3 WRs, 2 RBs, and 1 TE based on the imported excel csv list at a time. This need to be repeated over the list but picking different players each time, as to maximize the dot product of the the fantasy points. It has to be imported from the excel, because the players changes every week, and the number of players in each position varies each week.

  1. I then need to make sure the sum of their salary stays under 45000 dollars. The combinations that fail this criteria don't need to be summed.

Then it's just a maximization problem for mathematica to handle.

I'm attaching the excel as well as my nb to show how far I've gotten. Some help will be great.

Attachments:
POSTED BY: bored dude
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract