Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lossy bidirectional links with length based efficiency #2

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
branches:
- main
schedule:
- cron: "0 5 * * 0"

jobs:
contrib-readme-job:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

env:
CACHE_NUMBER: 1 # Change this value to manually reset the environment cache
CACHE_NUMBER: 0 # Change this value to manually reset the environment cache

jobs:
run-tests:
Expand All @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
os: [ubuntu, macos] #, windows]
include:
- os: ubuntu
env_file: envs/linux-pinned.yaml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-pinned-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
- name: Add SPDX header
if: ${{ matrix.suffix != 'windows' }}
run: |
SPDX_HEADER="# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur Authors\n# SPDX-License-Identifier: CC0-1.0\n"
SPDX_HEADER="# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur Authors\n#\n# SPDX-License-Identifier: CC0-1.0\n"
echo -e "$SPDX_HEADER" | cat - envs/${{ matrix.suffix }}-pinned.yaml > temp && mv temp envs/${{ matrix.suffix }}-pinned.yaml

- name: Add SPDX header (windows)
if: ${{ matrix.suffix == 'windows' }}
run: |
$SPDX_HEADER = "# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur`r`n# SPDX-License-Identifier: CC0-1.0`r`n`r`n"
$SPDX_HEADER = "# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur`r`n#`r`n# SPDX-License-Identifier: CC0-1.0`r`n`r`n"
$CurrentContent = Get-Content "envs/${{ matrix.suffix }}-pinned.yaml" -Raw
$NewContent = $SPDX_HEADER + $CurrentContent
$NewContent | Set-Content "envs/${{ matrix.suffix }}-pinned.yaml"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ by

## Development Status: **Stable and Active**

[![Test workflows](https://github.com/pypsa-meets-earth/pypsa-earth/actions/workflows/ci.yml/badge.svg)](https://github.com/pypsa-meets-earth/pypsa-earth/actions/workflows/ci.yml)
[![Test workflows](https://github.com/pypsa-meets-earth/pypsa-earth/actions/workflows/test.yml/badge.svg)](https://github.com/pypsa-meets-earth/pypsa-earth/actions/workflows/test.yml)
[![Documentation Status](https://readthedocs.org/projects/pypsa-earth/badge/?version=latest)](https://pypsa-earth.readthedocs.io/en/latest/?badge=latest)
![Size](https://img.shields.io/github/repo-size/pypsa-meets-earth/pypsa-earth)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPLv3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
Expand Down
4 changes: 4 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ if config["augmented_line_connection"].get("add_to_snakefile", False) == False:

rule add_extra_components:
input:
overrides="data/override_component_attrs",
network="networks/" + RDIR + "elec_s{simpl}_{clusters}.nc",
tech_costs=COSTS,
output:
Expand Down Expand Up @@ -818,6 +819,8 @@ if config["monte_carlo"]["options"].get("add_to_snakefile", False) == False:
solving=config["solving"],
augmented_line_connection=config["augmented_line_connection"],
input:
overrides=os.getcwd() + "/data/override_component_attrs" if os.name == "nt"
else "/data/override_component_attrs", # on Windows os.getcwd() is required because of the "copy-minimal" shadow directory
network="networks/" + RDIR + "elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
output:
"results/" + RDIR + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
Expand Down Expand Up @@ -884,6 +887,7 @@ if config["monte_carlo"]["options"].get("add_to_snakefile", False) == True:
solving=config["solving"],
augmented_line_connection=config["augmented_line_connection"],
input:
overrides="data/override_component_attrs",
network="networks/"
+ RDIR
+ "elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{unc}.nc",
Expand Down
6 changes: 5 additions & 1 deletion config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ electricity:
Generator: [solar, onwind, offwind-ac, offwind-dc, OCGT]
StorageUnit: [] # battery, H2
Store: [battery, H2]
Link: [] # H2 pipeline
Link: [H2 pipeline] # H2 pipeline

powerplants_filter: (DateOut >= 2022 or DateOut != DateOut)
custom_powerplants: false # "false" use only powerplantmatching (ppm) data, "merge" combines ppm and custom powerplants, "replace" use only custom powerplants
Expand Down Expand Up @@ -683,6 +683,10 @@ sector:
biomass: biomass
keep_existing_capacities: true

transmission_efficiency:
H2 pipeline:
efficiency_per_1000km: 1
compression_per_1000km: 0.017 # DEA technology data. Mean of Energy losses, lines 5000-20000 MW and lines >20000 MW for 2020, 2030 and 2050, [%/1000 km]

solving:
options:
Expand Down
2 changes: 1 addition & 1 deletion doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ E.g. if a new rule becomes available describe how to use it `make test` and in o

* Adds code security scans via `CodeQL <https://codeql.github.com/>`__ to CI. `PR #1185 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1185>`__

* Adds CI to update keep pinned environment files up to date. `PR #1183 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1183>`__
* Adds CI to update keep pinned environment files up to date. `PR #1183 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1183>`__ and `PR #1210 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1210>`__

* Fix lossy bidirectional links, especially H2 pipelines, which would sometimes gain H2 instead of losing it. `PR #1192 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1192>`__

Expand Down
6 changes: 2 additions & 4 deletions envs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ dependencies:
- dask
# currently the packages are being installed with pip
# need to move back to conda once the issues will be resolved
# - powerplantmatching
- powerplantmatching>=0.5.19
# - earth-osm>=2.1
# until the release will incorporate all the fixes needed
# to work with CDS beta
# - atlite
- atlite>=0.3

# Dependencies of the workflow itself
- xlrd
Expand Down Expand Up @@ -85,8 +85,6 @@ dependencies:

- pip:
- earth-osm>=2.2 # until conda release it out for earth-osm
- powerplantmatching>=0.5.19 # until conda release it out for powerplantmatching
- git+https://github.com/pypsa/atlite@master
- git+https://github.com/davide-f/google-drive-downloader@master # google drive with fix for virus scan
- git+https://github.com/FRESNA/vresutils@master # until new pip release > 0.3.1 (strictly)
- tsam>=1.1.0
Expand Down
Loading
Loading