Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and update HeatPipeine classes / oemof_heatpipe.py #137

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

joroeder
Copy link
Member

@joroeder joroeder commented Feb 2, 2024

The following issues are addressed. Sorry for putting it all in this PR. This is a complete revision of dhnx/optimization/oemof_heatpipe.py

  • Fix oemof network 0.5.0:
    There were changes in oemof.network with the release 0.5.0, e.g. making function signatures explicit, that lead errors with the specific attributes of the HeatPipeline class, as the Heatpipeline class inherit from oemof.network Transformer.
    An update of the initiation function solves the problem, and making the arguments explicit also makes things clearer.

  • Remove conversion factors:
    These were only partly implemented and do not make sense in the component. If these are needed in some cases, we could properly add them again.

  • Fix docstrings:
    The docstrings are not up to date.

  • Fix solph 0.5.1 (periods) for existing heatpipelines

@joroeder
Copy link
Member Author

joroeder commented Feb 2, 2024

The last commit removes the conversion factors. These were only partly implemented and do not make sense in the component. If these are needed in some cases, we could properly add them again.

@joroeder joroeder changed the title Fix oemof network 0.5.0 Update HeatPipeLine classes Feb 2, 2024
@joroeder joroeder changed the title Update HeatPipeLine classes Update HeatPipeine classes / oemof_heatpipe.py Feb 2, 2024
@joroeder joroeder changed the title Update HeatPipeine classes / oemof_heatpipe.py Fix and update HeatPipeine classes / oemof_heatpipe.py Feb 2, 2024
@joroeder
Copy link
Member Author

joroeder commented Feb 2, 2024

@jnettels I think it is good to solve the periods issue as you did here 633e9c8. So oemof.solph >= 0.5.0 can be still used.

I am still wondering where else to add the periods 😄 Therefore, I need to have a deeper look at the changes of oemof-solph. In the meanwhile, you could checkout this branch, and test if it works in your pipeline. It should work with oemof.solph >= 0.5.0 and oemof.network >= 0.5.0a4

@jnettels
Copy link
Contributor

jnettels commented Mar 4, 2024

Thanks a lot for taking the time to fix this @joroeder. As far as I can see, your changes make the current oemof.network usable again in my test cases. Please feel free to merge.
It would be nice to also merge #134 soon afterwards, but of course it could be valuable if you can spend more time to actually check it.

Base automatically changed from fix/oemof.solph-0.5.1 to dev October 9, 2024 14:43
@p-snft p-snft mentioned this pull request Oct 9, 2024
@p-snft
Copy link
Member

p-snft commented Oct 9, 2024

The fixes for network and solph v0.5.1 overlap pretty much what I implemented in #141 (except I dropped compatibility for solph v0.5.0). Thus, I will consider this reviewed and merge it.

@p-snft p-snft merged commit c8832d1 into dev Oct 9, 2024
2 checks passed
@p-snft p-snft deleted the Fix/oemof-network-0-5-0 branch October 9, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants