Algorithm 2 — the rate-limited elevated flow relaxation and its scaled output
DefinitionSharedVehicleApprox_Pricing_Supplement_Algorithm2approximation-ratioclosed-queueing-networkp2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1pricingshared-vehicle-systems
Algorithm 2 first finds an optimum of
It then outputs, for the scaling parameter ,
The definitions give feasibility, optimality of step 1 and the output of step 2, which state Theorem 18.
Definition code
import Mathlib
import Definitions.Def_QueueingFundamentals_Networks_ClosedJackson
import Definitions.Def_SharedVehicleApprox_Pricing_Model
namespace SharedVehicleApprox.Pricing.Supplement
open Finset QueueingFundamentals.Networks
/-- Feasibility in the rate-limited relaxation of Algorithm 2 (p. 22): balanced quantiles in
`[0, 1]` with `∑_{i,j} φ_ij τ_ij q_ij ≤ m`. -/
def IsAlg2Feasible {n : ℕ} (φ τ : Fin n → Fin n → ℝ) (m : ℕ) (q : Fin n → Fin n → ℝ) : Prop :=
IsRelaxFeasible φ q ∧ ∑ i, ∑ j, φ i j * τ i j * q i j ≤ m
/-- `q'` solves step 1 of Algorithm 2: it maximizes `∑_{i,j} φ_ij R_ij(q_ij)` over the
rate-limited relaxation. -/
def IsAlg2Optimal {n : ℕ} (φ τ : Fin n → Fin n → ℝ) (I : Fin n → Fin n → ℝ → ℝ) (m : ℕ)
(q' : Fin n → Fin n → ℝ) : Prop :=
IsAlg2Feasible φ τ m q' ∧
∀ q, IsAlg2Feasible φ τ m q → elevObj φ I q ≤ elevObj φ I q'
/-- The output of step 2 of Algorithm 2: `(1 − ε) q'` if `∑_{i,j} φ_ij τ_ij q'_ij ≥ m (1 − ε)`,
and `q'` otherwise. -/
noncomputable def alg2Output {n : ℕ} (φ τ : Fin n → Fin n → ℝ) (m : ℕ) (ε : ℝ)
(q' : Fin n → Fin n → ℝ) : Fin n → Fin n → ℝ :=
if (m : ℝ) * (1 - ε) ≤ ∑ i, ∑ j, φ i j * τ i j * q' i j then fun i j => q' i j * (1 - ε)
else q'
end SharedVehicleApprox.Pricing.Supplement
Source
Banerjee, Freund & Lykouris, Pricing and Optimization in Shared Vehicle Systems: An Approximation Framework, arXiv:1608.06819v4, p. 22 (PDF 23), Algorithm 2