Optimizing generic dispensing rate