Dynamic lot size model