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

Add multi-input-multi-output converter #1011

Draft
wants to merge 9 commits into
base: dev
Choose a base branch
from
Draft

Conversation

henhuy
Copy link
Contributor

@henhuy henhuy commented Nov 14, 2023

This PR adds a new converter which can group inputs and outputs into multiple groups.
Inputs/outputs within a group can be exchangeable used to provide group flow.

Compare conversion_plus technology from calliope: https://calliope.readthedocs.io/en/v0.6.8/user/advanced_constraints.html#the-conversion-plus-tech

For each input/output group a new pyomo Variable/Index has to be set up.

@henhuy henhuy self-assigned this Nov 14, 2023
@pep8speaks
Copy link

pep8speaks commented Nov 14, 2023

Hello @henhuy! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2023-11-22 10:21:58 UTC

Comment on lines +513 to +519
[
(n, g, p, t)
for p, t in m.TIMEINDEX
for n in group
for g in n.output_groups
for s in FLOW_SHARE_TYPES
],

Check failure

Code scanning / CodeQL

Suspicious unused loop iteration variable Error

For loop variable 's' is not used in the loop body.
@p-snft
Copy link
Member

p-snft commented Nov 15, 2023

I don't get why this is needed. Everything sketched at https://calliope.readthedocs.io/en/v0.6.8/user/advanced_constraints.html#the-conversion-plus-tech could be modelled using solph Converters (sometimes additional Buses might be needed). I would rather suggest to add a workflow to have sub-graphs grouping different nodes (and allow hiding the respective internal Flows).

@henhuy henhuy mentioned this pull request Nov 17, 2023
@henhuy
Copy link
Contributor Author

henhuy commented Nov 17, 2023

Hey @p-snft - I see what you are suggesting and like the idea of a more general approach. Started an issue for that: #1015
Maybe you could have a look, if I understood you correctly and my implementation idea is a good way to go.

@p-snft
Copy link
Member

p-snft commented Jun 20, 2024

I think this is equivalent to multiplying the conversion_factors of the converters that are put in series and is actually not needed. Maybe, a tutorial, a facade or a helper function would be an option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants