From b5d58911fbf0c979b67937794d08aa4afa027ca3 Mon Sep 17 00:00:00 2001 From: nicoboy Date: Fri, 1 May 2026 21:54:36 +0200 Subject: [PATCH] modification rendu courbe bleue prix moyen --- frontend/app/pages/commune/[slug]/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/pages/commune/[slug]/index.vue b/frontend/app/pages/commune/[slug]/index.vue index 943ba7c..1fb6f64 100644 --- a/frontend/app/pages/commune/[slug]/index.vue +++ b/frontend/app/pages/commune/[slug]/index.vue @@ -1032,7 +1032,7 @@ const avgPriceWithAboPath = computed(() => { const pts: string[] = [] for (let i = 1; i < curve.curveVolumes.length; i++) { const v = curve.curveVolumes[i] - if (v < 30) continue + if (v < 1) continue // Approximate bill at volume v: we use trapezoidal integration of marginal price // Simpler: bill ≈ average_marginal_price * v, and average_marginal_price ≈ curvePrice at v // More accurate: use the integral formulas. But for display, we use: @@ -1391,7 +1391,7 @@ const margPriceLine = computed(() => { const pts: string[] = [] for (let i = 0; i < vols.length; i += 3) { const v = vols[i]! - if (v > margVolMax.value) break + if (v < 15 || v > margVolMax.value) continue // ← changer break par continue, et ajouter v < 15 pts.push(`${margCx(v)},${margCyPrice(prices[i]!)}`) } return pts.join(' ') @@ -1406,7 +1406,7 @@ const margAvgPriceWithAboLine = computed(() => { const pts: string[] = [] for (let i = 0; i < vols.length; i += 3) { const v = vols[i]! - if (v < 1 || v > margVolMax.value) continue + if (v < 15 || v > margVolMax.value) continue const avgP = citizenAbo.value / v + p0lin if (avgP <= margPriceMax.value * 1.5) { pts.push(`${margCx(v)},${margCyPrice(avgP)}`)