Determine lot priority as function of sum of queue and processing time