Furnace Group Strategy Documentation¶
Overview¶
The technology strategy system for furnace groups operates through a two-function architecture that separates economic analysis from strategic decision-making:
Economic Analysis Engine: optimal_technology_name()¶
The optimal_technology_name function in the FurnaceGroup class is a critical economic analysis component that evaluates the financial viability of technology transitions in steel production facilities. It is a pure analytical function that returns economic metrics without making decisions or modifying any state. It performs a comprehensive Net Present Value (NPV) analysis by:
Calculating the Cost of Stranded Assets (COSA) for abandoning current technology
Evaluating NPV for each allowed technology transition
Accounting for subsidies, carbon costs, and operational differences
Comparing greenfield (new) vs brownfield (retrofit) installations
Strategic Decision Orchestrator: evaluate_furnace_group_strategy()¶
The evaluate_furnace_group_strategy function in the Plant class is the strategic decision-maker that uses NPV analysis to make investment decisions, thereby modifying the state of furnace groups. It:
Calls
optimal_technology_name()to obtain economic analysisApplies business logic (affordability checks, capacity limits, risk assessment)
Makes strategic decisions based on economic and operational constraints
Generates actionable commands (renovate, switch technologies, or close facilities)
Updates plant balance sheets to reflect investment costs
Architecture: How the Functions Interact¶
evaluate_furnace_group_strategy (Plant)
│
├─> Stage 1-4: Pre-flight checks
│ ├─> Check plant financial health
│ ├─> Check furnace group status
│ ├─> Evaluate forced closure
│ └─> Filter allowed transitions
│
├─> Stage 5: Call optimal_technology_name (FurnaceGroup)
│ │
│ │ [Economic Analysis - No Decisions Made]
│ │ ├─> Calculate COSA
│ │ ├─> Evaluate NPV for each allowed technology
│ │ │ ├─> Brownfield (renovation): reduced capex
│ │ │ └─> Greenfield (new tech): full capex + COSA penalty
│ │ └─> Return: NPV dict, CAPEX dict, COSA, BOM dict
│ │
│ └─< Returns economic metrics
│
├─> Stage 6-8: Analyze results
│ ├─> Check if any option is profitable
│ ├─> Identify optimal technology
│ └─> Select technology (weighted random or deterministic)
│
├─> Stage 9-10: Execute decision path
│ ├─> Path A: Renovation (same tech, lifetime expired)
│ └─> Path B: Technology switch (different tech)
│
├─> Stage 11-12: Final checks
│ ├─> Probabilistic adoption filter
│ └─> Capacity limit enforcement
│
└─> Stage 13: Return command
├─> RenovateFurnaceGroup
├─> ChangeFurnaceGroupTechnology
├─> CloseFurnaceGroup
└─> None (no action)
Part 1: Economic Analysis¶
Overview¶
Function: FurnaceGroup.optimal_technology_name
Purpose: Pure NPV calculation and economic evaluation - determines the optimal technology by comparing economic returns across all allowed technology transitions.
Key Characteristics:
No decisions made - only returns economic metrics
No side effects - does not modify any state
Comprehensive evaluation - calculates NPV for all allowed transitions
COSA-adjusted - accounts for stranded asset costs when switching
High-Level Workflow:
Start
│
├─> Stage 1: Initialize and import dependencies
│
├─> Stage 2: Prepare Operating Expenses List and Calculate Operating Subsidies
│
├─> Stage 3: Calculate Carbon Costs for Current Technology and Combine with Subsidised OPEX
│
├─> Stage 4: Calculate Cost of Stranded Assets (COSA)
│
├─> Stage 5: Check for allowed technology transitions
│ └─> If no transitions allowed: Return empty results
│
├─> Stage 6-9: For each allowed technology:
│ ├─> Check if technology has capex data
│ ├─> Check special requirements (e.g., BOF needs smelter)
│ ├─> Branch A (Current Tech): Brownfield evaluation
│ │ ├─> Apply renovation capex share
│ │ ├─> Use existing BOM; its material demands give the output shares
│ │ └─> No construction lag
│ ├─> Branch B (New Tech): Greenfield evaluation
│ │ ├─> Price from unsubsidised energy plus the candidate's own energy subsidies
│ │ └─> Fetch average BOM (modal reductant as a first hint)
│ ├─> Stage 8: Calculate NPV if valid BOM exists
│ │ ├─> Year-wise reductant score series (energy, carbon, by-products)
│ │ ├─> Rebuild BOM if the start-year pick differs (Branch B)
│ │ ├─> OPEX = materials VOPEX + scaled fixed OPEX + score(t), then OPEX subsidies
│ │ ├─> Apply capex and debt subsidies, calculate full NPV
│ │ └─> Store results
│ └─> Stage 9: Adjust NPV for COSA (if switching)
│
└─> Stage 10: Return results (NPVs, capex dict, COSA, BOMs)
Detailed Stage Breakdown¶
Stage 1: Initialize and Import Dependencies¶
Purpose: Set up logging and import required calculation functions
Debug prefix:
[OPTIMAL TECHNOLOGY]:Key actions:
Log current furnace group state
Import cost and emissions calculation functions
Initialize return dictionaries
Stage 2: Prepare Operating Expenses List and Calculate Operating Subsidies¶
Purpose: Apply OPEX subsidies to the current OPEX value
Output: List of subsidised OPEX values by year for the period of remaining lifetime
Stage 3: Calculate Carbon Costs for Current Technology and Combine with Subsidised OPEX¶
Purpose: Determine carbon cost series for existing operations
Key decision: Use current emissions and chosen boundary
Inputs: Current emissions, carbon price series, emission boundary
Output: List of carbon costs over facility lifetime combined with list of subsidised OPEX values
Stage 4: Calculate Cost of Stranded Assets (COSA)¶
Purpose: Determine the cost of abandoning current technology
Key calculation: NPV of the foregone operating margin: the discounted gross cash flow for years
[construction_time, remaining_time). The incumbent keeps operating during the switch’s construction, so only the years after it are foregone; COSA is 0 when the remaining life does not outlast construction.Incumbent OPEX: current unit OPEX with OPEX subsidies, plus its carbon cost series and by-product adjustment (Stages 2 and 3), at its current production, discounted at the incumbent’s cost of equity
Rationale: Remaining debt is excluded — it persists via the
legacy_debt_schedule(realised P&L / closure), so it cancels from the switch-vs-stay comparison
Stage 5: Check for Allowed Technology Transitions¶
Decision point: Are transitions defined for current technology?
If no: Return empty results (no switch possible)
If yes: Continue to evaluation
Key check:
allowed_furnace_transitionsdictionary
Stage 6: Evaluate Each Allowed Technology¶
For each technology in allowed transitions:
Decision 1: Does technology have capex data?
If no: Skip this technology
Decision 2: Special requirements check
BOF requires smelter furnace
If not met: Skip this technology
Stage 7: Branch Based on Technology Type¶
Branch A: Current Technology (Brownfield)¶
Characteristics:
Retrofit of existing facility
Reduced capex (typically 20% of greenfield)
Uses existing BOM and utilization rate
Uses the furnace group’s own BOM material demands as the output shares that weight the reductant score series
No construction lag: the renovation happens in place and the furnace group keeps producing, so its NPV starts operating in the decision year. Switch candidates (Branch B) keep the
construction_timelag.
Key adjustments:
Apply brownfield_capex_share multiplier
Validate existing BOM structure
Branch B: New Technology (Greenfield)¶
Characteristics:
Complete replacement with new technology
Full capex cost
Priced from unsubsidised energy prices plus the candidate’s own energy subsidies for its operating start year
Process:
Fetch the average BOM for the technology, using the fleet’s most common reductant as a first hint
Take the output shares from the average BOM build
Stage 8: Calculate NPV¶
Prerequisite: Valid BOM must exist
Process:
Get market price series for the product type
Compute the year-wise reductant score series over the operating window. See Reductant Choice and Investment OPEX
Branch B: if the operating-start-year pick differs from the hint, rebuild the BOM for the committed reductant
Scale fixed OPEX to production (skip the candidate on zero utilisation)
Build the yearly OPEX list: materials-only VOPEX + fixed OPEX + score(t), then apply OPEX subsidies per year
Apply capex and debt subsidies and calculate the full NPV
Key parameters: Capacity, utilization, lifetime, financing costs
Note: Energy, carbon and by-products (revenue, disposal costs and carbon storage costs) enter the NPV only through the score series, year by year. Construction years carry
NoneOPEX, so they add no revenue or cost.Greenfield BOM shape:
Environment.get_bom_from_avg_boms()produces the BOM dict consumed bycalculate_variable_opex()on the greenfield path. Eachmaterials[<feedstock>]entry must includetotal_material_costand eachenergy[<carrier>]entry must includeproduct_volume; without these keys VOPEX silently collapsed and greenfield NPV was undervalued.Average-BOM material demand:
get_bom_from_avg_boms()derives each metallic charge’s output share from the fleet’s input shares and the process efficiencies (eff, tonnes of input per tonne of product):output_share = (input_share / eff), normalised to 1. Material demand is thenoutput_share × capacity × eff, so efficiency is applied exactly once and the candidate’s input mix matches the fleet’s. The same output shares build the energy rows and weight the reductant score series. Earlier code computedinput_share × capacity × eff, applying efficiency twice: input shares already embed it. That overstated material demand and cost for technologies with several metallic charges (for example 1.30 t instead of 1.23 t of input per tonne for a 50/50 mix at efficiencies 1.6 and 1.0) and skewed the mix towards the less efficient charge. Single-charge technologies were unaffected.Average-BOM cost basis: fleet-derived
avg_bomsentries carryunit_costper tonne of input (cost_sum / demand_sumingenerate_average_boms()), andget_bom_from_avg_boms()charges them asunit_cost × input demand. Technologies with no active furnace group anywhere get a placeholder instead: their whole default metallic charge priced at the fallback material cost, which is authored per tonne of product (USD/t HM). Placeholder entries are markedcost_basis="per_output"and charged on output volume, so the bill per tonne of product equals the authored value; previously they were charged per input tonne, overbilling undeployed technologies by the ore ratio (~1.5×). Materialdemandalways carries the physical input tonnage regardless of basis. Placeholder technologies also ride a hardcoded 0.6 utilisation (deliberately conservative) and the flat fallback number carries no transport or tariff component (destination unknown before a site exists).
Stage 9: Adjust NPV for COSA¶
Decision: Is this a technology switch?
If yes (tech != current): Subtract COSA from NPV
If no (same tech): No COSA adjustment
Rationale: Switching technologies incurs stranded asset cost
Stage 10: Return Results¶
Outputs:
npv_dict: NPV values for each technology (COSA-adjusted for switches)npv_capex_dict: Effective capex after subsidies (renovation-basis for the current technology)cosa: Cost of Stranded Assets value (Nonewhen no transitions are allowed)bom_dict: Bill of Materials for each technology, rebuilt for the committed reductant where the pick differedreductant_dict: The operating-start-year reductant pick per technology, which theChangeFurnaceGroupTechnologycommand carries so the built asset starts on the reductant the NPV evaluated
Key Dependencies and Interactions¶
External Functions Called¶
calculate_emissions_cost_series: Incumbent carbon cost series (COSA baseline only)calculate_opex_list_with_subsidies: Year-by-year OPEX with OPEX subsidies appliedstranding_asset_cost: Calculates COSAget_bom_from_avg_boms: Retrieves average BOMs, utilisation and output shares for candidate technologiesscore_series_for_tech(boundEnvironment.reductant_score_series): Year-wise reductant score series and picksscale_fopex_to_production: Fixed OPEX per tonne of productionget_subsidised_energy_costs/filter_subsidies_for_year: Candidate energy pricing and active subsidiescalculate_capex_with_subsidies: Applies capital subsidiescalculate_debt_with_subsidies: Applies cost-of-debt subsidiescalculate_variable_opex: Materials-only variable operating costscalculate_npv_full: Performs complete NPV calculation
Data Dependencies¶
self.bill_of_materials: Current technology’s BOMself.emissions: Current emission profileself.lifetime: Facility lifetime informationself.debt_repayment_per_year: Debt service scheduleself.utilization_rate: Current capacity utilizationself.production: Current production volume
Input Parameters¶
Required Market Data¶
market_price_series: Product prices by type (steel, iron, etc.)carbon_cost_series: Carbon prices over timecost_of_debt: Interest rate on debtcost_of_equity: Required return on equity
Technology Configuration¶
capex_dict: Capital costs by technologycapex_renovation_share: Retrofit cost multipliers (brownfield)technology_fopex_dict: Fixed operating costsallowed_furnace_transitions: Valid technology switchesdynamic_business_cases: Feedstock configurations
Subsidy Information¶
tech_capex_subsidies: Capital subsidies by technologytech_opex_subsidies: Operating subsidies by technologytech_debt_subsidies: Debt subsidies by technology
Common Issues and Debugging Tips¶
Issue 1: No Transitions Found¶
Symptom: Function returns empty NPV dictionary
Check:
allowed_furnace_transitionscontains current technologyDebug: Look for
"NO TRANSITIONS ALLOWED"in logs
Issue 2: Technology Skipped¶
Symptom: Expected technology not in results
Possible causes:
Missing capex data
BOF without smelter
Failed BOM retrieval
Debug: Look for
"SKIPPING"messages in logs
Issue 3: Invalid BOM Structure¶
Symptom: Technology evaluation fails
Check: BOM contains both “materials” and “energy” keys
Debug: Look for
"Invalid or missing BOM"warnings
Issue 4: Negative NPV After COSA¶
Symptom: All technologies show negative NPV
Explanation: COSA exceeds benefits of switching
Debug: Check COSA calculation (foregone operating margin)
Part 2: Strategic Decision-Making¶
Overview¶
Function: Plant.evaluate_furnace_group_strategy
Purpose: Strategic decision orchestrator that uses NPV analysis to make investment decisions
Key Characteristics:
Makes decisions - determines which action to take
Has side effects - updates plant balance sheet
Business logic - applies affordability checks, capacity limits, probabilistic adoption
Command generation - returns executable commands for the simulation
Decision Workflow
The function follows a 13-stage workflow from pre-flight checks through command generation:
Stage 1-4: Pre-Flight Checks
├─> Plant financial health
├─> Furnace group status
├─> Forced closure evaluation
└─> Technology transition filtering
Stage 5: Economic Analysis
└─> Call optimal_technology_name() → Get NPV analysis
Stage 6-8: Results Analysis
├─> Check profitability (any NPV > 0?)
├─> Identify optimal technology
└─> Technology selection (weighted random or deterministic)
Stage 9-10: Decision Execution
├─> Renovation path (if best tech = current tech)
└─> Technology switch path (if best tech ≠ current tech)
Stage 11-13: Final Checks & Command Generation
├─> Probabilistic adoption filter
├─> Capacity limit enforcement
└─> Generate command (Renovate/Switch/Close/None)
Detailed Stage Breakdown¶
Affordability is checked per-capex at the point of decision against
plant_group.balance (renovation in Stage 8, switch in Stage 9). A negative
group balance does not short-circuit evaluation; the historic-loss closure
threshold in Stage 2 runs unconditionally.
Stage 1: Check Furnace Group Status¶
Decision: Is the furnace group eligible for strategy evaluation?
Check: Status is not “operating pre-retirement”
If pre-retirement: Return
None(already scheduled to close)Rationale: Don’t invest in facilities about to close
Stage 3: Check for Forced Closure¶
Decision: Have accumulated losses exceeded write-off threshold?
Threshold calculation:
CAPEX × capacityCheck:
furnace_group.historic_balance < -thresholdIf exceeded: Return
CloseFurnaceGroupcommandRationale: Losses too great - better to close than continue operating
Example:
CAPEX: $800/tonne
Capacity: 5,000,000 tonnes (5 Mt)
Threshold: -$4,000,000,000
Historic balance: -$4,500,000,000 → Close
Stage 4: Filter Allowed Technology Transitions¶
Purpose: Narrow down technology options based on what’s allowed in the current year
Process: Intersect
allowed_techs[current_year]withallowed_furnace_transitions[current_tech], then apply the P2 CO2 storage gate to drop CCS candidates the country cannot physically support.P2 gate: For each surviving CCS tech, a cheap pre-check first asks
get_co2_need_by_name(tech, capacity, ""). The empty reductant returns the maximum over all reductants, so 0 means no CCS potential and the tech is kept. Otherwise the need is sized with the candidate’s own reductant pick for its operating start year (current_year + construction_time) from the reductant score series, the reductant the switch would commit. The incumbent technology is sized the same way, although a renovation commits the pick for the decision year, so for an incumbent with carbon capture the two picks can differ. The need is compared againstget_co2_headroom(iso3, current_year + construction_time). Ifneed > headroomthe tech is dropped, so the NPV race in Stage 5 picks the next-best non-CCS alternative naturally. CCU techs haveco2_stored = 0in their BOM and are never dropped. The China capacity-replacement gate reuses the same pick.China capacity-replacement gate (policy-enabled runs, Chinese plants only): for each surviving candidate — the incumbent’s renovation option included — the policy’s REPLACE hook resolves the capacity the candidate may build before its NPV runs. A utilisation gate comes first: a group at or below the utilisation floor for the whole recorded window loses every candidate. Otherwise the permitted capacity is
current / ratio, 1.5:1 when the new route is emission-intense whatever the old route is (stricter than the source flowchart’s old-route-first test, by modelling decision), 1:1 otherwise and always in the exempt provinces. A blocked candidate drops off the menu; a permitted one is valued at its permitted capacity in Stage 5. See China Capacity-Replacement Policy.Example:
Current tech: BF-BOF
All possible transitions: [BF-BOF, EAF, DRI-EAF, H2-DRI-EAF, BF+CCS]
Allowed in 2030: [BF-BOF, EAF, DRI-EAF, BF+CCS] (H2-DRI-EAF not yet available)
Plant in a country with no CO2 storage assessed → P2 drops BF+CCS
Filtered transitions: [BF-BOF, EAF, DRI-EAF]
Stage 5: Calculate NPV for All Technology Options¶
Key Action: Call furnace_group.optimal_technology_name() to get economic analysis
Inputs passed to analysis engine:
Market price forecasts
Technology costs (CAPEX, OPEX, financing)
Bill of materials function
Carbon cost projections
Subsidy configurations
Outputs received:
tech_npv_dict: NPV for each technology (already COSA-adjusted)npv_capex_dict: Subsidized CAPEX for each technologycosa: Cost of stranded assetsbom_dict: Bills of materials for each technologyreductant_dict: Committed reductant per technology
Stage 6: Check if Any Technology Option is Profitable¶
Decision: Is investing worthwhile?
Check:
max(tech_npv_dict.values()) > 0If all NPVs ≤ 0: Return
None, unless the lifetime has expired, in which case renovate or closeRationale: Don’t invest if all options lose money
Stage 7: Identify Optimal Technology¶
Process: Find the technology with the highest NPV, optimal_tech = max(tech_npv_dict, key=tech_npv_dict.get). This is logged only. The selection in Stage 8 does not short-circuit on it.
Stage 8: Technology Selection¶
Decision Mode: Weighted random (probabilistic_agents=True) or deterministic (probabilistic_agents=False). The incumbent competes on its own NPV alongside the challengers in both modes.
Weighted Random Selection (when probabilistic_agents=True):
Purpose: Model real-world decision uncertainty and strategic preferences
Process:
Filter out invalid NPVs (NaN, infinite)
Calculate weights:
weight = max(NPV, 0)(negative NPVs get zero weight)Randomly select a technology with probability proportional to its weight
Runs on every evaluation, including when the incumbent has the highest NPV. An incumbent can therefore lose the draw to a challenger, and a challenger can lose to an incumbent that is not the best option.
Example:
BF-BOF (incumbent): NPV = $5M → weight = 5M → 37% selection probability
EAF: NPV = $8.5M → weight = 8.5M → 63% selection probability
DRI-EAF: NPV = -$1M → weight = 0 → 0% selection probability
Logging: each draw logs a
[FG STRATEGY] DRAWline at INFO with the incumbent, the winner and each option’s probability share.
Deterministic Selection (when probabilistic_agents=False):
Pick the highest-NPV technology (no random draw)
Outcome:
Incumbent selected: Stage 9 (no action, or renovate or close when the lifetime has expired)
Challenger selected: Stage 10 (technology switch)
No valid NPV, all weights near zero, or the selected NPV ≤ 0: Return
None, or renovate or close when the lifetime has expired
Stage 9: Handle Renovation Scenario¶
Condition: Lifetime expired and no switch happens: the incumbent is selected, or any other exit listed under Expired Lifetime: Renovate or Close
Decision Path:
Calculate renovation cost:
CAPEX = subsidized renovation CAPEX from NPV analysis
Cost =
CAPEX × capacity × equity_share
Affordability check:
If
renovation_cost > plant_group.balance→ ReturnCloseFurnaceGroupRationale: Can’t afford to renovate, must close
Execute renovation:
Debit the group treasury:
plant_group.deduct_equity(renovation_cost, reason="renovation")Return
RenovateFurnaceGroup. The command stores the renovation-basis CAPEX (CAPEX after subsidies × renovation share), the same figure the NPV evaluated and the equity debit used. This CAPEX sets the furnace group’s investment and debt schedule for the new cycle.
Example Calculation:
Subsidised renovation CAPEX: $160/tonne
Capacity: 5 Mt
Equity share: 30%
Renovation cost: $160 × 5,000,000 × 0.30 = $240,000,000
Plant group balance: $300,000,000 → Affordable, renovate
Capacity policy note: with China’s capacity-replacement policy enabled, a Chinese renovation is a replacement. It runs at the permitted capacity resolved in Stage 4 (an emission-intense renovation shrinks to capacity / 1.5), the RenovateFurnaceGroup command carries that capacity, and the freed difference is deposited into the retirement-credit pool when the renovation executes.
Stage 10: Handle Technology Switch Scenario¶
Condition: Best technology ≠ current technology
Process:
Calculate switching cost:
CAPEX = subsidized greenfield CAPEX from NPV analysis
Cost =
CAPEX × capacity × equity_share
Affordability check:
If
switch_cost > plant_group.balance→ ReturnNone, or renovate or close when the lifetime has expiredRationale: Can’t afford to switch
Continue to probabilistic adoption (Stage 11)
Example Calculation:
Subsidised greenfield CAPEX: $650/tonne
Capacity: 5 Mt
Equity share: 30%
Switch cost: $650 × 5,000,000 × 0.30 = $975,000,000
Plant group balance: $1,200,000,000 → Affordable, proceed
Capacity policy note: with the policy enabled, a Chinese switch is likewise sized at the permitted capacity from Stage 4. The group shrinks when the scheduled switch executes and the freed difference is deposited into the retirement-credit pool.
Stage 11: Probabilistic Adoption Decision¶
Purpose: Model real-world hesitation in technology adoption (financing risk, permit delays, market uncertainty)
Formula:
acceptance_probability = exp(-switch_cost / NPV)
Interpretation:
Higher cost relative to benefit → Lower probability
Cost << NPV → High probability (close to 100%)
Cost ≈ NPV → Moderate probability (≈37%)
Cost >> NPV → Low probability (close to 0%)
Example:
Switch cost: $975M
NPV: $8.5M
Ratio: 975 / 8.5 = 114.7
Acceptance probability: exp(-114.7) ≈ 0% (very unlikely)
Alternative Example (more favorable):
Switch cost: $100M
NPV: $200M
Ratio: 100 / 200 = 0.5
Acceptance probability: exp(-0.5) ≈ 61%
Decision Process:
Calculate acceptance probability
Draw random number (0-1)
If
random_draw < acceptance_probabilityAND furnace has no CCS/CCU → Proceed to Stage 12Otherwise → Return
None(probabilistic rejection), or renovate or close when the lifetime has expired
Special Case: Furnaces with CCS/CCU equipment are never switched (representing significant sunk investment)
Stage 12: Check Capacity Limits¶
Purpose: Enforce annual capacity expansion limits (supply chain constraints)
Context:
Total annual capacity is limited (default: 100 Mt for both steel and iron)
Limit is split between:
New plants: Greenfield facilities (handled by Geospatial Model)
Expansions & switches: Capacity added to existing plants (handled by PAM)
Calculation:
total_installed_capacity = installed_capacity_in_year(product) # All new capacity this year
new_plant_capacity = new_plant_capacity_in_year(product) # Greenfield only
expansion_and_switch_capacity = total - new_plant_capacity # Existing plants
if expansion_and_switch_capacity + furnace_capacity > expansion_limit:
BLOCKED
Example:
Product: Steel
Total expansion limit for steel: 100 Mt/year
New plant share: 40% → New plant limit: 40 Mt, Expansion/switch limit: 60 Mt
Current new expansion/switch capacity already installed this year: 55 Mt
Furnace capacity to switch: 8 Mt
Total after switch: 55 + 8 = 63 Mt > 60 Mt → BLOCKED
If blocked: Return None, or renovate or close when the lifetime has expired
If within limits: Proceed to Stage 13
Stage 13: Execute Technology Switch¶
Final Actions:
Debit group treasury:
plant_group.deduct_equity(switch_cost, reason="switch")Generate command: Return
ChangeFurnaceGroupTechnology
Command includes:
Technology change details (old → new)
Economic metrics (NPV, COSA)
Cost details (CAPEX with/without subsidies, cost of debt)
Technical details (BOM, utilization, capacity)
Subsidy configurations
Expired Lifetime: Renovate or Close¶
lifetime.expired is true only in the year a furnace group reaches the end of its renovation cycle. In that year the group must either renovate or close. Taking no action would roll it into a new cycle without paying for a renovation.
Every exit that would otherwise return no action checks the lifetime first. When the lifetime has expired, the exit calls renovate_or_close_expired() instead. This applies to these exits:
every NPV is 0 or below (Stage 6)
no valid NPV remains, or all selection weights are near zero (Stage 8)
the selected technology has an NPV of 0 or below (Stage 8)
the incumbent is selected (Stage 9)
the switch is unaffordable (Stage 10)
the switch is rejected by the probabilistic draw, or the furnace group has CCS/CCU (Stage 11)
the switch is blocked by the capacity limit (Stage 12)
renovate_or_close_expired() then decides:
Incumbent NPV |
Group can fund the renovation equity |
Outcome |
|---|---|---|
Missing, not finite, or 0 or below |
Not checked |
|
Positive |
No |
|
Positive |
Yes |
Debit the equity, |
A missing incumbent NPV means renovation is no longer an option: the incumbent technology is phased out, gated by CO2 storage, or was dropped for zero utilisation (see Fixed OPEX).
When every NPV is 0 or below, the incumbent’s NPV is too, so an expired furnace group in that case always closes. Renovation happens only through the other exits, where the incumbent’s NPV is positive.
Command Types Returned¶
1. RenovateFurnaceGroup¶
When: Lifetime expired, no switch happens, incumbent NPV positive, and the group can fund the renovation equity
Includes: Renovation-basis CAPEX, subsidies, cost of debt
2. ChangeFurnaceGroupTechnology¶
When: Different tech selected AND affordable AND passes probability filter AND within capacity limits
Includes: Full technology switch details, NPV, COSA, BOM, subsidies
3. CloseFurnaceGroup¶
When:
Forced closure (historic losses exceed threshold)
Lifetime expired and no switch happens, and the incumbent NPV is not positive or the renovation is unaffordable
Includes: Plant ID and furnace group ID
4. None¶
When the lifetime has not expired and:
all NPVs are negative or zero
the switch is unaffordable (group balance too low)
the switch is rejected by the probabilistic draw
the capacity limit is exceeded
the current technology is optimal
Or: the furnace group is in pre-retirement
Data Dependencies¶
For Strategic Decisions (evaluate_furnace_group_strategy)¶
plant_group.balance: Group treasury — gates renovation and switch affordabilityfurnace_group.status: Operating statusfurnace_group.historic_balance: Cumulative profit/lossfurnace_group.lifetime.expired: Whether renovation is neededfurnace_group.is_ccs_or_ccu: CCS/CCU equipment flag (derived from tech name)
External Functions Called¶
furnace_group.optimal_technology_name(): Gets NPV analysisfilter_subsidies_for_year(): Filters subsidies for a specific yearcollect_active_subsidies_over_period(): Collects unique subsidies over a multi-year periodcalculate_debt_with_subsidies(): Applies debt subsidies
Function Relationship Summary¶
Division of Responsibilities¶
Aspect |
|
|
|---|---|---|
Role |
Economic analyst |
Strategic decision-maker |
Question |
“What are the economics?” |
“What should we do?” |
Type |
Pure function (no side effects) |
Impure function (updates state) |
Returns |
NPV dictionaries, COSA, BOMs |
Command objects or None |
Considers |
Market prices, costs, subsidies |
Affordability, risk, capacity limits |
Modifies |
Nothing |
Plant balance sheet |
Calls |
Calculate_costs functions |
optimal_technology_name() |
Level |
FurnaceGroup level |
Plant level |
Why This Architecture?¶
Separation of Concerns¶
Economic analysis is complex and reusable
Strategic decisions depend on context (plant finances, capacity limits, policy)
Separating them allows testing economics independently of business rules
Testability¶
Can test NPV calculations without mocking entire decision system
Can test decision logic with predetermined NPV inputs
Clarity¶
Clear distinction between “what’s optimal economically” and “what’s feasible practically”
Makes code easier to understand and maintain
Flexibility¶
Can change decision rules without touching NPV calculations
Can add new economic factors without changing decision logic
Key Metrics to Monitor¶
Economic Analysis Metrics¶
COSA vs NPV: If COSA > NPV, switch is unprofitable
Utilization rates: Lower utilization reduces NPV
Carbon cost impact: Rising carbon prices favor cleaner technologies
Subsidy effectiveness: Track NPV changes with/without subsidies
Brownfield advantage: Compare brownfield vs greenfield NPVs
Decision Metrics¶
Acceptance rate: % of positive-NPV switches actually executed
Capacity utilization: How close to annual limits
Rejection reasons: Categorize why switches don’t happen
Technology distribution: Which technologies are being adopted
Performance Indicators¶
Average NPV of executed switches: Quality of decisions
Renovation vs. switch ratio: Technology transition pace
Closure rate: Industry health indicator
Balance sheet health: Plant financial sustainability
Glossary¶
COSA: Cost of Stranded Assets - economic loss from abandoning existing technology (the foregone operating margin)
NPV: Net Present Value - present value of future cash flows minus initial investment
BOM: Bill of Materials - resource requirements for production (materials and energy)
Brownfield: Retrofit/upgrade of existing facility (reduced CAPEX)
Greenfield: Complete new installation (full CAPEX)
CAPEX: Capital Expenditure - upfront investment cost
OPEX: Operating Expenditure - ongoing operational costs
FOPEX: Fixed Operating Expenditure - costs independent of production volume
VOPEX: Variable Operating Expenditure - costs that scale with production
Equity Share: Fraction of investment paid from company funds (vs. debt financing)
Utilization Rate: Actual production as percentage of capacity
Acceptance Probability: Likelihood of executing a switch given positive NPV (models risk aversion)