Optimizing cab allocation