Algorithm 3 — the elevated flow relaxation with supply redirection and its redirection probabilities
DefinitionSharedVehicleApprox_Pricing_Supplement_Algorithm3approximation-ratioclosed-queueing-networkp2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1pricingshared-vehicle-systems
Algorithm 3 chooses quantiles and redirection rates to solve
The definitions give feasibility, the objective, optimality and the output
the redirected rate over the rate of non-empty units arriving at .
Formalization Note Page 25 prints the output with denominator . This is a misprint: the sentence before the algorithm and the proof of Lemma 21 use . The constraint is implicit on the page, as are rates. When the denominator is zero, feasibility forces and the output is zero.
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 relaxation of Algorithm 3 (p. 25): quantiles in `[0, 1]`, redirection rates
`z ≥ 0` (rates, left implicit on the page), supply circulation
`∑_k (φ_ki q_ki + z_ki) = ∑_j (φ_ij q_ij + z_ij)` and `∑_k z_ik ≤ ∑_j φ_ji q_ji`. -/
def IsAlg3Feasible {n : ℕ} (φ q z : Fin n → Fin n → ℝ) : Prop :=
(∀ i j, 0 ≤ q i j ∧ q i j ≤ 1) ∧ (∀ i j, 0 ≤ z i j) ∧
(∀ i, ∑ k, (φ k i * q k i + z k i) = ∑ j, (φ i j * q i j + z i j)) ∧
∀ i, ∑ k, z i k ≤ ∑ j, φ j i * q j i
/-- The objective `∑_{i,j} (φ_ij R_ij(q_ij) − c_ij z_ij)` of Algorithm 3. -/
def alg3Obj {n : ℕ} (φ : Fin n → Fin n → ℝ) (I : Fin n → Fin n → ℝ → ℝ)
(c q z : Fin n → Fin n → ℝ) : ℝ :=
∑ i, ∑ j, (φ i j * rewardCurve I i j (q i j) - c i j * z i j)
/-- `(q, z)` is an optimal solution of the relaxation of Algorithm 3. -/
def IsAlg3Optimal {n : ℕ} (φ : Fin n → Fin n → ℝ) (I : Fin n → Fin n → ℝ → ℝ)
(c q z : Fin n → Fin n → ℝ) : Prop :=
IsAlg3Feasible φ q z ∧
∀ q' z', IsAlg3Feasible φ q' z' → alg3Obj φ I c q' z' ≤ alg3Obj φ I c q z
/-- The redirection probabilities `r_ij = z_ij / ∑_k φ_ki q_ki`: the rate of redirected units over
the total rate of non-empty units arriving at `i` (p. 25 and the proof of Lemma 21, p. 26). The
printed output line of Algorithm 3 omits the factor `q_ki` by a misprint. The value is `0` when
the denominator is `0`. -/
noncomputable def redirectProb {n : ℕ} (φ q z : Fin n → Fin n → ℝ) : Fin n → Fin n → ℝ :=
fun i j => z i j / ∑ k, φ k i * q k i
end SharedVehicleApprox.Pricing.Supplement
Source
Banerjee, Freund & Lykouris, Pricing and Optimization in Shared Vehicle Systems: An Approximation Framework, arXiv:1608.06819v4, p. 25 (PDF 26), Algorithm 3, with the proof of Lemma 21, p. 26 (PDF 27)