Pathwise description of : supplier rule, dispatch formula, and the offsets of ordinary requests
ProvedOWMR.con_engineFix a network, an initial state , and consolidation choices with , and initial offsets in . Let , (supplier position), (request positions), (request sizes) and (cumulative FIFO allocation of each request) be any functions of the demand path that satisfy the explicit recursions of the statement: activation when all pipelines have arrived and every position is at most its target; if active and , else ; follows each retailer's rule; initial requests in the first active period and requests afterwards; and the part of the cumulative supplier arrivals by period beyond the requests ahead of , capped at . Then there are offsets , depending only on demands before period , such that along every demand path:
- the supplier order of in period is ;
- while active, the dispatch to retailer in period is , with the shipped quantity of Lemma C.3 at offset for batch retailers and the allocation itself for immediate retailers; before activation the only dispatch is the whole initial warehouse stock to the fixed retailer in period ;
- for every ordinary request of a batch retailer, is the deterministic rule
conRuleof Definition 2 applied to an engine state at creation and the request's index, and along any continuation of the demands the ideal allocation and ideal depletion of Lemma C.7 from equal and for .
So the realized policy is described by explicit processes, and its offsets are the deterministic rule evaluated on the explicit allocation paths.
import Definitions.Def_owmr_consolidation_policy open MeasureTheory open scoped ENNReal NNReal
namespace OWMR
theorem con_engine {n : ℕ} (N : Network n) (x : InitState n) (c : ConChoice n)
(hsS : ∀ i, c.s i ≤ c.S i) (hs0S : c.s0 ≤ c.S0)
(hθ0 : ∀ i, 0 < c.initOffset i ∧ c.initOffset i < 1)
(act : (ℕ → DemandVec n) → ℕ → Prop) [∀ d, DecidablePred (act d)]
(hact : ∀ d t, act d t ↔ (N.Tpipe - 1 + max 1 (N.L c.sendTo) ≤ t ∧ ∀ i,
x.I i + ∑ s ∈ Finset.range (N.L i), x.retPipe i s
+ (if i = c.sendTo then x.W + ∑ s ∈ Finset.range N.L0, x.supPipe s else 0)
- ∑ s ∈ Finset.range t, ((d s i : ℝ≥0) : ℝ) ≤ c.S i))
(Yp : (ℕ → DemandVec n) → ℕ → ℝ)
(hY0 : ∀ d, Yp d 0 = x.W + ∑ s ∈ Finset.range N.L0, x.supPipe s
+ ∑ i, (x.I i + ∑ s ∈ Finset.range (N.L i), x.retPipe i s - c.S i))
(hY : ∀ d t, Yp d (t + 1) = (if act d t ∧ Yp d t ≤ c.s0 then c.S0 else Yp d t)
- ∑ i, ((d t i : ℝ≥0) : ℝ))
(Ph : (ℕ → DemandVec n) → ℕ → Fin n → ℝ)
(hPh0 : ∀ d i, Ph d 0 i = c.S i)
(hPh : ∀ d t i, Ph d (t + 1) i = if act d t then
(if Ph d t i - ((d t i : ℝ≥0) : ℝ) ≤ c.s i then c.S i else Ph d t i - ((d t i : ℝ≥0) : ℝ))
else c.S i)
(q : (ℕ → DemandVec n) → ℕ → Fin n → ℝ)
(hq : ∀ d t i, q d t i = if act d t then
(if t = 0 ∨ ¬ act d (t - 1) then
c.S i - (x.I i + ∑ s ∈ Finset.range (N.L i), x.retPipe i s
+ (if i = c.sendTo then x.W + ∑ s ∈ Finset.range N.L0, x.supPipe s else 0)
- ∑ s ∈ Finset.range t, ((d s i : ℝ≥0) : ℝ))
else if Ph d (t - 1) i - ((d (t - 1) i : ℝ≥0) : ℝ) ≤ c.s i then
c.S i - (Ph d (t - 1) i - ((d (t - 1) i : ℝ≥0) : ℝ)) else 0)
else 0)
(A : (ℕ → DemandVec n) → ℕ → Fin n → ℕ → ℝ)
(hA : ∀ d s i t, A d s i t = max 0 (min (q d s i)
(∑ r ∈ Finset.range (t + 1 - N.L0), (if act d r ∧ Yp d r ≤ c.s0 then c.S0 - Yp d r else 0)
- (∑ r ∈ Finset.range s, ∑ j, q d r j + ∑ j ∈ Finset.univ.filter (· < i), q d s j)))) :
∃ θ : (ℕ → DemandVec n) → ℕ → Fin n → ℝ,
(∀ d s i, 0 < θ d s i ∧ θ d s i < 1) ∧
(∀ d d' s, (∀ r < s, d r = d' r) → ∀ i, θ d s i = θ d' s i) ∧
(∀ d t, (conPolicy N x c).order t d
= if act d t ∧ Yp d t ≤ c.s0 then c.S0 - Yp d t else 0) ∧
(∀ d t i, (conPolicy N x c).dispatch t d i = if act d t then
∑ s ∈ Finset.range (t + 1),
((if c.batch i then shippedPath (q d s i) (θ d s i) (fun k => A d s i (s + k)) (t - s)
else A d s i t)
- if s < t then (if c.batch i then
shippedPath (q d s i) (θ d s i) (fun k => A d s i (s + k)) (t - 1 - s)
else A d s i (t - 1)) else 0)
else if t = N.Tpipe - 1 ∧ i = c.sendTo then x.W + ∑ s ∈ Finset.range N.L0, x.supPipe s
else 0) ∧
(∀ d s i, 0 < s → act d (s - 1) → 0 < q d s i → c.batch i = true →
∃ σ : EngState n,
θ d s i = conRule N c σ s (∑ r ∈ Finset.range s,
(if 0 < r ∧ act d (r - 1) then
((List.finRange n).filter (fun j => decide (0 < q d r j))).length else 0)
+ ((List.finRange n).filter (fun j => decide (0 < q d s j))).idxOf i + 1) i (q d s i) ∧
∀ (ds : Fin N.L0 → DemandVec n) (k : ℕ), k ≤ N.L0 →
idealAlloc N c.params σ s i (q d s i) (padHist N.L0 ds) k = A d s i (s + k) ∧
idealDepletion N c.params σ s (padHist N.L0 ds) k
= ∑ j, (c.S j - Ph (fun r => if r < s then d r else padHist N.L0 ds (r - s)) (s + k) j)) := by sorry
end OWMR