the only considerations are:
1. Full fare ticket (no concession)
2. Higher class should have vacant seats & booked class ahould have RAC or WL.
3. Either all pax on PNR will be upgraded or none on the PNR.
...
more... Rest algorithms are random, just like lottery, only these 3 are taken into consideration, nothing else.