Skip to content

Commit 9fa51cb

Browse files
tgilonlkstrpgithub-actions[bot]FabianHofmanncoroa
authored
Merge upstream (#31)
* Revert "Transition from stores to storage units for LTES, introducing energy-…" (PyPSA#1520) This reverts commit 0e6a8f8. * use pypi `pycipopt` (PyPSA#1524) * Update pinned environment files for all platforms (PyPSA#1523) Co-authored-by: lkstrp <[email protected]> * fix: ensure correct dtype of "reverse" column (PyPSA#1525) * fix: ensure correct dtype of "reverse" column * apply boolean dtype to reverse column in perfect-foresight * reinsert objective check * fix: improve selection of bidirectionals * fix: relax condition on sanitizing "reversed" column * revert some unneeded changes * debug: print dataframes in summary (to be reverted) * filter empty dfs in make summary * use highs-simplex instead of highs-default for ci --------- Co-authored-by: Lukas Trippe <[email protected]> * fix(add_electricity): Fix nuclear p_max_pu time-series for greenfield nuclear (PyPSA#1519) If nuclear is only part of extendable carriers, but not of convential carriers, then the typical "conventional: nuclear: p_max_pu" setting writes the file name all over the p_max_pu time-series, breaking the add_electricity rule. Co-authored-by: Fabian Hofmann <[email protected]> * solve_network: add customisable logging frequency (PyPSA#1521) Co-authored-by: Fabian Hofmann <[email protected]> Co-authored-by: Fabian Neumann <[email protected]> * Configurable cutout directory (PyPSA#1515) * make cutout dir configurable * feat: add global cutout_directory to config * add release notes * feat: add description to configtables --------- Co-authored-by: Fabian Neumann <[email protected]> * remove `highspy` pin (PyPSA#1528) * remove `highspy` pin * Update environment.yaml * Update environment.yaml --------- Co-authored-by: Fabian Hofmann <[email protected]> * Update pinned environment files for all platforms (PyPSA#1533) Co-authored-by: lkstrp <[email protected]> * Fixing snakemake shadow directory bug that occures with Windows/SMB drives (PyPSA#1535) * Fixing snakemake shadow directory bug that occures with Windows/SMB/network drives * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (PyPSA#1526) updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.3 → v0.9.4](astral-sh/ruff-pre-commit@v0.9.3...v0.9.4) - [github.com/codespell-project/codespell: v2.4.0 → v2.4.1](codespell-project/codespell@v2.4.0...v2.4.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Hofmann <[email protected]> * Update validate.yaml (PyPSA#1536) * Update validate.yaml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update validate.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Consistent function scope (PyPSA#1537) * start removing snakemake from functions * move snakemake objects out of prepare_sector_functions * continue with add_existing_baseyear * continue with prepare_perfect_foresight * apply it to add_electricity * continue with solve network * add pylint check to reusable functions * iron out follow up issues * adjust pylint check * Update pinned environment files for all platforms (PyPSA#1538) Co-authored-by: FabianHofmann <[email protected]> * Increase default mem_mb for config.default scope (PyPSA#1541) * Add a note to avoid updating pins without testing (PyPSA#1545) * [pre-commit.ci] pre-commit autoupdate (PyPSA#1539) updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.6](astral-sh/ruff-pre-commit@v0.9.4...v0.9.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Neumann <[email protected]> * Update pinned environment files for all platforms (PyPSA#1544) Co-authored-by: lkstrp <[email protected]> * Fix geothermal heat potentials (PyPSA#1516) * feat: refactor build_heat_source_potentials into build_geothermal_heat_potential and and use ISI Excel output as data source * feat: remove unnecessary snapshot index * chore: refactor accordingly * feat: fix scaling factor * feat: remove obsolete retrieve * docs: update docs * docs: update release notes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: use retrieve separate retrieve rules * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: remove conda env from new retrieve rules * fix file names * fix config passing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * style: remove snakemake access in add_heat --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (PyPSA#1552) * Change heat_vent config.default setting (PyPSA#1556) * change central_heat_vent in config.default to true, since water tank charger and discharger cant be used as heat vent anymore with branch ltes_stores * change release notes * corrected release notes * fix(benchmark): ignore keyboard interrupt in memory logging subprocess (PyPSA#1555) ensures a C-c is not consumed by the logging child process, but instead properly terminates the solver or main python process. * feat(ci): Remove defaults channel from conda setup and use strict channel prio (PyPSA#1554) * feat(ci): Remove defaults channel from conda setup and use strict channel prio With the default settings the generated pinned environments may still contain references to the defaults channel in certain cases (currently to zstandard), and the test workflow does not fail because it also falls back to the defaults channel. * Use miniforge version Avoids dependencies on proprietary anaconda pkgs channels * Update pinned environment files for all platforms (PyPSA#1553) Co-authored-by: coroa <[email protected]> * Updated eia hydro generation and capacity csv file to include data up to 2023 (PyPSA#1543) Updated the eia hydro generation and capacity up to 2023 Co-authored-by: Lukas Trippe <[email protected]> Co-authored-by: Fabian Neumann <[email protected]> * extend pre-built cutout years available (PyPSA#1559) * fix(solve): Fix planning_horizons in solve_network (PyPSA#1560) * fix: the planning_horizons params in CCL need to be string * docs: Update the docstring for planning_horizons. * fix: update planning_horizons parameter to use config_provider in perfect foresight * fix(solve): Consolidate use of planning horizons In perfect foresight, the planning_horizons param remains the list of all planning horizons (to trigger re-runs). The current planning horizons is always taken from the planning_horizons wildcard and passed into extra_functionality as a partial kwarg. * Add a specific not implemented AssertionError for CCL in perfect foresight * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: yechenyan <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (PyPSA#1564) updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.9.9](astral-sh/ruff-pre-commit@v0.9.7...v0.9.9) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * refactor: Rename "fixed" to "capital_cost" for annualised investment … (PyPSA#1566) * refactor: Rename "fixed" to "capital_cost" for annualised investment costs in sector-coupled networks * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Follow-up to PyPSA#1532 (PyPSA#1565) * overwrite cost table attributes specified in config in prepare_costs and load_costs (#23) * overwrite cost table attributes specified in config in prepare_costs and load_costs * add custom fuel prices from EEE project --------- Co-authored-by: Thomas Gilon <[email protected]> (cherry picked from commit 926f763) * Add logging to existing code * Document the changes * Fix issues with configuration * Add example in the default configuration file * Add release note * Remove fuel cost suggestion * feat(costs): Add support for overwriting investment, lifetime, FOM, VOM, efficiency, and fuel attributes in configuration * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * refactor(config): simplify overwrites structure in default configuration * refactor(costs): streamline overwriting of marginal and capital costs in configuration * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(prepare_sector_network): iterate over overwrites dictionary items for clarity * fix(prepare_costs): ensure overwrites are applied only to existing costs --------- Co-authored-by: Daniel Rüdt <[email protected]> Co-authored-by: Thomas Gilon <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Allow heat-venting in all heating systems and impose small penalty for water tank chargers (PyPSA#1563) * feat: add marginal cost for water tank chargers * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docs: update add_retrofit_gas_boiler_constraint docs * docs: update return type annotation for get_heat_system_type method * feat: add heat vents for decentral and rural heating * feat: remove unnecessary central_heat_vent config * feat: pass heat vent marginal cost to prepare_sector_network * refactor: rename marginal_cost_storage to marginal_cost_home_battery_storage * docs: update configtables * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docs: update release notes * feat: use :config:cost:marginal_cost where possible * Apply suggestions from code review --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Neumann <[email protected]> * [pre-commit.ci] pre-commit autoupdate (PyPSA#1569) updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.9.10](astral-sh/ruff-pre-commit@v0.9.9...v0.9.10) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * enh: enable running mock_snakemake from a separate workdir (PyPSA#1571) * enh: enable running mock_snakemake from a separate workdir Working directories are a simple mechanism of snakemake to have multiple not competing runs of the same workflow. Data, config and logfiles are expected relative to the directory specified with `--directory`, while all the source files (mainly script snakemake and environment definitions are resolved relative from the current snakefile). A new working directory can be quickly set up: ```shell mkdir workdir cp -lr -t workdir --parents cutouts $(git ls-files data) cp -r config workdir ``` Running it then works in the repo root like ```shell snakemake --directory workdir ... ``` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Jonas Hoersch <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Cluster network by shapes (NUTS0, NUTS1, NUTS2, NUTS3, and ADM1) (PyPSA#1502) * Updated shapes to high-res 1M NUTS2024 shapes and geoboundaries for non-NUTS countries (UA, MD, BA). * Updated nuts to 2021 and non-nuts to gadm. * Updated non NUTS country adm 1 boundaries to OSM via Overpass (MD, BA, UA, XK * Minor order update in rule. * Updated eurostat population data * Updated dataset to JRC ARDECO 2021, including UK, RS, CH * Finished new implementation of build_shapes. * Small fix. * Running sector-coupling workflow * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated build_shapes * Added release nots and updated data-bundle docs. * Added sandbox databundle for temporary CI testing. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix in build_shapes: Build only for selected countries in config. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removed jrc-data from repo, use REST API instead. removed params from build_osm_boundaries. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Re-added shape/polygon simplification. * Made build_osm_boundaries more robust, if wrong country components are retrieved. Reduced nuts shapes to 03m resolution. * Updated build_shapes with simplifying europe function to remove remote islands. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated back to 01m resolution. takes longer. * Removed test_build_shapes from testing, as outdated and not compatible with shapes PR * Readded test_build_shapes.py, however reduced testing, as 'countries()' does not exist anymore, replaced by create_regions(). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix for major Danish islands and Kopenhagen. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Initial working commit. * Initial working commit. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Finalised PR. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Reversed default mock_snakemake params. * Reversed prepare_network.py mock_snakemake * Updated workflow: Voronoi cell generation within admin shapes. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Code clean in cluster_network.py * Reverted mock snakemake to default. * Fixed deprecated typing. * Implemented robust merging algorith for clustering substation-less regions. * Finalised: Updating x,y coordinates to internal point; Always aggregating London area. * Bug fixes. * Reversed mock_snakemake. * Added in simplify_network: Stub-removal only within admin regions. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Fix merge issue * Apply suggestions * Apply pre-commit * Update default value in existing_capacities * fix: fix type for existing_capacities --------- Co-authored-by: Lukas Trippe <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: lkstrp <[email protected]> Co-authored-by: Fabian Hofmann <[email protected]> Co-authored-by: Jonas Hörsch <[email protected]> Co-authored-by: Philipp Glaum <[email protected]> Co-authored-by: Fabian Neumann <[email protected]> Co-authored-by: Bobby Xiong <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: FabianHofmann <[email protected]> Co-authored-by: Amos Schledorn <[email protected]> Co-authored-by: TomKae00 <[email protected]> Co-authored-by: Jonas Hörsch <[email protected]> Co-authored-by: coroa <[email protected]> Co-authored-by: Lukas <[email protected]> Co-authored-by: yechenyan <[email protected]> Co-authored-by: Daniel Rüdt <[email protected]> Co-authored-by: Jonas Hoersch <[email protected]>
1 parent eed06cd commit 9fa51cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3670
-1434
lines changed

.github/workflows/test.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ jobs:
7070

7171
- uses: conda-incubator/setup-miniconda@v3
7272
with:
73+
miniforge-version: latest
7374
activate-environment: pypsa-eur
75+
channel-priority: strict
7476

7577
- name: Cache Conda env
7678
uses: actions/cache@v4
@@ -85,6 +87,11 @@ jobs:
8587
conda env update -n pypsa-eur -f ${{ env.env_file }}
8688
echo "Run conda list" && conda list
8789
90+
- name: Run pylint check on scripts
91+
# check for undefined variables to reuse functions across scripts
92+
run: |
93+
pylint --disable=all --enable=E0601 --output-format=parseable scripts/add_* scripts/prepare_* scripts/solve_*
94+
8895
- name: Run snakemake test workflows
8996
run: |
9097
make test

.github/workflows/update-pinned-env.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ jobs:
3434
- name: Setup conda
3535
uses: conda-incubator/setup-miniconda@v3
3636
with:
37+
miniforge-version: latest
3738
activate-environment: ${{ github.event.repository.name }}
38-
channels: bioconda,conda-forge,defaults
39+
channel-priority: strict
3940
environment-file: ${{ env.BASE_ENV }}
4041

4142
- name: Update pinned environment per OS
@@ -83,5 +84,8 @@ jobs:
8384
token: ${{ secrets.GITHUB_TOKEN }}
8485
branch: update-pinned-environment
8586
title: "[github-actions.ci] Update pinned envs"
86-
body: "Automatically generated PR to update pinned environment files for Windows, macOS, and Linux."
87+
body: |
88+
Automatically generated PR to update pinned environment files for Windows, macOS, and Linux.
89+
90+
**Note: Do not merge without manual test execution. Either update the branch to trigger tests, or use `workflow_dispatch` to run tests manually. Unlike standard PRs, tests will not run automatically.**
8791
commit-message: "Update pinned environment files for all platforms"

.github/workflows/validate.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,33 @@ jobs:
1414
name: Run validation
1515
if: github.event.pull_request.head.repo.full_name == github.repository
1616
runs-on: self-hosted
17+
outputs:
18+
validation_failed: ${{ steps.check_validation.outputs.failed }}
1719
steps:
1820
- uses: lkstrp/[email protected]
21+
id: validation
22+
continue-on-error: true
1923
with:
2024
step: run-self-hosted-validation
2125
env_file: envs/environment.yaml
2226
snakemake_config: config/test/config.validator.yaml
2327
env:
2428
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Check validation status
30+
id: check_validation
31+
run: |
32+
if [[ "${{ steps.validation.outcome }}" == "failure" ]]; then
33+
echo "failed=true" >> $GITHUB_OUTPUT
34+
else
35+
echo "failed=false" >> $GITHUB_OUTPUT
36+
fi
2537
2638
create-report:
2739
name: Create report
28-
if: github.event.pull_request.head.repo.full_name == github.repository
2940
needs: run-validation
41+
if: |
42+
github.event.pull_request.head.repo.full_name == github.repository &&
43+
needs.run-validation.outputs.validation_failed != 'true'
3044
runs-on: ubuntu-latest
3145
steps:
3246
- uses: lkstrp/[email protected]

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
# Run ruff to lint and format
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
1616
# Ruff version.
17-
rev: v0.9.3
17+
rev: v0.9.10
1818
hooks:
1919
# Run the linter.
2020
- id: ruff
@@ -24,7 +24,7 @@ repos:
2424

2525
# Find common spelling mistakes in comments and docstrings
2626
- repo: https://github.com/codespell-project/codespell
27-
rev: v2.4.0
27+
rev: v2.4.1
2828
hooks:
2929
- id: codespell
3030
args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor,pris'] # Ignore capital case words, e.g. country codes

Snakefile

+12-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44

55
from pathlib import Path
66
import yaml
7-
from os.path import normpath, exists
7+
from os.path import normpath, exists, join
88
from shutil import copyfile, move, rmtree
99
from snakemake.utils import min_version
1010

1111
min_version("8.11")
1212

13-
from scripts._helpers import path_provider, copy_default_files, get_scenarios, get_rdir
13+
from scripts._helpers import (
14+
path_provider,
15+
copy_default_files,
16+
get_scenarios,
17+
get_rdir,
18+
get_shadow,
19+
)
1420

1521

1622
copy_default_files(workflow)
@@ -23,14 +29,16 @@ configfile: "config/config.yaml"
2329
run = config["run"]
2430
scenarios = get_scenarios(run)
2531
RDIR = get_rdir(run)
32+
shadow_config = get_shadow(run)
2633

2734
shared_resources = run["shared_resources"]["policy"]
2835
exclude_from_shared = run["shared_resources"]["exclude"]
2936
logs = path_provider("logs/", RDIR, shared_resources, exclude_from_shared)
3037
benchmarks = path_provider("benchmarks/", RDIR, shared_resources, exclude_from_shared)
3138
resources = path_provider("resources/", RDIR, shared_resources, exclude_from_shared)
3239

33-
CDIR = "" if run["shared_cutouts"] else RDIR
40+
cutout_dir = config["atlite"]["cutout_directory"]
41+
CDIR = join(cutout_dir, ("" if run["shared_cutouts"] else RDIR))
3442
RESULTS = "results/" + RDIR
3543

3644

@@ -39,7 +47,7 @@ localrules:
3947

4048

4149
wildcard_constraints:
42-
clusters="[0-9]+(m|c)?|all",
50+
clusters="[0-9]+(m|c)?|all|adm",
4351
ll=r"(v|c)([0-9\.]+|opt)",
4452
opts=r"[-+a-zA-Z0-9\.]*",
4553
sector_opts=r"[-+a-zA-Z0-9\.\s]*",

config/config.default.yaml

+33-16
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ run:
3030
policy: false
3131
exclude: []
3232
shared_cutouts: true
33+
use_shadow_directory: true # Set to false if problems regarding missing directories occur
3334

3435
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#foresight
3536
foresight: overnight
@@ -67,7 +68,6 @@ enable:
6768
retrieve_cost_data: true
6869
build_cutout: false
6970
retrieve_cutout: true
70-
custom_busmap: false
7171
drop_leap_day: true
7272

7373
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#co2-budget
@@ -132,6 +132,7 @@ electricity:
132132

133133
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#atlite
134134
atlite:
135+
cutout_directory: cutouts
135136
default_cutout: europe-2013-sarah3-era5
136137
nprocesses: 4
137138
show_progress: false
@@ -480,16 +481,9 @@ sector:
480481
heat_exchanger_pinch_point_temperature_difference: 5 #K
481482
isentropic_compressor_efficiency: 0.8
482483
heat_loss: 0.0
483-
heat_utilisation_potentials:
484+
limited_heat_sources:
484485
geothermal:
485-
# activate for 85C hydrothermal
486-
# key: hydrothermal_85
487-
# constant_temperature_celsius: 85
488-
key: hydrothermal_65
489486
constant_temperature_celsius: 65
490-
column_name: Energy_TWh
491-
unit: TWh
492-
full_load_hours: 4000
493487
direct_utilisation_heat_sources:
494488
- geothermal
495489
heat_pump_sources:
@@ -618,12 +612,15 @@ sector:
618612
micro_chp: false # Only gas is used for micro_chp
619613
solar_thermal: true
620614
solar_cf_correction: 0.788457 # = >>> 1/1.2683
621-
marginal_cost_storage: 0. #1e-4
622615
methanation: true
623616
coal_cc: false
624617
dac: true
625618
co2_vent: false
626-
central_heat_vent: false
619+
heat_vent:
620+
urban central: true
621+
urban decentral: true
622+
rural: true
623+
marginal_cost_heat_vent: 0.02
627624
allam_cycle_gas: false
628625
hydrogen_fuel_cell: true
629626
hydrogen_turbine: false
@@ -851,9 +848,7 @@ costs:
851848
lifetime: 25
852849
"CO2 intensity": 0
853850
"discount rate": 0.07
854-
# Marginal and capital costs can be overwritten
855-
# capital_cost:
856-
# onwind: 500
851+
overwrites: {}
857852
marginal_cost:
858853
solar: 0.01
859854
onwind: 0.015
@@ -864,13 +859,18 @@ costs:
864859
fuel cell: 0.
865860
battery: 0.
866861
battery inverter: 0.
862+
home battery storage: 0
863+
water tank charger: 0.03
867864
emission_prices:
868865
enable: false
869866
co2: 0.
870867
co2_monthly_prices: false
871868

872869
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#clustering
873870
clustering:
871+
mode: busmap
872+
administrative:
873+
level: 1
874874
focus_weights: false
875875
simplify_network:
876876
to_substations: false
@@ -964,6 +964,12 @@ solving:
964964
ipm_optimality_tolerance: 1e-4
965965
parallel: "on"
966966
random_seed: 123
967+
highs-simplex:
968+
solver: "simplex"
969+
parallel: "on"
970+
primal_feasibility_tolerance: 1e-5
971+
dual_feasibility_tolerance: 1e-5
972+
random_seed: 123
967973
gurobi-default:
968974
threads: 8
969975
method: 2 # barrier
@@ -1020,6 +1026,7 @@ solving:
10201026
rtol: 0.01
10211027

10221028
mem_mb: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2
1029+
memory_logging_frequency: 30 # in seconds
10231030
runtime: 6h #runtime in humanfriendly style https://humanfriendly.readthedocs.io/en/latest/
10241031

10251032

@@ -1210,8 +1217,18 @@ plotting:
12101217
services urban decentral water tanks: '#f1b4a4'
12111218
urban central water tanks: '#e9977d'
12121219
hot water storage: '#e69487'
1213-
water pits: '#cc826a'
1214-
urban central water pits: '#d96f4c'
1220+
hot water charging: '#e8998b'
1221+
urban central water tanks charger: '#b57a67'
1222+
residential rural water tanks charger: '#b4887c'
1223+
residential urban decentral water tanks charger: '#b39995'
1224+
services rural water tanks charger: '#b3abb0'
1225+
services urban decentral water tanks charger: '#b3becc'
1226+
hot water discharging: '#e99c8e'
1227+
urban central water tanks discharger: '#b9816e'
1228+
residential rural water tanks discharger: '#ba9685'
1229+
residential urban decentral water tanks discharger: '#baac9e'
1230+
services rural water tanks discharger: '#bbc2b8'
1231+
services urban decentral water tanks discharger: '#bdd8d3'
12151232
# heat demand
12161233
Heat load: '#cc1f1f'
12171234
heat: '#cc1f1f'

config/test/config.electricity.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ lines:
8080
solving:
8181
solver:
8282
name: highs
83-
options: highs-default
83+
options: highs-simplex
8484

8585
check_objective:
86-
enable: false
86+
enable: true
8787
expected_value: 3.8120188094e+07
8888

8989
plotting:

config/test/config.myopic.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ industry:
8585
solving:
8686
solver:
8787
name: highs
88-
options: highs-default
88+
options: highs-simplex
8989
mem: 4000
9090

9191
plotting:

config/test/config.overnight.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ industry:
7979
solving:
8080
solver:
8181
name: highs
82-
options: highs-default
82+
options: highs-simplex
8383
mem: 4000
8484

8585
check_objective:
86-
enable: false
87-
expected_value: 7.0847670388e+08
86+
enable: true
87+
expected_value: 6.96e+08
8888

8989
plotting:
9090
map:

config/test/config.perfect.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ industry:
8484
solving:
8585
solver:
8686
name: highs
87-
options: highs-default
87+
options: highs-simplex
8888
mem: 4000
8989

9090
check_objective:
91-
enable: false
92-
expected_value: 1.4427662256e+10
91+
enable: true
92+
expected_value: 1.3778753459e+10
9393

9494
plotting:
9595
map:

config/test/config.scenarios.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ renewable:
5858
solving:
5959
solver:
6060
name: highs
61-
options: highs-default
61+
options: highs-simplex

0 commit comments

Comments
 (0)