Skip to content

Commit

Permalink
Output files with objective function value (#1033)
Browse files Browse the repository at this point in the history
* reformatting

* release_notes.rst update

* modifications logger.info

* changes to configuration.rst
  • Loading branch information
finozzifa authored Jun 3, 2024
1 parent 00a3de6 commit f5e26a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Specifies the minimum voltage magnitude in the base network and the offshore sub
``load_options``
=============================

Specifies the options to estimate future electricity demand (load). Different years might be considered for weather and the socio-economic pathway (GDP and population growth), to enhance modelling capabilities.
Specifies the options to estimate future electricity demand (load). Different years might be considered for weather and the socioeconomic pathway (GDP and population growth), to enhance modelling capabilities.

.. literalinclude:: ../config.default.yaml
:language: yaml
Expand Down
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ E.g. if a new rule becomes available describe how to use it `snakemake -j1 run_t

* Resolve pandas deprecation warning. `PR #1023 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1023>`__

* Create files where the code outputs the value of the objective function. `PR #1033 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1033>`__

PyPSA-Earth 0.3.0
=================

Expand Down
2 changes: 2 additions & 0 deletions scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,3 +576,5 @@ def solve_network(n, config, opts="", **kwargs):
)
n.meta = dict(snakemake.config, **dict(wildcards=dict(snakemake.wildcards)))
n.export_to_netcdf(snakemake.output[0])
logger.info(f"Objective function: {n.objective}")
logger.info(f"Objective constant: {n.objective_constant}")

0 comments on commit f5e26a5

Please sign in to comment.