Skip to content

Commit

Permalink
Reduce simulation time
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Oct 24, 2024
1 parent 1600947 commit 22b0773
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.13.1] - 2024-10-24 13:24:27

### Fixed

- Bug causing capital gains responses to be calculated for every reform simulation.

## [2.13.0] - 2024-10-24 11:42:25

### Fixed
Expand Down Expand Up @@ -1561,6 +1567,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[2.13.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.13.0...2.13.1
[2.13.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.12.0...2.13.0
[2.12.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.11.0...2.12.0
[2.11.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.10.0...2.11.0
Expand Down
5 changes: 5 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1310,3 +1310,8 @@
- Bug causing household app crashes.
- Metadat for OBR parameters.
date: 2024-10-24 11:42:25
- bump: patch
changes:
fixed:
- Bug causing capital gains responses to be calculated for every reform simulation.
date: 2024-10-24 13:24:27
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ def formula(person, period, parameters):
if simulation.baseline is None:
return 0

if (
parameters(
period
).gov.simulation.capital_gains_responses.elasticity
== 0
):
return 0

capital_gains = person("capital_gains_before_response", period)
tax_rate_change = person("relative_capital_gains_mtr_change", period)
elasticity = person("capital_gains_elasticity", period)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="PolicyEngine-UK",
version="2.13.0",
version="2.13.1",
author="PolicyEngine",
author_email="nikhil@policyengine.org",
classifiers=[
Expand Down

0 comments on commit 22b0773

Please sign in to comment.