pypsa-eur/rules/solve_electricity.smk
Fabian Neumann 013b705ee4
Clustering: build renewable profiles and add all assets after clustering (#1201)
* Cluster first: build renewable profiles and add all assets after clustering

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* correction: pass landfall_lengths through functions

* assign landfall_lenghts correctly

* remove parameter add_land_use_constraint

* fix network_dict

* calculate distance to shoreline, remove underwater_fraction

* adjust simplification parameter to exclude Crete from offshore wind connections

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused geth2015 hydro capacities

* removing remaining traces of {simpl} wildcard

* add release notes and update workflow graphics

* [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>
Co-authored-by: lisazeyen <lisa.zeyen@web.de>
2024-09-13 15:37:01 +02:00

77 lines
2.7 KiB
Plaintext

# SPDX-FileCopyrightText: : 2023-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
rule solve_network:
params:
solving=config_provider("solving"),
foresight=config_provider("foresight"),
planning_horizons=config_provider("scenario", "planning_horizons"),
co2_sequestration_potential=config_provider(
"sector", "co2_sequestration_potential", default=200
),
custom_extra_functionality=input_custom_extra_functionality,
input:
network=resources("networks/base_s_{clusters}_elec_l{ll}_{opts}.nc"),
output:
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
config=RESULTS + "configs/config.base_s_{clusters}_elec_l{ll}_{opts}.yaml",
log:
solver=normpath(
RESULTS
+ "logs/solve_network/base_s_{clusters}_elec_l{ll}_{opts}_solver.log"
),
python=RESULTS
+ "logs/solve_network/base_s_{clusters}_elec_l{ll}_{opts}_python.log",
benchmark:
(RESULTS + "benchmarks/solve_network/base_s_{clusters}_elec_l{ll}_{opts}")
threads: solver_threads
resources:
mem_mb=memory,
runtime=config_provider("solving", "runtime", default="6h"),
shadow:
"shallow"
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_network.py"
rule solve_operations_network:
params:
options=config_provider("solving", "options"),
solving=config_provider("solving"),
foresight=config_provider("foresight"),
planning_horizons=config_provider("scenario", "planning_horizons"),
co2_sequestration_potential=config_provider(
"sector", "co2_sequestration_potential", default=200
),
custom_extra_functionality=input_custom_extra_functionality,
input:
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
output:
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}_op.nc",
log:
solver=normpath(
RESULTS
+ "logs/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}_op_solver.log"
),
python=RESULTS
+ "logs/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}_op_python.log",
benchmark:
(
RESULTS
+ "benchmarks/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}"
)
threads: 4
resources:
mem_mb=(lambda w: 10000 + 372 * int(w.clusters)),
runtime=config_provider("solving", "runtime", default="6h"),
shadow:
"shallow"
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_operations_network.py"