-
Notifications
You must be signed in to change notification settings - Fork 34
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
BUG: Endogenous creation of bg_id
#763
Comments
Sounds okay as a short-term hack. But we'll have to be careful that
Ultimately, however, I am rather convinced now that we won't be able to solve all of this with one pass of GETTSIM -- unless we find a way of working with temporary/candidate variables in a subgraph. What I mean is that we'll need to check multiple things to determine the
In the end, this is sort of the same as calculating candidate benefits before checking eligibility / priority. We solve that by giving things names like My suggestion would be to do a quick hack here as you suggest, do the transition to a hierarchical scheme, and revisit. |
For future reference, here is the logic that I'm using in the policy project: The problem of setting the I used the following procedure:
Potential Outcomes:
To calculate whether Eigenbedarf is covered, I use the This is still not entirely correct once there are more than two children who are not entirely symmetric (e.g. different age or allowances). I.e. it could still happen that each child (+ parents) individually satisfy their own needs, but in certain combinations they don't. |
Sounds very good! I'd like to suggest a different strategy, I won't describe the algorithm quite as elaborately as you did. But it will be better to draw that on a board, anyhow.
Anyhow, I hope this prevents the circular logic (split up fg -- do individual checks in which nobody is eligible for Bürgergeld -- merge again -- split up fg -- ...) that plagued us in that issue quoted above because of the up-front check in 1.i. It also gets rid of the issue you mention in the original bug report above. |
That's great, it's much easier to think about the problem this way! In my algorithm above, I inadvertently tried to account for Kinderwohngeld which made this super complex. I think (1.i) doesn't work. The whole The rest should work, but it hinges on the Bürgergeld Regelbedarfe to be a linear function of the children included/excluded in the BG (i.e. sum of Regelbedarf of two children BGs = sum of Regelbedarf of one BG of the same two children) which is true I think but we may have to keep that in mind for the future. I would slightly adjust the wording of (3): After doing (2) we always end up with exactly two candidate |
Cool!
|
I edited the above algorithm using that idea. Should be clearer than discussing back and forth here. |
I don't think so. Each child is its own |
I think this is what I meant when I was saying that it works because Regelbedarf is linear in BG members (just didn't realise that Bürgergeld is the relevant object here, not Regelbedarf). This situation can happen since But of course, you're right. There are probably corner cases that we haven't thought about yet.. |
Bürgergeld == Regelbedarf + eligibility check, right? Just need to be careful whether we need the check at some point or not.
Hopefully 😄 |
Let me elaborate on step 3 a bit more. When leaving step 2, the So the crucial step is determining who receives Wohngeld and thereby setting
The tricky thing now is to decide which of the two options is the correct one. I propose to do this the following way:
|
Thanks! Sounds very exhaustive indeed. I need to work through that very slowly at some point. Would you be able to come up with some test cases that illustrate these points? That would help clarity tremendously. Without knowing exactly what we are trying to achieve, it is just hard to follow multi-step reasoning. If it helps, add intermediate results for test cases. If there are multiple possible outcomes for a test (you mention it is unclear in some cases what should happen), leave those open and it will be great to discuss them. |
I just realised that the Günstigerprüfung in step 3 of the algorithm that you proposed is what makes this complicated. When we only model the Vorrangprüfung, the algorithm above should yield correct results. The Günstigerprüfung (=people can get Wohngeld already if the transfer is higher than BüG) is, however, important to get rid of jumps of transfer income at the Eigenbedarf threshold. Then, setting the One solution would be to do the Günstigerprüfung on the |
( This is my current plan. The three key targets are If the user does not set The The incorrect Günstigerprüfung in the current version drops out without replacement, i.e. if a user wants to compute Wohngeld/ALG2 without guessing Feel free to suggest other target names if you think something is unclear! |
Thanks! A couple of reactions:
|
No, that's an output generated via def eigenbedarf_gedeckt(
arbeitsl_geld_2_regelbedarf_m: float,
_arbeitsl_geld_2_nettoeink_ohne_transfers_m: float,
kindergeld_zur_bedarfsdeckung_m: float,
kind_unterh_erhalt_m: float,
unterhaltsvors_m: float,
) -> bool:
"""Check if SGB II needs are covered.
...
"""
return (
arbeitsl_geld_2_regelbedarf_m
<= _arbeitsl_geld_2_nettoeink_ohne_transfers_m
+ kindergeld_zur_bedarfsdeckung_m
+ kind_unterh_erhalt_m
+ unterhaltsvors_m
)
Definitely, I should have added that here as well. |
Great, just wasn't obvious from the graph. I think we should make that |
Though that will be clear very soon, anyhow. So no big deal. |
Just a heads up: This would blow up the modules further. This is because the user influences the calculation of e.g. But I agree, that this would be important and I think the additional lines are worth it. |
What exactly does "them" refer to in this sentence? |
Sorry, I was referring to (I'm not sure yet whether I’ll do the same with |
Sure, but we expect them to be set by the user along with |
Yes, my point is just that the warning you were suggesting above is not possible with the current structure of #778. If we want such a warning, we could do this via multiple |
Linking a comment on Unterhaltsvorschuss, which we should double-check here. |
The current creation of
bg_id
is wrong because children witheigenbedarf_gedeckt=True
will always have a differentbg_id
than their parents, even if the parents haveeigenbedarf_gedeckt=True
as well.Proposed solution
Parents should have the same
bg_id
as their children if all of them haveeigenbedarf_gedeckt=True
.The text was updated successfully, but these errors were encountered: