{
  "default_value": 0,
  "definition_period": "year",
  "dtype": "float32",
  "entity": "menage",
  "file_path": "openfisca_france_indirect_taxation/variables/reactions_comportementales_reforme/depenses_ajustees.py",
  "formulas": {
    "0001-01-01": {
      "ast": {
        "args": {
          "args": [
            {
              "arg": "menage",
              "ast_class": "arg",
              "col_offset": 12,
              "end_col_offset": 18,
              "end_lineno": 1,
              "lineno": 1
            },
            {
              "arg": "period",
              "ast_class": "arg",
              "col_offset": 20,
              "end_col_offset": 26,
              "end_lineno": 1,
              "lineno": 1
            },
            {
              "arg": "parameters",
              "ast_class": "arg",
              "col_offset": 28,
              "end_col_offset": 38,
              "end_lineno": 1,
              "lineno": 1
            }
          ],
          "ast_class": "arguments",
          "defaults": [],
          "kw_defaults": [],
          "kwonlyargs": [],
          "posonlyargs": []
        },
        "ast_class": "FunctionDef",
        "body": [
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 85,
            "end_lineno": 2,
            "lineno": 2,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 34,
                "end_lineno": 2,
                "id": "depenses_electricite_variables",
                "lineno": 2
              }
            ],
            "value": {
              "args": [
                {
                  "ast_class": "Constant",
                  "col_offset": 44,
                  "end_col_offset": 76,
                  "end_lineno": 2,
                  "lineno": 2,
                  "value": "depenses_electricite_variables"
                },
                {
                  "ast_class": "Name",
                  "col_offset": 78,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 84,
                  "end_lineno": 2,
                  "id": "period",
                  "lineno": 2
                }
              ],
              "ast_class": "Call",
              "col_offset": 37,
              "end_col_offset": 85,
              "end_lineno": 2,
              "func": {
                "ast_class": "Name",
                "col_offset": 37,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 43,
                "end_lineno": 2,
                "id": "menage",
                "lineno": 2
              },
              "keywords": [],
              "lineno": 2
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 93,
            "end_lineno": 3,
            "lineno": 3,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 38,
                "end_lineno": 3,
                "id": "depenses_electricite_prix_unitaire",
                "lineno": 3
              }
            ],
            "value": {
              "args": [
                {
                  "ast_class": "Constant",
                  "col_offset": 48,
                  "end_col_offset": 84,
                  "end_lineno": 3,
                  "lineno": 3,
                  "value": "depenses_electricite_prix_unitaire"
                },
                {
                  "ast_class": "Name",
                  "col_offset": 86,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 92,
                  "end_lineno": 3,
                  "id": "period",
                  "lineno": 3
                }
              ],
              "ast_class": "Call",
              "col_offset": 41,
              "end_col_offset": 93,
              "end_lineno": 3,
              "func": {
                "ast_class": "Name",
                "col_offset": 41,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 47,
                "end_lineno": 3,
                "id": "menage",
                "lineno": 3
              },
              "keywords": [],
              "lineno": 3
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 75,
            "end_lineno": 4,
            "lineno": 4,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 23,
                "end_lineno": 4,
                "id": "reforme_electricite",
                "lineno": 4
              }
            ],
            "value": {
              "ast_class": "Attribute",
              "attr": "electricite",
              "col_offset": 26,
              "ctx": {
                "ast_class": "Load"
              },
              "end_col_offset": 75,
              "end_lineno": 4,
              "lineno": 4,
              "value": {
                "ast_class": "Attribute",
                "attr": "taxe_carbone",
                "col_offset": 26,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 63,
                "end_lineno": 4,
                "lineno": 4,
                "value": {
                  "args": [
                    {
                      "ast_class": "Attribute",
                      "attr": "start",
                      "col_offset": 37,
                      "ctx": {
                        "ast_class": "Load"
                      },
                      "end_col_offset": 49,
                      "end_lineno": 4,
                      "lineno": 4,
                      "value": {
                        "ast_class": "Name",
                        "col_offset": 37,
                        "ctx": {
                          "ast_class": "Load"
                        },
                        "end_col_offset": 43,
                        "end_lineno": 4,
                        "id": "period",
                        "lineno": 4
                      }
                    }
                  ],
                  "ast_class": "Call",
                  "col_offset": 26,
                  "end_col_offset": 50,
                  "end_lineno": 4,
                  "func": {
                    "ast_class": "Name",
                    "col_offset": 26,
                    "ctx": {
                      "ast_class": "Load"
                    },
                    "end_col_offset": 36,
                    "end_lineno": 4,
                    "id": "parameters",
                    "lineno": 4
                  },
                  "keywords": [],
                  "lineno": 4
                }
              }
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 66,
            "end_lineno": 5,
            "lineno": 5,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 31,
                "end_lineno": 5,
                "id": "electricite_elasticite_prix",
                "lineno": 5
              }
            ],
            "value": {
              "args": [
                {
                  "ast_class": "Constant",
                  "col_offset": 41,
                  "end_col_offset": 57,
                  "end_lineno": 5,
                  "lineno": 5,
                  "value": "elas_price_2_2"
                },
                {
                  "ast_class": "Name",
                  "col_offset": 59,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 65,
                  "end_lineno": 5,
                  "id": "period",
                  "lineno": 5
                }
              ],
              "ast_class": "Call",
              "col_offset": 34,
              "end_col_offset": 66,
              "end_lineno": 5,
              "func": {
                "ast_class": "Name",
                "col_offset": 34,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 40,
                "end_lineno": 5,
                "id": "menage",
                "lineno": 5
              },
              "keywords": [],
              "lineno": 5
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 9,
            "end_lineno": 9,
            "lineno": 6,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 43,
                "end_lineno": 6,
                "id": "depenses_electricite_ajustees_variables",
                "lineno": 6
              }
            ],
            "value": {
              "ast_class": "BinOp",
              "col_offset": 8,
              "end_col_offset": 108,
              "end_lineno": 8,
              "left": {
                "ast_class": "Name",
                "col_offset": 8,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 38,
                "end_lineno": 7,
                "id": "depenses_electricite_variables",
                "lineno": 7
              },
              "lineno": 7,
              "op": {
                "ast_class": "Mult"
              },
              "right": {
                "ast_class": "BinOp",
                "col_offset": 11,
                "end_col_offset": 107,
                "end_lineno": 8,
                "left": {
                  "ast_class": "Constant",
                  "col_offset": 11,
                  "end_col_offset": 12,
                  "end_lineno": 8,
                  "lineno": 8,
                  "value": 1
                },
                "lineno": 8,
                "op": {
                  "ast_class": "Add"
                },
                "right": {
                  "ast_class": "BinOp",
                  "col_offset": 15,
                  "end_col_offset": 107,
                  "end_lineno": 8,
                  "left": {
                    "ast_class": "BinOp",
                    "col_offset": 15,
                    "end_col_offset": 70,
                    "end_lineno": 8,
                    "left": {
                      "ast_class": "BinOp",
                      "col_offset": 16,
                      "end_col_offset": 47,
                      "end_lineno": 8,
                      "left": {
                        "ast_class": "Constant",
                        "col_offset": 16,
                        "end_col_offset": 17,
                        "end_lineno": 8,
                        "lineno": 8,
                        "value": 1
                      },
                      "lineno": 8,
                      "op": {
                        "ast_class": "Add"
                      },
                      "right": {
                        "ast_class": "Name",
                        "col_offset": 20,
                        "ctx": {
                          "ast_class": "Load"
                        },
                        "end_col_offset": 47,
                        "end_lineno": 8,
                        "id": "electricite_elasticite_prix",
                        "lineno": 8
                      }
                    },
                    "lineno": 8,
                    "op": {
                      "ast_class": "Mult"
                    },
                    "right": {
                      "ast_class": "Name",
                      "col_offset": 51,
                      "ctx": {
                        "ast_class": "Load"
                      },
                      "end_col_offset": 70,
                      "end_lineno": 8,
                      "id": "reforme_electricite",
                      "lineno": 8
                    }
                  },
                  "lineno": 8,
                  "op": {
                    "ast_class": "Div"
                  },
                  "right": {
                    "ast_class": "Name",
                    "col_offset": 73,
                    "ctx": {
                      "ast_class": "Load"
                    },
                    "end_col_offset": 107,
                    "end_lineno": 8,
                    "id": "depenses_electricite_prix_unitaire",
                    "lineno": 8
                  }
                }
              }
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 87,
            "end_lineno": 10,
            "lineno": 10,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 35,
                "end_lineno": 10,
                "id": "depenses_electricite_tarif_fixe",
                "lineno": 10
              }
            ],
            "value": {
              "args": [
                {
                  "ast_class": "Constant",
                  "col_offset": 45,
                  "end_col_offset": 78,
                  "end_lineno": 10,
                  "lineno": 10,
                  "value": "depenses_electricite_tarif_fixe"
                },
                {
                  "ast_class": "Name",
                  "col_offset": 80,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 86,
                  "end_lineno": 10,
                  "id": "period",
                  "lineno": 10
                }
              ],
              "ast_class": "Call",
              "col_offset": 38,
              "end_col_offset": 87,
              "end_lineno": 10,
              "func": {
                "ast_class": "Name",
                "col_offset": 38,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 44,
                "end_lineno": 10,
                "id": "menage",
                "lineno": 10
              },
              "keywords": [],
              "lineno": 10
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 58,
            "end_lineno": 11,
            "lineno": 11,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 18,
                "end_lineno": 11,
                "id": "min_tarif_fixe",
                "lineno": 11
              }
            ],
            "value": {
              "args": [],
              "ast_class": "Call",
              "col_offset": 21,
              "end_col_offset": 58,
              "end_lineno": 11,
              "func": {
                "ast_class": "Attribute",
                "attr": "min",
                "col_offset": 21,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 56,
                "end_lineno": 11,
                "lineno": 11,
                "value": {
                  "ast_class": "Name",
                  "col_offset": 21,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 52,
                  "end_lineno": 11,
                  "id": "depenses_electricite_tarif_fixe",
                  "lineno": 11
                }
              },
              "keywords": [],
              "lineno": 11
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 109,
            "end_lineno": 12,
            "lineno": 12,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 33,
                "end_lineno": 12,
                "id": "depenses_electricite_ajustees",
                "lineno": 12
              }
            ],
            "value": {
              "ast_class": "BinOp",
              "col_offset": 36,
              "end_col_offset": 109,
              "end_lineno": 12,
              "left": {
                "ast_class": "Name",
                "col_offset": 36,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 75,
                "end_lineno": 12,
                "id": "depenses_electricite_ajustees_variables",
                "lineno": 12
              },
              "lineno": 12,
              "op": {
                "ast_class": "Add"
              },
              "right": {
                "ast_class": "Name",
                "col_offset": 78,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 109,
                "end_lineno": 12,
                "id": "depenses_electricite_tarif_fixe",
                "lineno": 12
              }
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 58,
            "end_lineno": 15,
            "lineno": 15,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 17,
                "end_lineno": 15,
                "id": "depenses_elec",
                "lineno": 15
              }
            ],
            "value": {
              "args": [
                {
                  "ast_class": "Constant",
                  "col_offset": 27,
                  "end_col_offset": 49,
                  "end_lineno": 15,
                  "lineno": 15,
                  "value": "depenses_electricite"
                },
                {
                  "ast_class": "Name",
                  "col_offset": 51,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 57,
                  "end_lineno": 15,
                  "id": "period",
                  "lineno": 15
                }
              ],
              "ast_class": "Call",
              "col_offset": 20,
              "end_col_offset": 58,
              "end_lineno": 15,
              "func": {
                "ast_class": "Name",
                "col_offset": 20,
                "ctx": {
                  "ast_class": "Load"
                },
                "end_col_offset": 26,
                "end_lineno": 15,
                "id": "menage",
                "lineno": 15
              },
              "keywords": [],
              "lineno": 15
            }
          },
          {
            "ast_class": "Assign",
            "col_offset": 4,
            "end_col_offset": 9,
            "end_lineno": 19,
            "lineno": 16,
            "targets": [
              {
                "ast_class": "Name",
                "col_offset": 4,
                "ctx": {
                  "ast_class": "Store"
                },
                "end_col_offset": 33,
                "end_lineno": 16,
                "id": "depenses_electricite_ajustees",
                "lineno": 16
              }
            ],
            "value": {
              "ast_class": "BinOp",
              "col_offset": 8,
              "end_col_offset": 58,
              "end_lineno": 18,
              "left": {
                "ast_class": "BinOp",
                "col_offset": 8,
                "end_col_offset": 72,
                "end_lineno": 17,
                "left": {
                  "ast_class": "Name",
                  "col_offset": 8,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 37,
                  "end_lineno": 17,
                  "id": "depenses_electricite_ajustees",
                  "lineno": 17
                },
                "lineno": 17,
                "op": {
                  "ast_class": "Mult"
                },
                "right": {
                  "ast_class": "Compare",
                  "col_offset": 41,
                  "comparators": [
                    {
                      "ast_class": "Name",
                      "col_offset": 57,
                      "ctx": {
                        "ast_class": "Load"
                      },
                      "end_col_offset": 71,
                      "end_lineno": 17,
                      "id": "min_tarif_fixe",
                      "lineno": 17
                    }
                  ],
                  "end_col_offset": 71,
                  "end_lineno": 17,
                  "left": {
                    "ast_class": "Name",
                    "col_offset": 41,
                    "ctx": {
                      "ast_class": "Load"
                    },
                    "end_col_offset": 54,
                    "end_lineno": 17,
                    "id": "depenses_elec",
                    "lineno": 17
                  },
                  "lineno": 17,
                  "ops": [
                    {
                      "ast_class": "Gt"
                    }
                  ]
                }
              },
              "lineno": 17,
              "op": {
                "ast_class": "Add"
              },
              "right": {
                "ast_class": "BinOp",
                "col_offset": 10,
                "end_col_offset": 58,
                "end_lineno": 18,
                "left": {
                  "ast_class": "Name",
                  "col_offset": 10,
                  "ctx": {
                    "ast_class": "Load"
                  },
                  "end_col_offset": 23,
                  "end_lineno": 18,
                  "id": "depenses_elec",
                  "lineno": 18
                },
                "lineno": 18,
                "op": {
                  "ast_class": "Mult"
                },
                "right": {
                  "ast_class": "Compare",
                  "col_offset": 27,
                  "comparators": [
                    {
                      "ast_class": "Name",
                      "col_offset": 43,
                      "ctx": {
                        "ast_class": "Load"
                      },
                      "end_col_offset": 57,
                      "end_lineno": 18,
                      "id": "min_tarif_fixe",
                      "lineno": 18
                    }
                  ],
                  "end_col_offset": 57,
                  "end_lineno": 18,
                  "left": {
                    "ast_class": "Name",
                    "col_offset": 27,
                    "ctx": {
                      "ast_class": "Load"
                    },
                    "end_col_offset": 40,
                    "end_lineno": 18,
                    "id": "depenses_elec",
                    "lineno": 18
                  },
                  "lineno": 18,
                  "ops": [
                    {
                      "ast_class": "Lt"
                    }
                  ]
                }
              }
            }
          },
          {
            "ast_class": "Return",
            "col_offset": 4,
            "end_col_offset": 40,
            "end_lineno": 21,
            "lineno": 21,
            "value": {
              "ast_class": "Name",
              "col_offset": 11,
              "ctx": {
                "ast_class": "Load"
              },
              "end_col_offset": 40,
              "end_lineno": 21,
              "id": "depenses_electricite_ajustees",
              "lineno": 21
            }
          }
        ],
        "col_offset": 0,
        "decorator_list": [],
        "end_col_offset": 40,
        "end_lineno": 21,
        "lineno": 1,
        "name": "formula"
      },
      "file_path": "openfisca_france_indirect_taxation/variables/reactions_comportementales_reforme/depenses_ajustees.py",
      "parameters": [
        ""
      ],
      "source_code": "def formula(menage, period, parameters):\n    depenses_electricite_variables = menage('depenses_electricite_variables', period)\n    depenses_electricite_prix_unitaire = menage('depenses_electricite_prix_unitaire', period)\n    reforme_electricite = parameters(period.start).taxe_carbone.electricite\n    electricite_elasticite_prix = menage('elas_price_2_2', period)\n    depenses_electricite_ajustees_variables = (\n        depenses_electricite_variables\n        * (1 + (1 + electricite_elasticite_prix) * reforme_electricite / depenses_electricite_prix_unitaire)\n        )\n    depenses_electricite_tarif_fixe = menage('depenses_electricite_tarif_fixe', period)\n    min_tarif_fixe = depenses_electricite_tarif_fixe.min()\n    depenses_electricite_ajustees = depenses_electricite_ajustees_variables + depenses_electricite_tarif_fixe\n\n    # We do not want to input the expenditure of the contract for those who consume nothing\n    depenses_elec = menage('depenses_electricite', period)\n    depenses_electricite_ajustees = (\n        depenses_electricite_ajustees * (depenses_elec > min_tarif_fixe)\n        + depenses_elec * (depenses_elec < min_tarif_fixe)\n        )\n\n    return depenses_electricite_ajustees\n",
      "start_line_number": 66,
      "stop_line_number": 87,
      "variables": [
        "depenses_electricite",
        "depenses_electricite_prix_unitaire",
        "depenses_electricite_tarif_fixe",
        "depenses_electricite_variables",
        "elas_price_2_2"
      ]
    }
  },
  "json_type": "number",
  "label": "Dépenses en électricité après réaction à la réforme - taxe carbone",
  "name": "depenses_electricite_ajustees_taxe_carbone",
  "referring_variables": [
    "quantites_electricite_ajustees_taxe_carbone"
  ],
  "start_line_number": 61,
  "stop_line_number": 87,
  "value_type": "float"
}
