Swiss annual demand model v1 — methods and usage

This version delivers the reconciled baseline and sector-by-sector annual calculator agreed as the immediate next step. It estimates annual electricity demand under explicit assumptions. It also prepares an observed hourly Swissgrid series for the subsequent hourly modeling stage. It does not select a generation portfolio or calculate future winter adequacy.

**Running the calculator.** From `/home/niko/Documents/swiss-energy`, the existing normalized inputs are sufficient for a standard Python installation; the calculator has no third-party runtime dependencies.

```bash
python3 -m model.run --scenario central --year 2050
python3 -m model.run --scenario central --year 2050 --set space_heat_spf=3.8 --output /tmp/swiss-energy-custom-case
python3 -m model.run --scenario central --year 2050 --set hydrogen_and_efuels_increment_twh=10
python3 -m unittest model.test_demand -v
```

The scenario names are `lower_demand`, `central` and `higher_demand`. Years 2024–2050 are supported. Repeated `--set name=value` options override individual parameters. Unknown names, nonfinite numbers, out-of-range values and infeasible industrial temperature allocations fail explicitly. `--output` writes a detailed JSON result and a component CSV. Source data are read only. Use a different output directory for a new case to preserve an earlier run.

Edit [parameters.json](/home/niko/Documents/swiss-energy/model/parameters.json) to change the common assumptions, ranges or adoption path. Each input has units and a description. The three cases are deliberately broad combinations of assumptions, not quantiles, confidence intervals, optimized policies or official forecasts. They share the main replacement targets; the lower case emphasizes efficiency and lower activity, while the higher case assumes greater activity and energy intensity. The annual trajectories can bend or fall as efficiency gains overtake additions.

Population, activity, service intensity, cooling, optional additions and the residual interpolate from their 2024 values to the supplied 2050 endpoint. Replacement progresses from 0 in 2024 to 45% in 2035, 70% in 2040 and 100% in 2050. These percentages apply to the target replacement defined by each module; for example, a 90% process-fuel target is 90% converted when progress reaches 100%. Replacement-device SPF, conversion efficiencies and electric-vehicle consumption are fixed assumptions for the converted portion throughout a case. They are not inferred technology-learning trajectories or sales-share forecasts.

**Baseline and boundaries.** The baseline uses the archived BFE Electricity Statistics 2024 table 6: 57.512 TWh of national final electricity. Published generation, imports, exports, pumping and losses reproduce this total exactly at reported precision. The end-use workbook's 207.04 PJ corresponds to 57.511111 TWh; the small statistical-series difference is shown explicitly. The bottom-up published end-use model totals 56.270214 TWh. Its difference from the selected baseline, 1.241786 TWh, remains a separate component. The central case holds that residual constant as an explicit assumption; the parameter sensitivity and the other cases vary it. Reconciliation establishes an accounting identity, not the physical cause of the residual.

The model retains end-use sectors because their activity and technology descriptions are useful for electrification. BFE's customer-category electricity table uses different classifications. A documented bridge moves public lighting and other transport infrastructure into services and groups agriculture with services. The residual sector differences remain visible in `baseline.json`; no proportional rescaling is used. Published and derived cell values retain their source sheet/cell references in `source-cell-evidence.json`.

The optional supply accounting output divides modeled electricity by one minus an effective national loss fraction. It is an annual accounting sensitivity before storage pumping and exports. It is not a dispatch result or proof of how much generation capacity is required. In 2024 it reproduces the published 61.838 TWh country-consumption total. Additional district-heat-production electricity is an explicitly entered increment, whose supply-side classification needs care in any later detailed energy-system balance.

**Heating and hot water.** For a converted fuel, added electricity equals baseline final fuel energy × activity × heat-service intensity × converted fraction × existing heat-generation efficiency ÷ new heat-pump seasonal performance. Oil, gas and solid/mixed fuels have separate configurable conversion efficiencies. This prevents treating delivered fuel energy as useful heat. Gas includes biogas; the other category can include waste and fossil inputs.

Household space heating and hot water are separate, as are identified resistance heating and existing heat-pump electricity. Existing electric heat is retained and scaled for heat service. Resistance conversion replaces the old electricity with the reduced replacement electricity; it does not add an entire new heat pump on top. Improvements to existing heat-pump performance are a separate factor, defaulting to no change. Ambient heat and solar thermal are not treated as additional electricity inputs.

Service and industry space/water heating have carrier totals but no full joint carrier-by-end-use breakdown. Their overall space/water proportions are therefore used as explicit allocation proxies for each carrier. This is a model assumption, not observed carrier-specific allocation. Existing electric heating in those sectors remains unsplit by technology. Residential measured SPF context does not validate transferring one mean to offices, hospitals or factories.

New heat-pump SPF includes its auxiliaries. Identified household legacy heating auxiliaries are modeled separately, with an explicit retirement credit to reduce double counting. The default removes 60% by full adoption; the actual allocation to replaced systems is unresolved. Service/industry auxiliary electricity is not separately identifiable and remains in retained demand. A more detailed installation model should replace these approximations.

Annual heating is on a 2024 weather basis. An explicit annual weather multiplier permits a stress case. It does not derive future climate, defrost, temperature-dependent capacity, hourly COP, thermal inertia or peak demand. The household retrofit/heat-intensity parameter is separate from that weather multiplier.

**Industrial processes and cooking.** The model converts selected non-electric process carriers to useful heat with a stated existing efficiency. It assigns a fraction of the converted input to industrial heat pumps and the remainder to direct electric heat. The heat-pump allocation must fall within the mathematical overlap bounds of the published carrier and below-100°C temperature totals. This checks consistency with the available marginal tables. It does not identify a joint distribution, prove a recoverable heat source, or demonstrate process feasibility. Retained electric process heat stays in the sector's existing electrical demand. Non-electric household cooking has its own input-to-electricity conversion ratio.

**Road transport.** For each covered mode, the model blends the existing electrical component with a fully electric alternative using the replacement progress. The fully electric alternative equals vehicle-km × battery kWh/km ÷ charging efficiency × domestic-charging multiplier. Activity growth is applied once. This construction reproduces existing charging at zero conversion and replaces it at full conversion, avoiding double counting current electric vehicles. A value above one for the domestic-charging multiplier represents Swiss charging that also supplies driving outside the country; it is not a probability or share.

Passenger cars, motorcycles/mopeds, buses/coaches, light freight and heavy freight have separate consumption parameters. Swiss and foreign cars/heavy vehicles are in the territorial activity totals. Foreign light freight is absent from the published light series; an explicit addition parameter exposes this gap. The 2024 light series is provisional. Bus/coaching activity pools public buses and private coaches; consistency with the BFE pooled energy category is not fully reconciled. None of the battery consumption parameters is presented as a measured Swiss fleet average. The archived truck-model coefficients and their variant workbooks have not been silently substituted for observed fleet consumption.

Rail, tram, trolleybus and other existing electric transport remain in the baseline remainder and scale separately. This version does not explicitly convert domestic aviation, navigation or non-road fuel consumption. International aviation, new hydrogen/e-fuel production, incremental data centres and district-heat electricity require stated scope choices. The last three have explicit electricity-addition controls; their default zero increments are not findings about future demand.

**Observed time series and validation.** `swissgrid-2024-hourly.csv.gz` is derived from all 35,136 source quarter hours. Each interval end is checked against an uninterrupted UTC sequence rendered in Europe/Zurich. Both repeated autumn hours survive; four intervals form each hour. Energy sums agree with the publisher's workbook summary. The observed control-block end-user curve differs from complete BFE national consumption; its 4.142911 TWh annual gap is not assigned wholesale to PV or traction. Published maximum values are average power over an interval, not instantaneous power.

The tests exercise no-change reconstruction, component sums, physical balance, correct removal of existing loads, kWh-to-TWh conversion, auxiliary accounting, invalid parameters and industrial feasibility. A separate validator checks input hashes, archived source values, derived time-series totals, scenario files and every earlier archive manifest. These are implementation and accounting checks. A predictive model fitted to earlier years and tested on withheld weather years remains the next stage; this version makes no predictive-validation claim.

**Reproduction and provenance.** Original data and archives remain untouched. `scripts/prepare_demand_model.py` reads the archived workbook and normalized transport sources into the baseline; `scripts/extract_grid_baseline.py` prepares observed intervals; `python -m scripts.build_demand_results` computes the scenario and sensitivity files and creates the report figures. `python -m scripts.validate_demand_model` verifies and seals this pass. Analysis-only dependencies are listed in `model/requirements-analysis.txt`; install them in a virtual environment. The normal calculator and its unit tests require only Python's standard library. Charts were generated with Matplotlib because it was absent from the bundled analysis runtime.

The [results report](/home/niko/Documents/swiss-energy/aidocs/023_demand_model_first_results.md) links the outputs. [Input provenance](/home/niko/Documents/swiss-energy/data/demand-model-v1/input-provenance.json) and the [new archive manifest](/home/niko/Documents/swiss-energy/backups/demand-model-v1-2026-09-10/SHA256SUMS) identify the exact inputs and implementation used for this version.
