Optimizing economic order quantity