- Home
- Documentation
- Economic analysis
Economic Analysis
pandapower
Economic Analysis totals CAPEX from element costs, power losses from a load flow, and optionally energy losses over a lifetime using load and generation profiles.
Simulate → Economic Analysis. Enter cost per unit on the Economic tab of each element first.
When to use
- Project CAPEX from lines, transformers, and other equipment
- Where the losses are (lines, transformers, impedances, DC lines)
- Energy-loss cost over a lifetime when you supply an energy price
How to run
- Fill the Economic tab on the elements you want in the CAPEX total.
- Click Simulate → Economic Analysis.
- Optionally enable energy-loss profiles and a lifetime / energy price.
- Run and compare CAPEX, power losses, and energy-loss cost.
How it is calculated
The economic analysis performs the following steps:
- CAPEX: Sums costs from the Economic tab of each element (lines, transformers, etc.). For lines: cost × length_km × parallel. For transformers: cost × parallel.
- Power Losses: Runs one AC load flow and extracts active power losses (
pl_mw) from lines, transformers, three-winding transformers, impedance branches, DC lines / DC lines mapped through pandapower. - Energy Losses (optional): When profiles are enabled, Electrisim builds hourly scaling traces for loads and generators, evaluates losses on a compact grid of operating points with repeated
runpp, then interpolates losses for each hour (SciPyRegularGridInterpolatorwhen both load and generation vary). This estimates the sum of hourly loss energy, Σ Ploss(t)Δt, with Δt = 1 h. - Period vs lifetime MWh: The simulation-period integral is exposed as
total_energy_losses_period_mwh. Multiplying by Lifetime (years) yieldstotal_energy_losses_mwh, representing cumulative losses across the project horizon. - Energy Loss Cost: When an energy price is supplied, cost equals
total_energy_losses_mwh(lifetime MWh) × price.
Formulas: Power Losses and Electrical Energy Losses
Power losses are computed by pandapower from the load flow results. The following formulas apply per element type:
Power Loss (Ploss) per Element
AC Line, Impedance, DC Line (line_dc):
Ploss = Pfrom + Pto
where Pfrom is active power flow into the element at the "from" bus, and Pto is active power flow into the element at the "to" bus (power flow convention: one direction is positive, the other negative, so the sum equals the power dissipated).
Transformer (2-winding and 3-winding):
Ploss = Phv + Plv
where Phv is active power at the high-voltage side and Plv at the low-voltage side. Equivalent to Pfrom + Pto in terms of power balance.
HV DC Link (dcline):
Ploss = Pfrom + Pto
with Pto = −Pfrom × (1 − loss_percent/100) − loss_mw. The loss is thus Pfrom × (loss_percent/100) + loss_mw.
Physical interpretation: For resistive elements (lines, impedance), Ploss ≈ I²R, where I is the current and R the resistance. For transformers, losses include copper (I²R) and iron (no-load) losses.
Total Power Losses
Ptotal,loss (MW) = Σ Ploss over all lines, transformers, impedance elements, and DC lines
Electrical Energy Losses
Hourly losses are reconstructed via interpolation from strategically sampled AC load flows (see workflow above—not full pandapower run_timeseries). Energy over the simulated horizon:
Eperiod (MWh) = Σt=1..N Ploss(t) × Δt
Lifetime cumulative energy:
Elifetime (MWh) = Eperiod × lifetime_years
The JSON field total_energy_losses_period_mwh stores Eperiod; total_energy_losses_mwh stores Elifetime.
Energy Loss Cost
Cost = Elifetime (MWh) × energy_price_per_MWh
Economic analysis request payload
The frontend merges diagram cells with an object typ: "EconomicAnalysisPandaPower Parameters". Important keys mirrored by Flask (app.py):
frequency,currency,algorithm,calculate_voltage_angles,inituse_generation_profile— UI sets this true whenever profile widgets are shown.time_steps,lifetime_years,load_profile,generation_profile,energy_price_per_mwh,energy_price_currency,calculation_mode
Economic analysis JSON outputs
total_capex,capex_breakdown: Aggregated CAPEX and per-element contribution pulled from diagram economics fields.total_power_losses_mw,power_losses_breakdown: Sum ofpl_mwafter the baseline load flow.total_energy_losses_period_mwh: Integrated losses overtime_stepshours (Δt = 1 h).total_energy_losses_mwh: Lifetime cumulative (= period ×lifetime_years).energy_loss_cost: Lifetime MWh × price when provided.load_profile_values,generation_profile_values: Hourly scaling vectors stored for auditing/charts.
Input Parameters
| Parameter | Description | Type | Options/Value Range | Default |
|---|---|---|---|---|
| Frequency | System frequency for load flow | radio | 50 Hz, 60 Hz | 50 Hz |
| Display Currency | Currency for CAPEX and cost display | select | EUR, USD, PLN, GBP, etc. | EUR |
| Time steps (hours) | Number of hours for energy loss time series (e.g. 8760 for one year) | number | > 0 | 8760 |
| Lifetime (years) | Project lifetime for energy loss calculation | number | > 0 | 30 |
| Load profile | Load scaling profile (appears when model has loads) | select | Constant, Residential (yearly, seasonal), Industrial (yearly, seasonal) | Constant |
| Generation profile | Generation scaling profile (appears when model has generators) | select | Constant, Solar, Onshore wind, Offshore wind | Constant |
| Energy price per MWh | Optional energy price for loss cost calculation (uses Display Currency) | number | ≥ 0 | 100 |
Results
- Total CAPEX: Sum of all element costs in the selected currency
- CAPEX Breakdown: Table of element type, name, and cost per element
- Total Power Losses (MW): Sum of active power losses from load flow
- Power Losses Breakdown: Table of element type, name, and power loss (MW) per element
- Total Energy Losses (period):
total_energy_losses_period_mwh— integrated MWh over the simulated hour window. - Total Energy Losses (lifetime):
total_energy_losses_mwh— equals period energy × lifetime years. - Energy Loss Cost: Lifetime MWh × energy price when specified.
- Profiles used: Load and generation profile names and hour count used for the calculation
Note: Set cost per unit in the Economic tab of each element dialog (lines, transformers, etc.) before running Economic Analysis. Element names in the breakdown match the names shown in the CAPEX and Power Losses tables.
Last updated: October 2026