Ordinary base-stock average lost sales and overlapping demand scans
DefinitionCappedBaseStock_BaseStockAnalysisLet demand be i.i.d., nonnegative, with finite positive mean, and let the lead time be an integer . Use the inventory dynamics and empty initial state of the CappedBaseStock model. For ordinary base stock at level , let denote lost sales. Define its long-run expected average lost sales by
For a nonnegative demand path , define the scan over the overlapping demand windows of length by
The scan uses exactly the coordinates . Its stock threshold may be any real number; the policy level itself is nonnegative. These definitions separate the demand-only overload quantity from the actual policy's lost sales and support the ordinary-base-stock cost analysis.
Formalization Note Expectations and the limsup average loss take values in the extended nonnegative reals. baseStockAverageLoss uses the original model's averageCost operator and its same zero-start trajectory, with lost sales replacing monetary period cost. This definition file asserts no stationarity, convergence, or inequality.
import Definitions.Def_CappedBaseStock_Model
noncomputable section
open MeasureTheory Filter
open scoped ENNReal NNReal BigOperators
namespace CappedBaseStock
/-- Expected average lost sales of the ordinary base-stock rule, measured by
the same zero-start Cesaro limsup as the original cost objective. -/
def baseStockAverageLoss (P : DemandLaw) (c : Parameters) (S : ℝ≥0) : ℝ≥0∞ :=
averageCost P (fun t ω =>
(lostSales c (cbsRun c S S ω t) (ω.1 t) : ℝ≥0∞))
/-- The largest total demand in the L+1 overlapping windows of length L+1
inside a block of 2L+1 demands. -/
def scanDemand (d : DemandPath) (L : ℕ) : ℝ :=
(Finset.range (L + 1)).sup' (by simp) (fun j =>
∑ i ∈ Finset.range (L + 1), (d (j + i) : ℝ))
/-- Positive overload of the demand scan above a real stock level. -/
def scanExcess (d : DemandPath) (L : ℕ) (S : ℝ) : ℝ≥0∞ :=
ENNReal.ofReal (scanDemand d L - S)
end CappedBaseStock