Skip to content

GSYE-158: Compute the PV return on investment at the end of a simulation - #1927

Open
BigTava wants to merge 3 commits into
masterfrom
gsye-158-gsy-e-roi-changes
Open

BigTava wants to merge 3 commits into
masterfrom
gsye-158-gsy-e-roi-changes

Conversation

@BigTava

@BigTava BigTava commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • At the end of every simulation, RoiResultsCollector gives each PV a return-on-investment result using the D7.3 trade-based baseline. Energy that reaches a consumer in the PV's own area, directly or through a battery there, is valued at the supplier rate plus path grid fees, and energy sold outside the area is revenue.
  • Battery energy is followed oldest first with the battery's charging, discharging and self-discharge losses, so a discharge is credited to the PV that stored it.
  • A PV owned by several member areas takes ownership_member_uuids and ownership_shares and gets a community result plus one per member. An optional annual_generation_kWh annualises a short run by season, and every result carries low and high cases over the four D7.3 range levers.
  • The calculation uses the gsy-framework engine, parameters and range from gsy-framework PR GSYE-158: Add the PV RoI cash-flow and indicator engine gsy-framework#615, writes aggregated_results/roi.json on CLI runs and adds roi to the final payload sent to gsy-web.
  • An opt-in ORDER_BY_ITEM_HASH constant keeps a run without one asset comparable with the run that has it, while normal runs keep the numpy ordering. This touches the same numpy calls as PR use python random instead numpy #1526, so the two will conflict.

INTEGRATION_TESTS_BRANCH=master
GSY_FRAMEWORK_BRANCH=feature/GSYE-158-roi-engine
SCM_ENGINE_BRANCH=master

@BigTava
BigTava force-pushed the gsye-158-gsy-e-roi-changes branch from 82f68b9 to cefd429 Compare October 6, 2026 23:39
…ulation and report it to the JSON export and gsy-web.
@BigTava BigTava changed the title GSYE-158: Add an opt-in item-hash ordering for comparable RoI baseline runs GSYE-158: Compute the PV return on investment at the end of a simulation Oct 6, 2026
…shared PV, annual generation and the low and high range to the RoI results.
@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.89831% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.53%. Comparing base (fd867ca) to head (959e5e5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1927      +/-   ##
==========================================
+ Coverage   73.08%   73.53%   +0.44%     
==========================================
  Files         156      159       +3     
  Lines       15124    15388     +264     
  Branches     1934     1973      +39     
==========================================
+ Hits        11053    11315     +262     
+ Misses       3554     3550       -4     
- Partials      517      523       +6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

1 participant