Lemma 3.1(c), (15)–(16): ordering times , lengths , indices and thresholds ,
DefinitionRobustInventory_SingleStation_Supplement_Thresholdsinventoryp2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1robust-optimization
This file defines the quantities in the closed-form thresholds of Lemma 3.1(c), for the single-station model with initial stock , horizon , unit ordering cost , holding cost and shortage cost , and a demand sequence .
For an order sequence , the ordering times are exactly the periods with ; by convention . Put
The thresholds (15) and (16) are
The file also defines the stock before ordering in period , .
The same formulas are used at the nominal demand in Lemma 3.1(c) and at the modified demand in Theorem 3.2(c).
Formalization Note The index runs over , and is allowed. Empty sums are zero. On ordering times one has , so the numerator in is positive (as ) and the natural-number floor is the integer floor.
Definition code
import Definitions.Def_RobustInventory_SingleStation_Model
namespace RobustInventory.SingleStation.Supplement
open Finset
/-- `t 1 < t 2 < … < t J` are exactly the periods `k < T` with `u_k > 0`, and `t (J + 1) = T`
(the convention of the proof of Lemma 3.1(c), p. 155). Indices `j` run over `1, …, J`; the other
values of `t` are never used. -/
def IsOrderingTimes (T : ℕ) (u : ℕ → ℝ) (J : ℕ) (t : ℕ → ℕ) : Prop :=
t (J + 1) = T ∧
(∀ j ∈ Finset.Icc 1 J, t j < t (j + 1)) ∧
∀ k, (k < T ∧ 0 < u k) ↔ ∃ j ∈ Finset.Icc 1 J, t j = k
/-- `L_j = t_{j+1} - t_j`; on ordering times this difference is positive for `1 ≤ j ≤ J`. -/
def intervalLength (t : ℕ → ℕ) (j : ℕ) : ℕ := t (j + 1) - t j
/-- `I_j = ⌊(p L_j - c 1_{j = J}) / (h + p)⌋`. On ordering times and for `1 ≤ j ≤ J` the
numerator is positive (`L_j ≥ 1`, `p > c`), so the natural floor is the integer floor. -/
noncomputable def floorIndex (M : Model) (J : ℕ) (t : ℕ → ℕ) (j : ℕ) : ℕ :=
⌊(M.p * (intervalLength t j : ℝ) - (if j = J then M.c else 0)) / (M.h + M.p)⌋₊
/-- (15): `S_j = ∑_{i=0}^{I_j} w_{t_j + i}`, for the demand sequence `w`. -/
noncomputable def upperThreshold (M : Model) (w : ℕ → ℝ) (J : ℕ) (t : ℕ → ℕ) (j : ℕ) : ℝ :=
∑ i ∈ Finset.range (floorIndex M J t j + 1), w (t j + i)
/-- (16): `s_1 = x₀ - ∑_{i=0}^{t_1 - 1} w_i` and, for `j ≥ 2`,
`s_j = -∑_{i = I_{j-1} + 1}^{L_{j-1} - 1} w_{t_{j-1} + i}` (empty sums are zero). -/
noncomputable def lowerThreshold (M : Model) (w : ℕ → ℝ) (J : ℕ) (t : ℕ → ℕ) (j : ℕ) : ℝ :=
if j = 1 then M.x0 - ∑ i ∈ Finset.range (t 1), w i
else -∑ i ∈ Finset.Ico (floorIndex M J t (j - 1) + 1) (intervalLength t (j - 1)),
w (t (j - 1) + i)
/-- The stock `x_k = x₀ + ∑_{i<k} (u_i - w_i)` at the beginning of period `k`, before ordering. -/
def stockBefore (M : Model) (w u : ℕ → ℝ) (k : ℕ) : ℝ :=
M.x0 + ∑ i ∈ Finset.range k, (u i - w i)
end RobustInventory.SingleStation.Supplement
Source
Bertsimas, Thiele, A Robust Optimization Approach to Inventory Theory, Operations Research 54(1):150–168 (2006), pp. 154–155 (PDF 5–6), Lemma 3.1(c), Eqs. (15)–(16), and the conventions of its proof