Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3e0b88f
Catch missing home battery efficiency within function
Feb 5, 2025
ae803f2
only set efficiency for relevant storage units
Feb 6, 2025
1292670
allow to use egon-data configuration files without setting up an ssh …
Feb 6, 2025
6abd429
Detect TOEP Database and Enable Translated Table Names
joda9 Feb 6, 2025
45e43f7
setup workshop jupyter notebook
Feb 11, 2025
427944c
Jupyter notebook LoMa Workshop
Feb 11, 2025
97e46f5
Merge branch 'bug/#450-bug-database-imports-not-working-ssh-tunnel-li…
Feb 11, 2025
b094b47
Merge remote-tracking branch 'origin/bug/#450-bug-database-imports-no…
Feb 11, 2025
6b58f58
bugfix wrong schema name in heat pump import
Feb 11, 2025
e2d80ab
adapt notebook to use hetzner db
Feb 11, 2025
4998b8d
fix wrong variable name
Feb 12, 2025
0029d01
make it possible to setup edisgo instance without connecting to oedb
Feb 12, 2025
1b4057a
only get table and schema mapping from db if loading data from (t)oep
Feb 12, 2025
a323903
adapt whatsnew
Feb 12, 2025
8f126a3
use provided engine in config.py
Feb 12, 2025
3bdb727
Fix missing timeindex in set_time_series_active_power_predefined
Feb 17, 2025
0f06d0f
Merge pull request #458 from openego/feature/#456-feature-set-default…
khelfen Feb 17, 2025
bb1f3b4
Overwrite timeindex if given timeindex differs from existing timeinde…
Feb 17, 2025
bad14a9
Merge pull request #459 from openego/feature/#456-feature-set-default…
khelfen Feb 17, 2025
aa075cc
add logging and correct timeindex variable handling
Feb 17, 2025
f5ed235
Merge pull request #460 from openego/feature/#456-feature-set-default…
khelfen Feb 17, 2025
f4253bf
Refactor test cases for improved readability and consistency
joda9 Feb 18, 2025
fa7ff54
updated tests with new warning text
joda9 Feb 18, 2025
76a93c8
Merge branch 'feature/use_TOEP_token' into bug/#450-bug-database-impo…
Feb 18, 2025
57aa264
Merge pull request #465 from openego/feature/#456-feature-set-default…
khelfen Feb 19, 2025
2400fb4
Merge branch 'feature/446-feature-improve-apply_reference_operation-c…
Feb 19, 2025
70b852e
Merge remote-tracking branch 'origin/bug/#450-bug-database-imports-no…
Feb 19, 2025
2fca51c
Refactor object copying in EDisGo class
Feb 19, 2025
dffa1f7
Merge pull request #468 from openego/bug/#450-bug-database-imports-no…
khelfen Feb 19, 2025
567770d
Jupyter Notebook for LoMa Workshop
Feb 18, 2025
426562c
Jupyter Notebook for LoMa Workshop
Feb 18, 2025
dfcf353
Pre-final Jupyter Notebook for LoMa Workshop Part 2
Feb 25, 2025
3eab631
Workshop date modified
Feb 25, 2025
f32abbc
Small changes
Feb 25, 2025
3da99f9
Workshop notebooks with and w/o solutions for 27th Feb
Feb 26, 2025
76e5e9d
Update Workshop Notebooks
Feb 26, 2025
e136f25
fix: rename default schema from 'dataset' to 'data' in Config class
Nov 3, 2025
2d4a434
comment out loading of switches dataframe in import_ding0_grid functi…
joda9 Nov 3, 2025
3df5d9d
feat: add active_power_p_max_pu method to scale generator time series…
joda9 Nov 3, 2025
c3bdf26
fix: initialize engine in get_weather_cells_intersecting_with_grid_di…
joda9 Nov 3, 2025
157bc3e
Merge branch 'project/411-LoMa' into project/LoMa
joda9 Nov 5, 2025
3e7dbbf
Updated TOEP functionallity
joda9 Nov 5, 2025
4ea9d8b
fix: update engine initialization to use toep egon_engine
Nov 5, 2025
0a838e2
update timeindex handling in EDisGo class and adjust database schema …
joda9 Oct 14, 2025
d69fb87
Merge pull request #539 from openego:dev
joda9 Dec 5, 2025
8c7e0de
Merge pull request #544 from openego:dev
joda9 Dec 5, 2025
82bf68b
feat: Implement §14a EnWG curtailment for heat pumps with virtual gen…
joda9 Dec 11, 2025
51b73aa
feat: Add §14a support for charging point curtailment using virtual g…
joda9 Dec 11, 2025
230a4a2
feat: Implement §14a virtual generator support for charging points wi…
joda9 Dec 11, 2025
c8ee3eb
feat: Enhance §14a support for charging points with virtual generator…
joda9 Dec 11, 2025
a99219e
Add multiple some comments
joda9 Dec 12, 2025
d3069a4
Add quick start guide for §14a EnWG curtailment analysis with heat pu…
Dec 12, 2025
58a24e7
add example for using 14a optimization
Dec 12, 2025
1fbb4c9
Merge branch 'dev' into project/411_LoMa_14aOptimization_with_virtual…
joda9 Dec 12, 2025
68871c8
Merge branch 'dev' into project/411_LoMa_14aOptimization_with_virtual…
joda9 Dec 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions Optimization14A_quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# §14a EnWG Curtailment Analysis - Quick Start Guide

## What does `analyze_14a.py` do?

This script performs a complete §14a curtailment analysis for heat pumps and charging points in a distribution grid:

1. **Loads a grid** (ding0 format)
2. **Adds heat pumps** (50 units, 11-20 kW, realistic size distribution)
3. **Adds charging points** (30 units, 3.7-50 kW, home/work/fast charging)
4. **Generates realistic winter timeseries** (configurable days, default: 7 days)
5. **Runs OPF with §14a curtailment** (opf_version=3)
6. **Analyzes curtailment results** (statistics, daily/monthly aggregation)
7. **Creates visualizations** (3 plots: timeseries, HP profiles, CP profiles)
8. **Exports CSV data** (summary, curtailment data, totals per HP/CP)

**Output:** Results folder with plots and CSV files for detailed analysis.

---

## Setup & Run (Complete Workflow)

### Create Project Directory

```bash
# Create and navigate to project directory
mkdir -p ~/projects/edisgo_14a
cd ~/projects/edisgo_14a
```

### Clone eDisGo Repository

```bash
# Clone the repository
git clone https://github.com/openego/eDisGo.git
cd eDisGo

# Checkout the §14a feature branch
git checkout project/411_LoMa_14aOptimization_with_virtual_generators
```

### Setup Python Environment

```bash
# Create Python 3.11 virtual environment
python3.11 -m venv .venv

# Activate virtual environment
source .venv/bin/activate # Linux/Mac
# OR
.venv\Scripts\activate # Windows

# Upgrade pip
pip install --upgrade pip setuptools wheel
```

### Install eDisGo

```bash
# Install eDisGo in development mode
python -m pip install -e .[dev] # install eDisGo from source
```

The script uses grid data from the `30879` folder:

```bash
# Navigate to workspace root
cd ~/projects/edisgo_14a

# Grid folder should be at:
# ~/projects/edisgo_14a/30879/
# with files: buses.csv, lines.csv, generators.csv, etc.

# Verify grid data exists
ls -lh 30879/
```

### Run the Analysis

```bash
# Navigate to script location
cd ~/projects/edisgo_14a

# Run the analysis
python analyze_14a.py
```

**Expected runtime:** 5-15 minutes (depending on hardware)

---

## Configuration

Edit these variables in `analyze_14a.py` (around line 1015):

```python
# Grid configuration
GRID_PATH = "./30879" # Path to ding0 grid folder
SCENARIO = "eGon2035" # Scenario name

# Simulation parameters
NUM_DAYS = 7 # Number of days to simulate (7, 30, 365)
NUM_HEAT_PUMPS = 50 # Number of heat pumps to add
NUM_CHARGING_POINTS = 30 # Number of charging points to add

# Output
OUTPUT_DIR = "./" # Where to save results
```

---

## Output Files

After running, you'll find a results folder:

```
results_7d_HP50_CP30_14a/
├── summary_statistics.csv # Overall statistics
├── curtailment_timeseries.csv # Hourly curtailment per HP/CP
├── curtailment_daily.csv # Daily aggregation
├── curtailment_monthly.csv # Monthly aggregation
├── hp_curtailment_total.csv # Total curtailment per HP
├── cp_curtailment_total.csv # Total curtailment per CP
├── curtailment_timeseries.png # Time series plot
├── detailed_hp_profiles.png # Detailed HP profile
└── detailed_cp_profiles.png # Detailed CP profile (if curtailed)
```

---

## Using Your Own Grid

### Option 1: Use Another ding0 Grid

```python
# In analyze_14a.py, change GRID_PATH:
GRID_PATH = "/path/to/your/ding0/grid/folder"

# Grid folder must contain:
# - buses.csv
# - lines.csv
# - generators.csv
# - loads.csv
# - transformers.csv
# - etc.
```
5 changes: 4 additions & 1 deletion doc/whatsnew/v0-3-0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ Changes
* Move function to assign feeder to Topology class and add methods to the Grid class to get information on the feeders `#360 <https://github.com/openego/eDisGo/pull/360>`_
* Added a storage operation strategy where the storage is charged when PV feed-in is higher than electricity demand of the household and discharged when electricity demand exceeds PV generation `#386 <https://github.com/openego/eDisGo/pull/386>`_
* Added an estimation of the voltage deviation over a cable when selecting a suitable cable to connect a new component `#411 <https://github.com/openego/eDisGo/pull/411>`_
* Added clipping of heat pump electrical power at its maximum value #428 <https://github.com/openego/eDisGo/pull/428>
* Added clipping of heat pump electrical power at its maximum value `#428 <https://github.com/openego/eDisGo/pull/428>`_
* Loading predefined time series now automatically sets the timeindex to the default year of the database if it is empty. `#457 <https://github.com/openego/eDisGo/pull/457>`_
* Made OEP database call optional in get_database_alias_dictionaries, allowing setup without OEP when using an alternative eGon-data database. `#451 <https://github.com/openego/eDisGo/pull/451>`_
* Fixed database import issues by addressing table naming assumptions and added support for external SSH tunneling in eGon-data configurations. `#451 <https://github.com/openego/eDisGo/pull/451>`_
2 changes: 1 addition & 1 deletion edisgo/config/config_opf_julia_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

[julia_dir]

julia_bin = julia-1.1.0/bin
julia_bin = julia/bin
Loading
Loading