I'm gonna try to explain an idea the best way that I can with my english

How to measure each player we can do it on base a parameter which we can call it "benefit". This parameter can be calculated from the boxscore of each player as it is already done in some fantasy leagues, for example. So, for each player we've got their total benefit in a season, the benefit per game and minute. It is easy to select the best five players to start the game. The best five players with better benefit by minute respecting the structure of a basketball team. But ... the players has the bad habit of getting tired

Everything is clear, isn't it? So, what I want to do is to make an algorythm that select this five starter, this is easy, and the respective changes and when to do these changes, always getting the best benefit team on the floor. I have been thinking in doing a variation of knapsack algorythm, but right now I don't know how to do it. Maybe someone of you know a better algorythm or have any other idea to select the players or maybe you consider that this idea is useless.
All your comments are welcome!!!