Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for YAML and obfuscated output
20190511-21:01:46 mengwong@venice4:~/src/l/openfisca-aotearoa/l4% stack exec aotearoa-exe -- additional_per_dependant=500 initial_contribution=160 maximum_allowable=620 income_threshold=24790 period=2018 combined_income=20000 rates_total=1000,2000 dependants=0,1 --goal=rr-br3nda-clip --nlgstyle=yaml - name: Someone with 0 dependants earning $20000 who paid $1000 in rates period: 2018 absolute_error_margin: 1 input: rates_rebates__combined_income: 20000 rates_rebates__dependants: 0 rates_rebates__rates_total: 1000 output: rates_rebates__rebate: 560 - name: Someone with 1 dependants earning $20000 who paid $1000 in rates period: 2018 absolute_error_margin: 1 input: rates_rebates__combined_income: 20000 rates_rebates__dependants: 1 rates_rebates__rates_total: 1000 output: rates_rebates__rebate: 560 - name: Someone with 0 dependants earning $20000 who paid $2000 in rates period: 2018 absolute_error_margin: 1 input: rates_rebates__combined_income: 20000 rates_rebates__dependants: 0 rates_rebates__rates_total: 2000 output: rates_rebates__rebate: 620 - name: Someone with 1 dependants earning $20000 who paid $2000 in rates period: 2018 absolute_error_margin: 1 input: rates_rebates__combined_income: 20000 rates_rebates__dependants: 1 rates_rebates__rates_total: 2000 output: rates_rebates__rebate: 620 20190511-21:01:46 mengwong@venice4:~/src/l/openfisca-aotearoa/l4% stack exec aotearoa-exe -- additional_per_dependant=500 initial_contribution=160 maximum_allowable=620 income_threshold=24790 period=2018 combined_income=20000 rates_total=1000,2000 dependants=0,1 --goal=rr-br3nda-clip +-------------+ | 1000 2000 | | 0 560 620 | | 1 560 620 | +-------------+ 20190511-21:01:54 mengwong@venice4:~/src/l/openfisca-aotearoa/l4% stack exec aotearoa-exe -- additional_per_dependant=500 initial_contribution=160 maximum_allowable=620 income_threshold=24790 period=2018 combined_income=20000 rates_total=1000 dependants=0 --goal=rr-br3nda-clip --nlgstyle=obfuscated the goal, believe it or not, is so much of the rates payable for that rating year in respect of the property as represents two-thirds of the amount by which the rates payable for that rating year in respect of the property exceeds 160.00 reduced by $1 for each $8 by which the ratepayer's income for the preceding tax year exceeded 24790.00 , that last-mentioned amount being increased by 500.00 in respect of each person who was a dependant of the ratepayer at the commencement of the rating year in respect of which the application is made ; or 620.00 , whichever is lesser 20190511-21:02:22 mengwong@venice4:~/src/l/openfisca-aotearoa/l4% stack exec aotearoa-exe -- additional_per_dependant=500 initial_contribution=160 maximum_allowable=620 income_threshold=24790 period=2018 combined_income=20000 rates_total=1000 dependants=0 --goal=rr-br3nda-clip --nlgstyle=abstract the goal is defined as the lesser of the lesser of the rates payable for that rating year in respect of the property and the greater of simply 0.00 and the difference between two-thirds of the amount by which the rates payable for that rating year in respect of the property exceeds 160.00 and $1 for each $8 in the amount by which the ratepayer's income for the preceding tax year exceeds the sum of 24790.00 with the product of 500.00 multiplied by person who was a dependant of the ratepayer at the commencement of the rating year in respect of which the application is made and 620.00 20190511-21:02:26 mengwong@venice4:~/src/l/openfisca-aotearoa/l4% stack exec aotearoa-exe -- additional_per_dependant=500 initial_contribution=160 maximum_allowable=620 income_threshold=24790 period=2018 combined_income=20000 rates_total=1000 dependants=0 --goal=rr-br3nda-clip --nlgstyle=neutral the goal you're looking for is the lesser of the lesser of the rates payable for that rating year in respect of the property and the greater of simply 0.00 and the difference between two-thirds of the amount by which the rates payable for that rating year in respect of the property exceeds the initial contribution by ratepayer, which is 160.00 and $1 for each $8 in the amount by which the ratepayer's income for the preceding tax year exceeds the sum of the income threshold, which is 24790.00 with the product of the additional allowable income per dependant, which is 500.00 multiplied by person who was a dependant of the ratepayer at the commencement of the rating year in respect of which the application is made and the maximum rebate allowed, which is 620.00 20190511-21:02:29 mengwong@venice4:~/src/l/openfisca-aotearoa/l4% stack exec aotearoa-exe -- additional_per_dependant=500 initial_contribution=160 maximum_allowable=620 income_threshold=24790 period=2018 combined_income=20000 rates_total=1000 dependants=0 --goal=rr-br3nda-clip --nlgstyle=concrete showing how we obtain the answer 560.00 -- which is the lesser of 560.00 -- which is the lesser of 1000.00 -- which is rates_total, the rates payable for that rating year in respect of the property and 560.00 -- which is the greater of simply 0.00 and 560.00 -- which is the difference between 560.00 -- which is two-thirds of 840.00 -- which is the amount by which 1000.00 -- which is rates_total, the rates payable for that rating year in respect of the property exceeds 160.00 -- which is initial_contribution, the initial contribution by ratepayer and 0.00 -- which is $1 for each $8 in 0.00 -- which is the amount by which 20000.00 -- which is combined_income, the ratepayer's income for the preceding tax year exceeds 24790.00 -- which is the sum of 24790.00 -- which is income_threshold, the income threshold with 0.00 -- which is the product of 500.00 -- which is additional_per_dependant, the additional allowable income per dependant multiplied by 0.00 -- which is dependants, person who was a dependant of the ratepayer at the commencement of the rating year in respect of which the application is made and 620.00 -- which is maximum_allowable, the maximum rebate allowed
- Loading branch information