Commit Graph

274 Commits

Author SHA1 Message Date
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
Fabian Neumann
a74c15a132 trigger new travis build (skipped through squash) 2019-11-19 19:45:08 +01:00
Fabian Neumann
81d9d2ab4d
battery+H2: option for stores and links instead of storage_units (#97)
* add_electricity: stores and links instead of storageunits

* move code for attaching in add_extra_stores.py

* Update Snakefile

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

* Update Snakefile

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

* Update Snakefile

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

* rename to add_extra_components.py

* incorporate suggestions

* Snakefile: update script name

* extra_components: import _add_missing_carriers_from_costs

* Add '_ec" infix in Snakefile

* Snakefile add infix at missing spot

* remove unintendetely inserted data.bundle, correct import in add_extra_components

* environment: fix pyyaml version

* set powerplantmatching as conda-dependency

* environment fix minimal ppm version

* environment reinsert pyyaml

* environment: carry over changes to environment.docs.yaml

* extra_components: add carriers

* update docstring

* Update scripts/add_extra_components.py

* Update scripts/add_extra_components.py

* tutorial: fix hyperlink [skip travis]

* update release notes

* update documentation

* add_electricity: merge removal of suptech
2019-11-19 19:36:28 +01:00
Fabian Neumann
9517eda1d7
add option for nuclear expansion at current locations (#98)
* add_electricity: add option for nuclear expansion at current locations

* doc: add documentation on adding nuclear options
2019-11-19 12:26:01 +01:00
Fabian
e59d2c4162 scripts/* revise imports 2019-11-14 17:50:24 +01:00
Fabian
af22261c10 prepare_network: revise imports, add line_break 2019-11-14 16:21:00 +01:00
Fabian Neumann
3370bd3b92 doc: update documentation on Ep option 2019-11-14 15:50:03 +01:00
Fabian Neumann
6a6bae41db prepare_network: reactivate Ep option (closes #63) 2019-11-14 15:41:09 +01:00
Fabian Neumann
a35dbc067c build_natura: add cutouts as input (closes #95) 2019-11-11 16:29:27 +01:00
Fabian Neumann
7cd3b8a42b solve: undo update line parameter 2019-11-09 13:23:01 +01:00
Fabian Neumann
998b13dc3a
solve: update line parameters if not iterating 2019-11-09 13:16:31 +01:00
Fabian Neumann
3fd5c5d0e1 cluster: add tolerance to country weight sum L 2019-11-09 12:58:04 +01:00
FabianHofmann
0ea5a5c28f Powerplants (#94)
* add nice carrier names to n.carriers

* closes #48

* update environment
2019-11-09 09:08:25 +01:00
Fabian Neumann
d32f2105cd fix deprecation: logger.warn -> logger.warning 2019-11-08 16:46:29 +01:00
Fabian Neumann
a71cb6fc26 build_hydro: fix logger (closes #91) 2019-11-07 17:38:08 +01:00
Fabian Neumann
7df2b76f9d
cluster_network: fix focus_weights for mult sync 2019-11-07 16:54:09 +01:00
Fabian Neumann
e54119d878
cluster: add focus weights (in favor of #26) (#87)
* cluster: add focus weights (in favor of #26)

* clear assert of total focus

Co-Authored-By: FabianHofmann <hofmann@fias.uni-frankfurt.de>
2019-11-07 15:38:25 +01:00
Fabian Neumann
99cb4a4354
Merge pull request #86 from PyPSA/workflow
Integrate data retrieving into snakemake workflow
2019-11-06 16:06:11 +01:00
Fabian Neumann
0fb57601bf doc: document powerplantmatching changes from #84 2019-11-06 15:59:34 +01:00
Fabian Neumann
2ace4f2e94 retrieve*: add documentation 2019-11-06 14:50:59 +01:00
Fabian Neumann
0c537f159f retrieve*: clean retrieve rules 2019-11-06 12:04:01 +01:00
Fabian Neumann
bf12d25879
Merge pull request #51 from fneum/solve_network
Add `extra_functionality` and `extra_postprocessing` to solve_network()
2019-11-06 11:38:15 +01:00
Fabian Neumann
4d9b02ea12
solve_network: add snapshots as required argument 2019-11-06 11:33:57 +01:00
Fabian Neumann
82392c6c07 Merge branch 'co2limit' of https://github.com/fneum/pypsa-eur into fneum-co2limit 2019-11-06 11:19:41 +01:00
Fabian
b1a38229f4 ignore sort warning 2019-11-05 14:29:15 +01:00
Fabian
f6e44d2805 include data retrieving in workflow 2019-11-05 12:53:21 +01:00
Fabian Neumann
67390cc2a9
Update scripts/prepare_network.py 2019-11-05 11:21:33 +01:00
FabianHofmann
d0e2fed4d7 incorporate suggestions 2019-11-01 13:27:42 +01:00
FabianHofmann
bf26ac9445 build_powerplants update docstring 2019-10-31 18:01:33 +01:00
FabianHofmann
324ededa66 fix typo 2019-10-31 14:59:51 +01:00
Fabian Hofmann
4ee18ea9fa incorporate suggestions of #69 2019-10-31 14:48:10 +01:00
Fabian Hofmann
0d778eaf42 Merge branch 'eb5193-add_own_carriers' into powerplants 2019-10-31 14:30:05 +01:00
Fabian Hofmann
65700000f7 Merge branch 'add_own_carriers' of https://github.com/eb5194/pypsa-eur into eb5194-add_own_carriers 2019-10-31 14:23:43 +01:00