Skip to content

Commit

Permalink
Merge pull request #900 from oemof/release/v0.4.5
Browse files Browse the repository at this point in the history
Release v0.4.5
  • Loading branch information
jnnr authored Jan 23, 2023
2 parents 2f908f1 + bd45dca commit 02578dd
Show file tree
Hide file tree
Showing 38 changed files with 648 additions and 276 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source =
src
tests
parallel = true
omit = *custom*
omit = */custom/*
*test*

[report]
Expand Down
95 changes: 95 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# YAML 1.2
---
cff-version: "1.1.0"
doi: "10.5281/zenodo.596235"
license: MIT
message: "If you use this software, please cite it using these metadata."
title: "oemof.solph"
abstract: "The oemof.solph package is part of the Open energy modelling framework (oemof). This an organisational framework to bundle tools for energy (system) modelling. oemof-solph is a model generator for energy system modelling and optimisation."
authors:
-
family-names: Krien
given-names: Uwe
-
family-names: Kaldemeyer
given-names: Cord
-
family-names: "Günther"
given-names: Stephan
-
family-names: Simon
given-names: Hilpert
-
given-names: jnnr
-
family-names: "Möller"
given-names: Caroline
-
family-names: "Schönfeldt"
given-names: Patrik
-
family-names: "Röder"
given-names: Johannes
-
given-names: gplssm
-
given-names: steffenGit
-
family-names: Schachler
given-names: Birgit
-
given-names: cswh
-
given-names: henhuy
-
family-names: Pl
given-names: Franzi
-
family-names: Endres
given-names: Julian
-
family-names: TU
given-names: Fabian
-
given-names: pkassing
-
family-names: Lancien
given-names: Bryan
-
family-names: Kochems
given-names: Johannes
-
given-names: c-koehl
-
given-names: nesnoj
-
given-names: lmilletb
-
given-names: mloenneberga
-
family-names: Delfs
given-names: Jens-Olaf
-
given-names: RD-OTH
-
family-names: Francesco
given-names: Witte
-
given-names: elisapap
-
family-names: Gaudchau
given-names: Elisa
-
family-names: Smalla
given-names: Tjark
-
given-names: escalacjo
-
given-names: ajimenezUCLA
-
given-names: chrisflei
-
given-names: stefansc1
-
given-names: jakob-wo
...
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To set up `oemof-solph` for local development:

Now you can make your changes locally.

4. When you're done making changes run all the checks and docs builder with `tox <https://tox.readthedocs.io/en/latest/install.html>`_ one command::
4. When you're done making changes run all the checks and docs builder with `tox <https://tox.wiki/en/latest/installation.html>`_ one command::

tox

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Copyright (c) 2014-2020, oemof developer group

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include .editorconfig

include AUTHORS.rst
include CHANGELOG.rst
include CITATION.cff
include CONTRIBUTING.rst
include LICENSE
include README.rst
Expand Down
16 changes: 13 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

.. |codecov| image:: https://codecov.io/gh/oemof/oemof-solph/branch/dev/graphs/badge.svg?branch=dev
:alt: Coverage Status
:target: https://codecov.io/github/oemof/oemof-solph
:target: https://codecov.io/gh/oemof/oemof-solph

.. |codacy| image:: https://api.codacy.com/project/badge/Grade/a6e5cb2dd2694c73895e142e4cf680d5
:target: https://app.codacy.com/gh/oemof/oemof-solph/dashboard
Expand All @@ -60,7 +60,7 @@
:alt: Supported implementations
:target: https://pypi.org/project/oemof.solph

.. |commits-since| image:: https://img.shields.io/github/commits-since/oemof/oemof-solph/v0.4.3/dev
.. |commits-since| image:: https://img.shields.io/github/commits-since/oemof/oemof-solph/v0.4.4/dev
:alt: Commits since latest release
:target: https://github.com/oemof/oemof-solph/compare/v0.4.4...dev

Expand Down Expand Up @@ -179,6 +179,16 @@ GLPK-solver: http://arnab-deka.com/posts/2010/02/installing-glpk-on-a-mac/
If you install the CBC solver via brew (highly recommended), it should work without additional configuration.


**conda**

The CBC-solver can also be installed in a `conda` environment. Please note, that it is highly recomended to `use pip after conda <https://www.anaconda.com/blog/using-pip-in-a-conda-environment>`_, so:

.. code:: console
conda install -c conda-forge coincbc
pip install oemof.solph
.. _check_installation_label:

Installation test
Expand Down Expand Up @@ -245,7 +255,7 @@ You are welcome to contribute your own examples via a `pull request <https://git
License
=======

Copyright (c) 2019 oemof developer group
Copyright (c) 2022 oemof developer group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.3.dev0"
__version__ = "0.4.5"
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ These are new features and improvements of note in each release
:backlinks: top


.. include:: whatsnew/v0-4-5.rst
.. include:: whatsnew/v0-4-4.rst
.. include:: whatsnew/v0-4-2.rst
.. include:: whatsnew/v0-4-1.rst
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setup(app):
year = "2014-2021"
author = "oemof-developer-group"
copyright = "{0}, {1}".format(year, author)
version = release = "0.4.4"
version = release = "0.4.5"

pygments_style = "trac"
templates_path = ["."]
Expand Down
2 changes: 1 addition & 1 deletion docs/whatsnew/v0-3-0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ New features
signals. The first supported signal gets emitted, whenever a `node
<oemof.network.node>` is `added <oemof.energy_system.EnergySystem.add>` to an
`energy system <oemof.energy_system.EnergySystem>`.
(`blinker <https://pythonhosted.org/blinker/>`_)
(`blinker <https://blinker.readthedocs.io/>`_)


Documentation
Expand Down
34 changes: 18 additions & 16 deletions docs/whatsnew/v0-4-5.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
v0.4.5 (?)
----------


API changes
###########

v0.4.5 (January 23th, 2023)
---------------------------

New features
############


Documentation
#############

* Allow to exclude attrs from `parameter_as_dict`
`#825 <https://github.com/oemof/oemof-solph/pull/825>`_

Bug fixes
#########

* Remove not working `gradient_cost` from Flow
* Exclude attrs `from parameter_as_dict` `#824 <https://github.com/oemof/oemof-solph/pull/824>`_
* Fixed check for callables in `processing.parameter_as_dict` `#823 <https://github.com/oemof/oemof-solph/pull/823>`_
* Refactored assertion error in `Link` component into suspicious warning `#834 <https://github.com/oemof/oemof-solph/pull/834>`_
* Remove `Link` limit direction `#896 <https://github.com/oemof/oemof-solph/pull/896>`_
* Fix links in setup.py `#803 <https://github.com/oemof/oemof-solph/pull/803>`_

Testing
#######


Other changes
#############


* `Node.registry` has been removed from `oemof.network`. All nodes have to be
added to the energysystem explicitely. The tests have been adapted.

Contributors
############

* Hendrik Huyskens
* Uwe Krien
* Jann Launer
* Patrik Schönfeld
* Francesco Witte

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ exclude = '''
| ci
)/
'''

[build-system]
requires = ["setuptools<60.0", "wheel"]
build-backend = "setuptools.build_meta"
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def read(*names, **kwargs):

setup(
name="oemof.solph",
version="0.4.4",
version="0.4.5",
license="MIT",
description=(
"A model generator for energy system modelling and optimisation."
Expand Down Expand Up @@ -68,11 +68,11 @@ def read(*names, **kwargs):
"Topic :: Utilities",
],
project_urls={
"Documentation": "https://oemofsolph.readthedocs.io/",
"Documentation": "https://oemof-solph.readthedocs.io/",
"Changelog": (
"https://oemofsolph.readthedocs.io/en/latest/changelog.html"
"https://oemof-solph.readthedocs.io/en/latest/changelog.html"
),
"Issue Tracker": "https://github.com/uvchik/oemof.solph/issues",
"Issue Tracker": "https://github.com/oemof/oemof-solph/issues",
},
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
Expand All @@ -81,7 +81,7 @@ def read(*names, **kwargs):
install_requires=[
"blinker",
"dill",
"numpy",
"numpy < 1.24",
"pandas",
"pyomo >= 5.7.0, < 5.7.3",
"networkx",
Expand Down
2 changes: 1 addition & 1 deletion src/oemof/solph/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.4"
__version__ = "0.4.5"

from . import constraints # noqa: F401
from . import custom # noqa: F401
Expand Down
21 changes: 1 addition & 20 deletions src/oemof/solph/blocks/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ def _positive_gradient_flow_rule(model):
self.positive_gradient_constr.add(
(inp, out, ts), lhs <= rhs
)
else:
pass # return(Constraint.Skip)

self.positive_gradient_constr = Constraint(
self.POSITIVE_GRADIENT_FLOWS, m.TIMESTEPS, noruleinit=True
Expand All @@ -235,8 +233,6 @@ def _negative_gradient_flow_rule(model):
self.negative_gradient_constr.add(
(inp, out, ts), lhs <= rhs
)
else:
pass # return(Constraint.Skip)

self.negative_gradient_constr = Constraint(
self.NEGATIVE_GRADIENT_FLOWS, m.TIMESTEPS, noruleinit=True
Expand All @@ -260,7 +256,6 @@ def _objective_expression(self):
m = self.parent_block()

variable_costs = 0
gradient_costs = 0

for i, o in m.FLOWS:
if m.flows[i, o].variable_costs[0] is not None:
Expand All @@ -271,18 +266,4 @@ def _objective_expression(self):
* m.flows[i, o].variable_costs[t]
)

if m.flows[i, o].positive_gradient["ub"][0] is not None:
for t in m.TIMESTEPS:
gradient_costs += (
self.positive_gradient[i, o, t]
* m.flows[i, o].positive_gradient["costs"]
)

if m.flows[i, o].negative_gradient["ub"][0] is not None:
for t in m.TIMESTEPS:
gradient_costs += (
self.negative_gradient[i, o, t]
* m.flows[i, o].negative_gradient["costs"]
)

return variable_costs + gradient_costs
return variable_costs
Loading

0 comments on commit 02578dd

Please sign in to comment.