feat(phase-8b): urban_capex_multiplier on estimate_cost#25
Merged
Conversation
The Mi Teleférico Línea Roja case-study doc flagged this explicitly:
the optimizer's BoM covers steel + cable + drive motor + foundations
+ carriers, but a real urban transit gondola also pays for the
electrical substation + medium-voltage distribution, signalling +
station IT, land acquisition / easements, station buildings beyond
the two terminals, ops control room + spare parts, local VAT +
import duties + OEM engineering fees + financing. The empirical
ratio is 5-7x bare-infrastructure for urban gondolas in this size
class — the optimizer was honestly under-reporting capex on every
urban case study.
cost.py changes (additive, fully backward-compatible):
- CostEstimate.urban_capex_multiplier (default 1.0)
- CostEstimate.bare_infrastructure_total (subtotal + contingency,
pre-multiplier — what the optimizer puts on the ground)
- CostEstimate.urban_uplift (the delta from multiplier > 1)
- CostEstimate.grand_total now == bare * multiplier
- summary_lines() and as_csv() show the uplift only when
multiplier != 1.0, so legacy callers reading the old CSV format
keep working bit-for-bit
- estimate_cost(..., urban_capex_multiplier=6.0) is the new kwarg;
raises ValueError for values < 1.0
Tests: tests/test_urban_capex.py — 7 new
- default multiplier 1.0 leaves grand_total ≡ bare_infrastructure
- default CSV/summary unchanged (legacy format preserved)
- multiplier 6.0 -> 6x bare, urban_uplift == 5x bare
- summary/CSV include uplift lines only when multiplier > 1
- <1.0 multiplier raises ValueError
- Linea-Roja-style BOM with 6x multiplier recovers a turnkey
envelope in the right order of magnitude vs the published budget
Full suite 203 -> 206, zero regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Mi Teleférico Línea Roja case-study doc (
Note 4 — Capex) flagged this explicitly: the optimizer's BoM covers steel + cable + drive motor + foundations + carriers, but a real urban transit gondola also pays for electrical substation + MV distribution, signalling + station IT, land acquisition / easements, station buildings beyond the two terminals, ops control room + spare parts, local VAT + import duties + OEM engineering fees + financing.The empirical ratio is 5–7× bare-infrastructure for urban gondolas in this size class. The optimizer was honestly under-reporting capex on every urban case study.
API (additive, fully backward-compatible)
CostEstimate.urban_capex_multiplier(default1.0)CostEstimate.bare_infrastructure_total— subtotal + contingency, pre-multiplierCostEstimate.urban_uplift— the delta frommultiplier > 1CostEstimate.grand_totalnow== bare * multipliersummary_lines()+as_csv()show the uplift only when multiplier != 1.0, so legacy callers reading the old CSV format keep working bit-for-bitestimate_cost(..., urban_capex_multiplier=6.0)— new kwarg; raisesValueErrorfor values < 1.0Test plan
tests/test_urban_capex.py— 7 new: default 1.0 unchanged, default CSV/summary legacy-format preserved, 6× -> 6× bare, summary/CSV include uplift only when >1, <1.0 raises, Linea-Roja-style BOM with 6× recovers the published budget envelope