Commit Graph

306 Commits

Author SHA1 Message Date
Martha Maria
cfb979a0d0
Custom busmap for clustering (#193)
* add option to use custom clustermaps from data folder

* adapt default config to custom busmap

* input file from Snakefile

* adapt input description

* add option to use custom clustermaps from data folder

* adapt default config to custom busmap

* input file from Snakefile

* adapt input description

* Snakefile: custom_busmap in cluster_network input is now csv

* cluster_network: custom_busmap is now read as csv file, adaptions of description

* simplify_network: adapt descriptions

* configfiles: add cutom_clustermaps switch

* unify clustarmap and busmap names

* unify clustermap and busmap names

* test/config: unify clustermap and busmap names

* cluster_network: make clustering_for_n_clusters compatible with simplify_network

* simplify_network: make compatible with changes in cluster_network.py

* Update scripts/cluster_network.py

* Update scripts/simplify_network.py

* Update scripts/simplify_network.py

* Update scripts/cluster_network.py

* Update scripts/cluster_network.py

* cluster_network: move custom_busmap flag to enable; simplify names

* cluster_network: move custom_busmap flag to enable; simplify names

* custom_busmap: add documentation

* cluster_network: add default for custom_busmap for compatibility with old configs

* cluster_network: add default for custom_busmap for compatibility with old configs

Co-authored-by: martha.frysztacki <eb5194@iai-esm003.iai.kit.edu>
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2020-12-03 15:17:16 +01:00
FabianHofmann
9792069ab3
Update load processing (#211)
* build_load_data

* Add documentation

* updating load data import

* Update Config files

* Update load.csv

* Update add_electricity.py

* change log file name

* Update scripts/add_electricity.py

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>

* Update scripts/build_load_data.py

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>

* Update scripts/build_load_data.py

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>

* Update scripts/build_load_data.py

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>

* Update build_load_data.py

* Update build_load_data.py

* Update scripts/build_load_data.py

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>

* update gap handling in build_load_data

* Update build_load_data.py

* Update config.test1.yaml

* update test.config

* Update config.tutorial.yaml

* update load csv function for load data

* Update build_load_data.py

* Update config.test1.yaml

* Update add_electricity.py

* Update build_load_data.py

* Added error messages if load data contains gaps after modifications

* general adjustments:
	- reduce data source to only entsoe statistics
	- sanitize code
	- adjust logging messages
	- adjust daocstrings

* update Snakefile config and docs

* update release notes
rename build_load -> build_load_data in config

* small follow up

* - reintroduce choice between powerstatistics and transparency
- remove load_ timeseries from databundle
- always build load_data
- reinsert scaling factor in config
- fix url to 2019 version

* update doc: configtable, release notes
update config.yaml

* follow up

Co-authored-by: Jan Frederick <jan.frederick.unnewehr@inatech.uni-freiburg.de>
Co-authored-by: JanFrederickUnnewehr <50404069+JanFrederickUnnewehr@users.noreply.github.com>
2020-12-03 12:49:04 +01:00
Fabian Neumann
f18b7b02cb
StorageUnit correct efficiency_dispatch/store (counter-proposal 2) (#202)
* fix efficiencies of storage units counter proposal

* extra_components: fix roundtrip efficiency

* add_electricity: remove misleading roundtrip efficiency for storageunit

* add release notes
2020-12-03 10:02:23 +01:00
Fabian Neumann
03170f4aaf
add option for p_nom_max factors in {opts} wildcard (#207)
* prepare: add option for potential reduction sweeps

* prepare: fix attr lookup for potential/cost reduction sweeps

* prepare: fix attr naming cost -> capital_cost

* add release notes
2020-11-26 17:25:14 +01:00
Fabian Neumann
bfbf595ad8
Parameter corrections for East-Western and Anglo-Scottish interconnection (#206)
* data: parameter corrections for East-Western and Anglo-Scottish interconnector

* add release notes
2020-11-26 17:20:48 +01:00
Fabian Neumann
2e70e8d15b
prepare: fix transmission limit when no HVDC links in network (#209) 2020-11-12 17:37:43 +01:00
Fabian Neumann
984e688615 skip cost aggregation of component if empty 2020-10-28 15:30:36 +01:00
Martha Maria
52683236cd
prepare_network: fix nmo security margin (#199)
* prepare_network: fix nmo security margin

* Update doc/release_notes.rst

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>

* Update scripts/prepare_network.py

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2020-10-02 15:55:22 +02:00
Martha Maria
2e76b88ec8
simplify_ and cluster_network: clustermaps to csv (#198)
* simplify and clustering: output and input from HDF format to CSV

* add release notes

* simplify and clustering: output files from Snakefile
2020-10-02 12:53:56 +02:00
Fabian Neumann
ab6dc633bf
Options for regional equity and autarky (#166)
* solve: add option for equity constraints

* solve: scale more

* prepare: add option to limit line/link capacity

* solve: add inflow to EQ constraints

* solve: reindex inflow to match load

* update config files and references

* add autarky option

* move release notes

* add spillage to equity requirements

* prepare: fix accidental code removal

* prepare: add country autarky option

* consider snapshot_weightings for inflow

* trigger CI
2020-09-26 13:10:50 +02:00
Fabian Neumann
c543fb39c6
cluster: fix removing deprec squeeze=True in groupby (#194) 2020-09-25 12:34:34 +02:00
martha.frysztacki
9331f1ec46 cluster_network: The 'squeeze' parameter is deprecated and will be removed in a future release; works just fine without it 2020-09-24 17:46:20 +02:00
Martha Maria
047276b2dc
Fix clustering sites (#191)
* fix clustering of offwind-ac and offwind-dc in sites option

* add release nodes

Co-authored-by: martha.frysztacki <eb5194@iai-esm003.iai.kit.edu>
2020-09-24 10:13:13 +02:00
Fabian Neumann
ec803a372e
add cost uncertainty opts for suptechs (#189) 2020-09-24 10:09:11 +02:00
Fabian
fee8ef92d4 fixup (follow up to #183) correct transmission constraint name 2020-08-28 22:28:23 +02:00
FabianHofmann
cfd815aa42
Don't remove capital cost for lines and links when setting lv, lc limit (#183)
* solve #175

* adjust wildcards explanation

* allow lv and lc limits below 1
2020-08-28 17:59:51 +02:00
FabianHofmann
04f19f214d
fix emission prices (#171)
* fix emission prices

I'm not sure if the previous setup was intentional, but regarding that different generators might have different efficiencies and the emissions are carrier specific only, it makes more sense set net emission price.

* small fix

* update release_notes and config
2020-08-25 12:12:00 +02:00
Fabian Neumann
e2c3b80ec4
Remove onwind-landcosts from data/costs.csv and add_electricity.py (#180) 2020-08-24 11:19:57 +02:00
FabianHofmann
1cde8d300a
Fix up add_nice_carrier_names for new pandas (#178)
* solve #174

* update release notes

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2020-08-24 11:04:54 +02:00
Fabian Neumann
2f4852347a
Fix two issues with new 2020 ENTSO-E grid extract (#181)
* base: fix errors in new entsoe extract

* add release notes

* apply suggestions from code review - remove hardcode
2020-08-24 10:33:46 +02:00
Fabian Neumann
8c5efb5252
add compatibility with pyomo 5.7.0 (#172)
* add compatibility with pyomo 5.7.0

* add release notes [skip travis]
2020-07-20 17:33:15 +02:00
Fabian Neumann
165dd2d440
uncertain costs: facilitate parameter sweep (#167)
* add opts for cost parameter sweep

* add pr link to release note
2020-07-10 16:41:44 +02:00
Fabian Neumann
2627c96a9e
Prepare Release v0.2.0 (#165)
* prepare release v0.2.0

* prepare release v0.2.0 v2 [skip travis]
2020-06-08 20:43:35 +02:00
Fabian Neumann
d66b70e180 doc: update release notes and documentation [skip travis] 2020-06-08 18:29:15 +02:00
Fabian Neumann
4448cb747e Merge branch 'renewable_profiles_option_using_all_available_areas' of https://github.com/JanFrederickUnnewehr/pypsa-eur into JanFrederickUnnewehr-renewable_profiles_option_using_all_available_areas 2020-06-08 18:15:17 +02:00
Jonas Hörsch
0813807b0f
data/entsoegridkit: Update gridkit data files (#118)
* data/entsoegridkit: Update gridkit data files

* add missing NordBalt and Estlink 1 to TYNDP

* base: lower distance tolerance, hardcode faulty bus allocation

* data: apply new parameter corrections for network extract

* doc: amend release notes [skip travis]

* doc: update release notes and base image [skip travis]

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2020-06-08 18:13:51 +02:00
Fabian Neumann
5ea29551b9
add REUSE.software license information (#160)
* add REUSE.software license information

* add release note on licensing

* Update doc/index.rst

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* Update doc/index.rst

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* Update doc/release_notes.rst [skip travis]

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>
2020-05-29 09:50:55 +02:00
Jan Frederick
0adaf2c1b6 cleaned code for better understanding 2020-04-06 16:38:54 +02:00
Jan Frederick
b4c502f901 Updated description 2020-04-03 12:12:27 +02:00
Jan Frederick
b707578bfb Update build_renewable_profiles.py 2020-04-03 12:09:17 +02:00
Jan Frederick
32248724bd add if statements for "keep all availble areas"
Add possibility to keep all availble areas for the potential area generation.
2020-04-03 12:02:25 +02:00
JanFrederickUnnewehr
22184ebaa7
Find "all" closest links and not only the first entry in the dataframe (#143)
* find all closest links that are in operation

* update function _find_closest_links

* update _set_electrical_parameters_links

* Update scripts/base_network.py

* cleanup code

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>
2020-04-01 00:20:32 +02:00
Fabian Neumann
3c1c604c7e
cluster: skip recalculation of link parameters if empty (#149) 2020-03-29 11:39:18 +02:00
Fabian Neumann
7688d9ea27
build_bus_regions: fix 'cannot insert name, already exists' in geopandas 0.7.0 (#145)
* build_bus_regions: fix 'cannot insert name, already exists'

* environment: allow geopandas 0.7.0

* build_bus_regions: ignore index when concatenating
2020-03-18 09:56:47 +01:00
euronion
ccc56ce3c8
Fix: Correctly determine the bus to attatch custom powerplants to. (#131)
* Add index integrity checks for custom powerplants.

* Update .csv template for custom powerplants.

* Update data/custom_powerplants.csv

* Revert "Merge branch 'master' into fix/custom-powerplants"

This reverts commit 5cd9c1afafd1ab36c31181ffed7635152805ee52, reversing
changes made to 5b1df27b25fdc89acca88395a0ba999f84dce109.

* Update release_notes.rst

* Rephrasing update to release notes.

* Merge with upstream/master (revert reverted merge).

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2020-03-17 09:50:38 +01:00
Fabian Neumann
d57989c027
scripts: mini code cleanup (#140) 2020-03-16 15:55:01 +01:00
Fabian Neumann
69fd46290f
solve: include {min,max}_iterations parameters (#130)
* solve: include {min,max}_iteration parameters

* solve: iterations fix defaults
2020-02-25 22:00:36 +01:00
Fabian Neumann
8bed137ca5 unify skip_iterations & skip_iterating to skip_iterations 2020-02-19 17:03:19 +01:00
Fabian Neumann
cd85d61470
helpers: importing networks with override_components (#128)
* helpers: importing networks with override_components (closes #122) [skip travis]

* Update scripts/plot_network.py

Co-Authored-By: FabianHofmann <hofmann@fias.uni-frankfurt.de>

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>
2020-02-13 15:51:24 +01:00
Fabian
543bb95759 small fix for solve_operations_network 2020-02-10 16:47:11 +01:00
FabianHofmann
1ecca802f3 Nomopyomo (#116)
* play around, add new nomopyomo feature

* fix constraints

* fix constraints

* set solver to cbc due to error with gurobi900

* update environments
shift lv and lc constraints to prepare_network
start modifying opt constraints

* correct BAU

* correct environment

* fix import

* fix SAFE constraint

* fix battery charger ratio constraint

* code cleaning

* restructure solve scripts

* fix CCL constraint

* adjust doc

* solve_network: update doc string

* revert unwanted changes

* update environment.yaml

* update environment.yaml II

* force conda update, revert last commit

* revert last change, use other channel priority

* remove trace_sove_network

* add skip_iterating and track_iterations options to config file

* revert last commit, fix environment to current pypsa master

* line break, trigger CI with updated pypsa

* nomopyomo: PR review

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2020-02-10 12:06:43 +01:00
FabianHofmann
ef9e64d457
set bus to nan for powerplants not assigned in kdtree (#123)
* solves #109

* fix substations_i for no-neighbours in kdtree
2020-02-03 15:01:24 +01:00
FabianHofmann
1e9f8717ee add names to config, add color column to n.carriers 2020-01-29 17:01:57 +01:00
FabianHofmann
af985db802 adjust n.carrier column name 'nice_names' -> 'nice_name' 2020-01-29 16:08:01 +01:00
Jonas Hörsch
52e4a1b285 environment: Free pyproj from version constraint (fixes #119) (#120)
* environment: Free pyproj from version constraint (fixes #119)

proj was constrained to 1.9.6, since cartopy was incompatible with
recent proj versions.

* build_renewable_profiles: Import gdal and geokit after forking

GDAL sets up a shared context on module import which seems to contain a
handle to the PROJ database for coordinate reference systems. By forking
these handles seem to become invalidated or at least are not usable in parallel
anymore.

Instead importing gdal only after setting up the different processes fixes
the database disk image is malformed proj error.
2020-01-23 09:55:59 +01:00
Fabian Neumann
5934f4f7a1
prepare release v0.1.0 (#117) 2020-01-09 14:09:28 +01:00
FabianHofmann
eaf30a9b65
Introduce mocksnakemake which acutally parses Snakefile (#107)
* rewrite mocksnakemake for parsing real Snakefile

* continue add function to scripts

* going through all scripts, setting new mocksnakemake

* fix plotting scripts

* fix build_country_flh

* fix build_country_flh II

* adjust config files

* fix make_summary for tutorial network

* create dir also for output

* incorporate suggestions

* consistent import of mocksnakemake

* consistent import of mocksnakemake II

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/plot_network.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/plot_network.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/retrieve_databundle.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* use pathlib for mocksnakemake

* rename mocksnakemake into mock_snakemake

* revert change in data

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* remove setting logfile in mock_snakemake, use Path in configure_logging

* fix fallback path and base_dir
fix return type of make_io_accessable

* reformulate mock_snakemake

* incorporate suggestion, fix typos

* mock_snakemake: apply absolute paths again, add assertion error
*.py: make hard coded io path accessable for mock_snakemake

* retrieve_natura_raster: use snakemake.output for fn_out

* include suggestion

* Apply suggestions from code review

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* linting, add return ad end of file

* Update scripts/plot_p_nom_max.py

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* Update scripts/plot_p_nom_max.py

fixes #112

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* plot_p_nom_max: small correction

* config.tutorial.yaml fix snapshots end

* use techs instead of technology

* revert try out from previous commit, complete replacing

* change clusters -> clusts in plot_p_nom_max due to wildcard constraints of clusters

* change clusters -> clusts in plot_p_nom_max due to wildcard constraints of clusters II
2019-12-09 21:29:15 +01:00
FabianHofmann
5143a258ac build_powerplants: Fix add_custom_powerplants
Typo and type instability.

Fixes #109.
2019-12-03 00:52:52 +01:00
Fabian Neumann
7ddc153bd2
ec: attach hydrogen pipelines (#108) 2019-12-02 12:22:30 +01:00
euronion
85c356297a Add logging to logfiles to all snakemake workflow scripts. (#102)
* Add logging to logfiles to all snakemake workflow scripts.

* Fix missing quotation marks in Snakefile.

* Apply suggestions from code review

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* Apply suggestions from code review

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* doc: fix _ec_ filenames in docs

* Allow logging message format to be specified in config.yaml.

* Add logging for Snakemake rule 'retrieve_databundle '.

* Add limited logging to STDERR only for retrieve_*.py scripts.

* Import progressbar module only on demand.

* Fix logging to file and enable concurrent printing to STDERR for most scripts.

* Add new 'logging_format' option to Travis CI test config.yaml.

* Add missing parenthesis (bug fix) and cross-os compatible paths.

* Fix typos in messages.

* Use correct log files for logging (bug fix).

* doc: fix line references

* config: logging_format in all configs

* doc: add doc for logging_format

* environment: update to powerplantmatching 0.4.3

* doc: update line references for tutorial.rst

* Change logging configuration scheme for config.yaml.

* Add helper function for doing basic logging configuration.

* Add logpath for prepare_links_p_nom rule.

* Outsource basic logging configuration for all scripts to _helper submodule.

* Update documentation for changed config.yaml structure.

Instead of 'logging_level' and 'logging_format', now 'logging' with subcategories is used.

* _helpers: Change configure_logging signature.
2019-11-28 08:22:52 +01:00