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

feat: added adjusted and retrofitted gas bills #104

Closed
wants to merge 8 commits into from

Conversation

zz-hh-aa
Copy link
Collaborator

@zz-hh-aa zz-hh-aa commented Oct 1, 2024

What does this PR do?

  • Adds gasBillAdjustedYearly and gasBillRetrofitYearly to the Household class
    • They are now included in the Household constructor, and also have their own calculation functions calculateGasBillAdjustedYearly and calculateGasBillRetrofitYearly
  • Updates the Lifetime class to include gasBillAdjustedYearly and gasBillRetrofitYearly, inflating their values year on year
    • interface LifetimeParams is updated, as is interface LifetimeData and the calculateLifetime function itself
  • Passes the gas bills to the graphs
    • gasBillAdjustedYearly to LifetimeMarketPurchaseWrapper and LifetimeMarketRentWrapper
    • gasBillRetrofitYearly to LifetimeFairholdLandPurchaseWrapper and LifetimeFairholdLandRentWrapper

Why?

  • The previous gasBillYearly value we were getting was one static figure for the average house, assuming heating demand of 13,600 kwh. Since the calculator needs to be able to account for different house sizes, types and insulation, one value wasn't sufficient.
  • gasBillAdjustedYearly takes the price per kwh and uses the gasBillAverageYearly (retried from database), property.size and property.houseType to estimate a more accurate version of bills for the existing property
    • gasBillRetrofitYearly does the same but with lower kwh demands per m2

Closes #26

Copy link

vercel bot commented Oct 1, 2024

@zz-hh-aa is attempting to deploy a commit to the Open Systems Lab's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:

  • Make your repository public. Collaboration is free for open source and public repositories.
  • Upgrade to pro and add @zz-hh-aa as a member. A Pro subscription is required to access Vercel's collaborative features.
    • If you're the owner of the team, click here to upgrade and add @zz-hh-aa as a member.
    • If you're the user who initiated this build request, click here to request access.
    • If you're already a member of the Open Systems Lab's projects team, make sure that your Vercel account is connected to your GitHub account.

To read more about collaboration on Vercel, click here.

@zz-hh-aa zz-hh-aa requested a review from a team October 1, 2024 16:23
Copy link
Collaborator

@gabrielegranello gabrielegranello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, it makes sense to split it as you did. Just one minor comment... Do you think it would be possible to add a link or something to this comment?
// Figures from LETI, via Studio PDP
Just to retrieve these numbers in the future should they change and to provide a reference for external people reading the code

@zz-hh-aa
Copy link
Collaborator Author

zz-hh-aa commented Oct 7, 2024

Thanks @gabrielegranello! I guess there's an open question about how we want to document sources--does it make sense to put links in the README instead of in the code? I think comments might get messy with a bunch of URLs stuck in. Maybe this is something we can talk about this Friday!

@DafyddLlyr DafyddLlyr force-pushed the oz/retrofit-gas-bills branch from cb898be to cf076e1 Compare October 11, 2024 11:19
@DafyddLlyr DafyddLlyr force-pushed the main branch 2 times, most recently from ae62f43 to bac99e6 Compare October 11, 2024 11:35
@DafyddLlyr DafyddLlyr force-pushed the oz/retrofit-gas-bills branch from cf076e1 to 287c836 Compare October 11, 2024 11:35
@zz-hh-aa
Copy link
Collaborator Author

Made a mess of this in the rebase / merge conflict fixing; since we have new data soon and needed to replace the math anyway, I'm just going to close this PR.

@zz-hh-aa zz-hh-aa closed this Oct 11, 2024
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

Successfully merging this pull request may close these issues.

feat: ensure there are two gas bills (one for retrofitted or newbuild house, one for non)
2 participants