Skip to content

Commit 7cf816b

Browse files
committed
Merge branch 'main' of github.com:switchbox-data/npa-howtopay
2 parents 32b54e3 + a775697 commit 7cf816b

18 files changed

+116
-52
lines changed

docs/index.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@ package for ca_npa_howtopay
1010
## Overview
1111
The `npa-howtopay` package provides functionality for analyzing energy costs and project economics under different expense scenarios.
1212

13+
## Scenario Definitions
14+
| Scenario Name | Description |
15+
|--------------------|--------------------------------------------------------------------------------------------------|
16+
| bau | Business-as-usual (BAU): No NPA projects, baseline utility costs and spending. |
17+
| taxpayer | All NPA costs are paid by taxpayers, not by utility customers. |
18+
| gas_capex | Gas utility pays for NPA projects as capital expenditures (added to gas ratebase). |
19+
| gas_opex | Gas utility pays for NPA projects as operating expenses (expensed in year incurred). |
20+
| electric_capex | Electric utility pays for NPA projects as capital expenditures (added to electric ratebase). |
21+
| electric_opex | Electric utility pays for NPA projects as operating expenses (expensed in year incurred). |
22+
23+
Each scenario specifies who pays for NPA projects (gas utility, electric utility, or taxpayers) and whether costs are treated as capital (capex) or operating (opex) expenses.
24+
25+
26+
1327
## Core Modules
1428

1529
### Main Package (`npa_howtopay`)
1630
- **`run_model`** - Main function to execute the cost analysis model for a single scenario
17-
- **`analyze_scenarios`** - Execute run_model for all scenarios and return results and delta from BAU (no NPAs) dfs.
31+
- **`run_all_scenarios`** - Execute run_model for all scenarios and return all results
32+
- **`create_delta_df`** - Selects columns of interest from all results and calculates difference from BAU (expect for converter bills which are compared to non-converter bill in each scenario)
33+
- **`return_absolute_values_df`** - Concats dfs from `run_all_scenarios` and filters to selected columns
1834

1935
### Initialize Model
2036
If running locally:
@@ -54,5 +70,10 @@ from npa_howtopay import run_model, load_scenario_from_yaml
5470
scenario_runs = create_scenario_runs(2025, 2050, ["gas", "electric"], ["capex", "opex"])
5571
input_params = load_scenario_from_yaml(run_name)
5672
ts_params = load_time_series_params_from_yaml(run_name)
57-
results_df, delta_bau_df = analyze_scenarios(scenario_runs, input_params, ts_params)
73+
# Run model for all scenarios
74+
results_df_all = run_all_scenarios(scenario_runs, input_params, ts_params)
75+
# Single df with delta values
76+
delta_df = create_delta_df(results_df_all, COMPARE_COLS)
77+
# Single df with absolute values
78+
results_df = return_absolute_values_df(results_df_all, COMPARE_COLS)
5879
```
-46.8 KB
Loading
-15.5 KB
Loading

plots/ratebase_absolute.png

-51 KB
Loading

plots/ratebase_delta.png

-2.37 KB
Loading
-52.1 KB
Loading

plots/total_user_bills_delta.png

77.1 KB
Loading
-22.8 KB
Loading
-40.5 KB
Loading
-103 KB
Loading

0 commit comments

Comments
 (0)