Skip to content

Conversation

@MImmesberger
Copy link
Collaborator

What problem do you want to solve?

Closes #757

In fact, any occurences of automatically created cycles reported in #757 have already been solved via the namespaces structure.

In ALG2 we have

@policy_function(start_date="2005-01-01")
def wohnfläche(
    wohnen__wohnfläche_hh: float,
    anzahl_personen_hh: int,
) -> float:
    """Share of household's dwelling size attributed to a single person."""
    return wohnen__wohnfläche_hh / anzahl_personen_hh

So we don't create a cycle anymore as we have wohnen__wohnfläche -> wohnen__wohnfläche_hh but wohnen__wohnfläche_hh -> arbeitslosengeld_2__wohnfläche.

Still, thanks to the work done by Lars in the past, a general TTSIM solution was easy to implement because it just copies the logic done for time-conversion functions.

@MImmesberger MImmesberger requested a review from hmgaudecker July 22, 2025 10:05
@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...dag_elements/test_automatically_added_functions.py 80.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you!

@hmgaudecker hmgaudecker merged commit 6e4f869 into collect-components-of-namespaces Jul 22, 2025
17 checks passed
@hmgaudecker hmgaudecker deleted the dag-cycles branch July 22, 2025 12:46
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.

BUG: Error messages for variables that are disaggregated to the individual level

3 participants