Queue Priority Formula