i split the last post in half - begin extended rambling:
on the first part, i believe it basically will try to find a set of 5 players such that they all are under the fatigue limit where they'd sub out. if you have the 5 guys who are dead last on the chart, and all 5 are barely under the fatigue limit, while all 5 starters are barely over the limit, i believe it will play the 5 subs. i do not think there is a balancing of factors, like you might expect.
on the second part, what that means is that if a guy is the starter, he basically gets a value of 1 - line 2 gets a value of 2, and so on. if you play 5 starters, the depth chart total is 5. if you play 5 guys on the 2nd line, your depth chart total is 10. the game tries to find the minimum depth chart total, breaking ties from left to right (from the 1 to the 5). this tie breaker is quite important and is the #1 reason i wish we could get a 5th line on the depth chart (for some reason nobody else seems to care about this, but its been my #1 ask for team setup control for almost 10 years now. come on people, get on board! maybe we'll get it in 10 more years if people really start asking for it now! i'd like to be able to have 6-7 lines but i figure that is out)
anyway, i call it 'depth chart math', i don't know if there is really a name, but it is a *very* important part of this game, to do the depth chart math (luckily its all adding little whole numbers, its really easy math wise). there are so many cases where fine tuning a rotation is incredibly valuable, its one of the couple things, along with getting the distro right, that really separates the great teams from the elite ones.
dahs gives a good example, but i want to reverse it to match an ultra-common and important real world case that folks screw up all the time (north of 50%??). let's say you have 4 players, 2 starter seniors (SR), a soph sub who is a good passer and you are OK playing PG (SO), and a sub who is a **** passer freshman and would wreck you at PG (where pass/iq is so important) (FR). let's suppose the soph is significantly better than the fr overall as a guard, but is way better as a PG
what do you do? many folks will punt - say well its TOO important for SO to play PG, so i'll do this -
PG - SR, SO, FR
SG - SR, FR, SO
this is a mistake 95% of the time - you can fairly safely play the SO over the FR at SG as follows:
PG - SR, SO, ---, FR
SG - SR, SO, FR, ----
the consequence of this is as follows: if the two SR are tired, the SO will play at PG, the FR at SG (because SO/FR lineup is 2 + 3 = 5; FR/SO lineup is 4+2 = 6, so 5 is less and the engine picks it).
if only 1 SR is tired, it will always play the SO over the FR.
even if both SR and the SO is tired, the engine still has to play 2 players - so what will happen is the PG1 will play and the FR will play SG, because 1+3 is less than 4+1 (FR at PG and SG1 playing) - assuming the PG1 and SG1 are equally tired.
the only downside is this - if only 1 SR is tired AND its the PG1 AND the SO is tired, then the SG1 will play with the FR at PG. in higher fatigue sets and/or with higher stamina SG1 than PG1, this can happen with non-negligible odds. if your SO is higher sta, you are pretty much protected, but that isn't always the case. so there are some cases - especially in higher fatigue sets - where i'd go the route of the folks who punt, listed above.