Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§4.1, (28)–(31) and (34): echelon stocks, coupling constraint and the supply chain with the modified demands

Definition
RobustInventory_SingleStation_Supplement_NetworkDynamics

by mikedeng1 · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

inventoryp2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1robust-optimizationsupply-chain

This file defines the stock dynamics of the tree network and the deterministic supply chain with modified demands. Let Dk(t)D_k(t)Dk​(t) be the order of echelon kkk to its only supplier.

The nominal echelon stock is Xˉk(t)=Xk(0)+∑τ<t[Dk(τ)−∑s∈O(k)Wˉs(τ)]\bar X_k(t)=X_k(0)+\sum_{\tau<t}[D_k(\tau)-\sum_{s\in O(k)}\bar W_s(\tau)]Xˉk​(t)=Xk​(0)+∑τ<t​[Dk​(τ)−∑s∈O(k)​Wˉs​(τ)]. An order array is feasible if Dk(t)≥0D_k(t)\ge0Dk​(t)≥0 for every echelon and period, plant links included, and, for every installation kkk that is not a sink,

∑i∈N(k)Di(t)≤Xˉk(t)−∑i∈N(k)Xˉi(t).\sum_{i\in N(k)}D_i(t)\le\bar X_k(t)-\sum_{i\in N(k)}\bar X_i(t).i∈N(k)∑​Di​(t)≤Xˉk​(t)−i∈N(k)∑​Xˉi​(t).

The right-hand side is the stock on hand of installation kkk. It does not depend on demand, and this constraint makes it nonnegative.

With As(t)A_s(t)As​(t) the value of LP (13) at sink sss, echelon kkk sees at sink sss the modified demand (34)

Ws,k′(t)=Wˉs(t)+pk−hkpk+hk (As(t)−As(t−1)),W'_{s,k}(t)=\bar W_s(t)+\frac{p_k-h_k}{p_k+h_k}\,(A_s(t)-A_s(t-1)),Ws,k′​(t)=Wˉs​(t)+pk​+hk​pk​−hk​​(As​(t)−As​(t−1)),

and its modified stock is Xk′(t)=Xk(0)+∑τ<t[Dk(τ)−∑s∈O(k)Ws,k′(τ)]X'_k(t)=X_k(0)+\sum_{\tau<t}[D_k(\tau)-\sum_{s\in O(k)}W'_{s,k}(\tau)]Xk′​(t)=Xk​(0)+∑τ<t​[Dk​(τ)−∑s∈O(k)​Ws,k′​(τ)]. The modified supply chain minimizes ∑t<T∑k[Ck(Dk(t))+Rk(Xk′(t+1))]\sum_{t<T}\sum_{k}[C_k(D_k(t))+R_k(X'_k(t+1))]∑t<T​∑k​[Ck​(Dk​(t))+Rk​(Xk′​(t+1))] over the feasible order arrays.

Formalization Note Constraint (31) is not imposed at a sink, where its empty left side would forbid the backlog that §4.1 allows. It is written with Xˉ\bar XXˉ as printed, also in the modified supply chain: substituting X′X'X′ would change the physical stock on hand, because the modification depends on the echelon.

Definition code
import Definitions.Def_RobustInventory_SingleStation_Supplement_Network

namespace RobustInventory.SingleStation.Supplement.Network

open Finset

variable (G : Network)

/-- The nominal stock `X̄_k(t)` of echelon `k` at the beginning of period `t`, as below (31):
`X_k(0) + ∑_{τ<t} (D_k(τ) - ∑_{s ∈ O(k)} W̄_s(τ))`. Here `D k τ` is the order `D_{i_k k}(τ)` of
echelon `k` to its only supplier. -/
noncomputable def Xbar (D : Fin G.N → ℕ → ℝ) (k : Fin G.N) (t : ℕ) : ℝ :=
  G.X0 k + ∑ τ ∈ Finset.range t, (D k τ - ∑ s ∈ G.tree.sinksBelow k, G.Wbar s τ)

/-- The constraints of (32) on the orders alone: `D ≥ 0`, plant links included, and, for every
installation `k` that is not a sink, the coupling constraint (31)
`∑_{i ∈ N(k)} D_ki(t) ≤ X̄_k(t) - ∑_{i ∈ N(k)} X̄_i(t)`. A sink may backlog, so (31) is not
imposed on it. -/
def OrdersFeasible (D : Fin G.N → ℕ → ℝ) : Prop :=
  (∀ i, ∀ t < G.T, 0 ≤ D i t) ∧
    ∀ k, ¬ G.tree.IsSink k → ∀ t < G.T,
      ∑ i ∈ G.tree.children k, D i t ≤ G.Xbar D k t - ∑ i ∈ G.tree.children k, G.Xbar D i t

/-- (34): the modified demand `W'_{s,k}(t)` that echelon `k` sees at sink `s`. -/
noncomputable def Wmod (s k : Fin G.N) (t : ℕ) : ℝ :=
  G.Wbar s t + (G.p k - G.h k) / (G.p k + G.h k) * (G.A s t - G.Aprev s t)

/-- The modified stock `X'_k(t) = X_k(0) + ∑_{τ<t} (D_k(τ) - ∑_{s ∈ O(k)} W'_{s,k}(τ))`. -/
noncomputable def Xmod (D : Fin G.N → ℕ → ℝ) (k : Fin G.N) (t : ℕ) : ℝ :=
  G.X0 k + ∑ τ ∈ Finset.range t, (D k τ - ∑ s ∈ G.tree.sinksBelow k, G.Wmod s k τ)

/-- The cost of the deterministic supply chain with the modified demands (34):
`∑_t ∑_k (C_k(D_k(t)) + max(h_k X'_k(t+1), -p_k X'_k(t+1)))`, over all `N` echelons. -/
noncomputable def modifiedCost (D : Fin G.N → ℕ → ℝ) : ℝ :=
  ∑ t ∈ Finset.range G.T, ∑ k, (G.C k (D k t) + G.R k (G.Xmod D k (t + 1)))

/-- A global minimizer of the deterministic supply chain with the modified demands (34), under
the order constraints of (32). These constraints do not depend on the demand. -/
def IsModifiedOptimal (D : Fin G.N → ℕ → ℝ) : Prop :=
  G.OrdersFeasible D ∧ ∀ D', G.OrdersFeasible D' → G.modifiedCost D ≤ G.modifiedCost D'

end RobustInventory.SingleStation.Supplement.Network
Source
Bertsimas, Thiele, A Robust Optimization Approach to Inventory Theory, Operations Research 54(1):150–168 (2006), p. 157 (PDF 8), Eqs. (28)–(31); p. 158 (PDF 9), Eq. (34)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me