I have all of my airforce on auto upgrade but never seem to see the squadron upgrade - I have over 1k Lagg plus good numbers of Mig-3, La etc but still have a screen full of I-153 - they have 2 wings and 2 wings in not better than !! (and don't get me started on I-16 numbers).

Yeah, common complaint. What happens is that aircraft without an upgrade path tend to stagnate as long as there are still spares of the obselete type in the pool. On auto upgrade, they'll eventually switch but it'll be a long time. There is an unofficial scenario mod in the mod forum that fixes this. Otherwise, you'll have to do it manually.

I normally will do one air group per turn. Not a significant AP hit and it spreads things out. I can send them to the Air Reseve at the same time to train them up. By mid 1942 everything is upgraded at least from the early I153 etc series and have a good corps of re-equiped and trained fighter groups.

Would setting replacements to not allowed for such groups help? I'm experimenting with that. I read in the manual that groups below half strength update faster, so that would seem logical to block them from recieving replacements while still on older planes.

They will upgrade, don't worry. I wanted to micromanage and I guess almost all the airgroups were on manual mode. I cannot even remember when I did that I guess it was after drinking a bottle of absinthe, I thought there would always be APs for everyone and everything. Er... I was utterly wrong!

And then I was complaining about my planes not upgrading! Then --like 10 turns ago-- I put the lot of them on automatic again (via the commander's menu thing) and on the next turns tons and tons and tons of air groups upgraded. So yes, it works.

Just don't do the mistake I did. Oh well, unless you are an absinthe aficionado...

The most decisive factor is the amount of planes in the pool - it should be less than 200. New plane should either have 4x of original in pool or there should be 300 or more planes in the pool.

Another factor mentioned above it should be below 50% to swap out to pass the roll. If you still have plenty of old airframes and your air force is in National Reserve it won't swap out. This is intentional and shouldn't be a problem if your air force is taking losses. Otherwise you always can spend AP and manually upgrade them.

Why aren't the I series made obsolete? They don't have factories so it's not a concern, and maybe that would help the AI to get rid of them even if the pool is still large? All I know I don't want to waste high morale pilots on flying crap if new machines are waiting.

The most decisive factor is the amount of planes in the pool - it should be less than 200. New plane should either have 4x of original in pool or there should be 300 or more planes in the pool.

Ouch, such algorithm will almost never use the less-produced planes like P-47 or some Yaks. If I were allowed to code this I would do something like this:

for every plane model skip planes with start year before 1941 find out air groups using such plane and calculate the maximum number of planes these groups may use (A) and current number of planes used (B) take the number of planes in the pool, substract the number of planes needed to fill existing air groups (A-B), and substract again 20% of A if the number of "free planes" calculated above is above max single airgroup size (20 for the Soviets), add the plane to the possible upgrade list

sort the possible upgrade list by 1) produced planes first, not produced planes second 2) higher year and month of start of production first 3) higher year and month of end of production first 2) higher number of free planes first

then

for every air group set to auto upgrade, randomly select 20% of them and calculate score add 3.0 if the plane used is not produced calculate normalized score from morale (100=1.0...0=0.0) and add to total calculate normalized score from experience and add to total calculate normalized score from (max planes-total planes)/max planes (for example 4 planes in a 20 plane unit would give 16/20=0.8) and add to total add the air group to upgrade list

sort the upgrade list by score (highest first)

for every air group on the list (starting from the first) find out (starting from the first plane model on the possible upgrade list) whether there is a correct plane model available for upgrade (Ftr/FB for FB trained as Fighters, TacB for TacB and FB trained as Bombers, for the rest keep the same type) and if there is enough free planes available - perform the upgrade, and reduce the number of free planes for that specific model; proceed to next air group

That way the AI would work similarily to player, and upgrade air groups that needs it most (old planes, low number) and deserves most (high morale and experience) to the newest planes that have relatively high number of "free" planes in the pool.

To improve the process more ideas: Drop bottom 80% air groups from the list, after finding out the score for all groups. Players also upgrade most worthy/in need units first.

If the list is short do not drop 80%, leave at least x air groups on it (5, 10, 20)

Do not consider upgrading air groups with planes still in production, that have enough "free planes", so those which are on the possible upgrade list. That will prevent units switching planes back and forth if on current model, while it will still allow to react if the pool will get too low (for example when factories are evacuated and the production can't keep with the losses).

Whatever swpping rules, hope they follow historical patterns, or something simple to understand. Best equipment available when available to best units. Keeping in mind that game does not allow cherry-picking ground unit assignments, similar technique for aircraft makes sense.