Skip to content
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

Figure out quirks setting replacement_period_offset #507

Open
denised opened this issue Oct 28, 2021 · 2 comments
Open

Figure out quirks setting replacement_period_offset #507

denised opened this issue Oct 28, 2021 · 2 comments

Comments

@denised
Copy link
Member

denised commented Oct 28, 2021

The Unit Adoption quirks setting replacement_period_offset is very strange --- I introduced it, but I don't understand it. The observed affect in the test results is an off-by-one error in what year replacement units get put in. Different models need this parameter set to either zero or one to get the right results. I don't know if this is because the models actually have different calculations, or if there is some more other bug in the python code that this somehow compensates for.
If there is a difference in the models, then it would be nice if the extractor could test for it somehow --- it is the most mysterious quriks setting.

@DentonGentry
Copy link
Contributor

One thing which springs to mind is hitting an edge case in ROUND(). Excel's rounding behavior differs significantly from Python 3. There is an implementation which matches Excel's behavior: https://github.com/ProjectDrawdown/solutions/blob/develop/model/excel_math.py

@denised
Copy link
Member Author

denised commented Oct 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants