Skip to content

Commit

Permalink
ajoute un dossier spécifique parametres de la formule (secteur locatif)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-michaud committed Mar 6, 2025
1 parent 3933a34 commit 3146656
Show file tree
Hide file tree
Showing 132 changed files with 18 additions and 13 deletions.
20 changes: 10 additions & 10 deletions openfisca_france/model/prestations/aides_logement.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ def formula(famille, period, parameters):
chambre = famille.demandeur.menage('logement_chambre', period)
zone_apl = famille.demandeur.menage('zone_apl', period)

plafonds_loyers = al.secteur_locatif.l_plafonds_loyers
plafonds_loyers = al.secteur_locatif.formule.l_plafonds_loyers
plafonds_loyers_par_zone = plafonds_loyers.par_zone[zone_apl]
plafonds_loyers_coef_chambre_coloc = plafonds_loyers.coef_chambre_et_colocation

Expand Down Expand Up @@ -1142,7 +1142,7 @@ class aide_logement_charges(Variable):
set_input = set_input_divide_by_period

def formula(famille, period, parameters):
forfait_charges = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.c_forfait_charges
forfait_charges = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.c_forfait_charges
forfait_charges_cas_general = forfait_charges.cas_general
forfait_charges_cas_colocataires = forfait_charges.cas_colocataires

Expand All @@ -1165,7 +1165,7 @@ class aide_logement_R0(Variable):
set_input = set_input_divide_by_period

def formula(famille, period, parameters):
al_r0 = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.pp_participation_personnelle.r0_abattement_ressources_menage
al_r0 = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.pp_participation_personnelle.r0_abattement_ressources_menage
pfam_n_2 = parameters(period.start.offset(-2, 'year')).prestations_sociales.prestations_familiales.bmaf
minim_n_2 = parameters(period.start.offset(-2, 'year')).prestations_sociales.solidarite_insertion.minima_sociaux
couple = famille('al_couple', period)
Expand Down Expand Up @@ -1201,7 +1201,7 @@ def formula(famille, period, parameters):
return R0

def formula_2006(famille, period, parameters):
al_r0 = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.pp_participation_personnelle.r0_abattement_ressources_menage
al_r0 = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.pp_participation_personnelle.r0_abattement_ressources_menage
pfam_n_2 = parameters(period.start.offset(-2, 'year')).prestations_sociales.prestations_familiales.bmaf
minim_n_2 = parameters(period.start.offset(-2, 'year')).prestations_sociales.solidarite_insertion.minima_sociaux
couple = famille('al_couple', period)
Expand Down Expand Up @@ -1235,7 +1235,7 @@ def formula_2006(famille, period, parameters):

# cf Décret n° 2014-1739 du 29 décembre 2014 relatif au calcul des aides personnelles au logement
def formula_2015_01_01(famille, period, parameters):
al_r0 = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.pp_participation_personnelle.r0_abattement_ressources_menage
al_r0 = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.pp_participation_personnelle.r0_abattement_ressources_menage
couple = famille('al_couple', period)
al_nb_pac = famille('al_nb_personnes_a_charge', period)

Expand All @@ -1262,7 +1262,7 @@ class aide_logement_taux_famille(Variable):
set_input = set_input_dispatch_by_period

def formula(famille, period, parameters):
al_tf = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.pp_participation_personnelle.tp_taux_participation_personnelle_menage.tf_taux_selon_taille_famille
al_tf = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.pp_participation_personnelle.tp_taux_participation_personnelle_menage.tf_taux_selon_taille_famille
couple = famille('al_couple', period)
al_nb_pac = famille('al_nb_personnes_a_charge', period)
residence_dom = famille.demandeur.menage('residence_dom', period)
Expand Down Expand Up @@ -1291,7 +1291,7 @@ def formula(famille, period, parameters):
return where(residence_dom, TF_dom, TF_metropole)

def formula_2023_01_01(famille, period, parameters):
al_tf = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.pp_participation_personnelle.tp_taux_participation_personnelle_menage.tf_taux_selon_taille_famille
al_tf = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.pp_participation_personnelle.tp_taux_participation_personnelle_menage.tf_taux_selon_taille_famille

couple = famille('al_couple', period)
al_nb_pac = famille('al_nb_personnes_a_charge', period)
Expand Down Expand Up @@ -1335,9 +1335,9 @@ class aide_logement_taux_loyer(Variable):
def formula(famille, period, parameters):
al_locatif = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif

al_plafonds_z2 = al_locatif.l_plafonds_loyers.par_zone.zone_2
al_plafonds_z2 = al_locatif.formule.l_plafonds_loyers.par_zone.zone_2

al_tl = al_locatif.pp_participation_personnelle.tp_taux_participation_personnelle_menage.tl_taux_complementaire_selon_loyer
al_tl = al_locatif.formule.pp_participation_personnelle.tp_taux_participation_personnelle_menage.tl_taux_complementaire_selon_loyer
al_tl_seuils = al_tl.seuils
al_tl_taux = al_tl.taux

Expand Down Expand Up @@ -1371,7 +1371,7 @@ class aide_logement_participation_personnelle(Variable):
set_input = set_input_divide_by_period

def formula(famille, period, parameters):
al_participation_minimale = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.pp_participation_personnelle.p0_participation_minimale
al_participation_minimale = parameters(period).prestations_sociales.aides_logement.allocations_logement.secteur_locatif.formule.pp_participation_personnelle.p0_participation_minimale

R = famille('aide_logement_base_ressources', period)
R0 = famille('aide_logement_R0', period)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: Paramètres de la formule pour le calcul des allocations logement en secteur locatif
metadata:
short_label: Paramètres de la formule
order:
- l_plafonds_loyers
- c_forfait_charges
- pp_participation_personnelle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ description: Allocations logement - Secteur locatif
metadata:
short_label: Allocations logement - Secteur locatif
order:
- l_plafonds_loyers
- c_forfait_charges
- pp_participation_personnelle
- formule
- coefficients_degressivite_suppression
- seuils_minimum_versement
- minoration_forfaitaire

0 comments on commit 3146656

Please sign in to comment.