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

Restructuring of function flow #48

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

JulStraus
Copy link
Member

Based on the discussion in pull request #47, this is a first take on restructuring the overall function flow. At the moment, I only focused on the variable creation to simplify it, but I think it could be beneficial to think as well of the objective function and the functions for creating nodes and links as well as calculating the emission balance. The latter would be an answer to Issue #37.

There are a few things I would like to highlight in the PR:

  1. I could have renamed variables_node to variables_element, but I thought it is preferable to keep at the time being the backwards compatibility intact. Changing this would allow us to remove the number of functions, but would result in a breaking change. It would however be simple to provide a function to translate the current name into the new name.
  2. I removed quite a few input arguments to the individual functions. I based it on my thoughts regarding what is really necessary, considering as well future changes.
  3. The majority of the line changes are due to copying the functions and rewriting the docstrings. The individual methods are colour coded through the application of !!! note and !!! tip.

@JulStraus JulStraus added the enhancement New feature or request label Nov 7, 2024
@JulStraus
Copy link
Member Author

I tested the PR as well using the test set of EnergyModelsRenewableProducers. It worked without any adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant