Optimal Policies for Inventory Systems with a Generalized Cost Model