Hi, I just downloaded the free edition of ALGLIB for C#
The problem I'm trying to solve is optimizing a baseball team lineup.
I have lists of players for each position. Pitcher, Catcher, 1st base, 2nd base, 3rd base, short stop, and 3 outfielders.
Each player has a expected points value for the next game, and a salary.
The goal of the optimization is to find the best lineup = highest sum of expected points for all players on the lineup. The lineup has to meet a salary cap constraint (total salary of all players on lineup below a max constant value, ie 50000)
There also is a limitation to the number of players that can be picked from the same team, excluding the pitcher. For example 3 players max from the same team excluding the pitcher.
I originally attempted to do this by brute force, by nested loops to generate all lineup combinations and determine the top lineups. However, because I have 9 players, and can have over 50 players per position, I end up with between a quadrillion and quintillion combinations, so exhaustive search is not possible.
Can someone point me towards the appropriate package to use for this problem?
|