Skip to content

Conversation

@brtietz
Copy link
Collaborator

@brtietz brtietz commented Sep 9, 2025

Pull Request Template

Description

Add input start_day_of_year to relevant compute modules, and propagate effects to weekday/weekend schedules including:

  • Dispatch
  • Utility rates
  • Time of delivery for PPA

Fixes #195

Corresponding branches and PRs:

Pairs with SAM PR TBD

Unit Test Impact:

Added tests to lib_util_test to verify new behavior

Other tests updates should just change function signature, not affect results.

Known compiler issue potentially affecting CMPvsamv1PowerIntegration_cmod_pvsamv1.NoFinancialModelSkyDiffuseAndIrradModels

Checklist

  • requires help revision and I added that label
  • adds, removes, modifies, or deletes variables in existing compute modules
  • adds a new compute module
  • changes defaults
  • I've tagged this PR to a milestone

Reminders- this section can be deleted

[Checking for PySAM Incompatible API Changes]
(https://github.com/NREL/SAM/wiki/PySAM-Incompatible-API-Changes-&-Regenerating-PySAM-Files).

[When do the PySAM files need to be regenerated?]
(https://github.com/NREL/SAM/wiki/PySAM-Incompatible-API-Changes-&-Regenerating-PySAM-Files#when-do-the-pysam-files-need-to-be-regenerated-via-export_config)

Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

Wow! Lots of changes througout. All tests passing on MacOS 15.6 arm64 build using Clang 16.0.0.16000026 with XCode 16.2 (different from GitHub Actions Mac runners)

Image

Copy link
Collaborator

@cpaulgilman cpaulgilman left a comment

Choose a reason for hiding this comment

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

Implementation looks good, I can see effect of January 1 day of week on outputs for load, energy charge, and demand charge for BTM configs, and in revenue TOD factors for FOM configs.

@coveralls
Copy link

coveralls commented Sep 10, 2025

Pull Request Test Coverage Report for Build 18352938785

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1749 unchanged lines in 22 files lost coverage.
  • Overall coverage increased (+0.008%) to 56.657%

Files with Coverage Reduction New Missed Lines %
ssc/ssc/cmod_fuelcell.h 4 80.28%
ssc/shared/lib_utility_rate.h 7 0.0%
ssc/tcs/csp_solver_tou_block_schedules.cpp 8 77.33%
ssc/ssc/cmod_battwatts.cpp 10 93.26%
ssc/shared/lib_battery_dispatch_manual.cpp 11 87.23%
ssc/shared/lib_fuel_cell_dispatch.cpp 12 82.71%
ssc/ssc/common_financial.cpp 23 72.65%
ssc/ssc/cmod_geothermal.cpp 25 87.55%
ssc/ssc/cmod_etes_ptes.cpp 26 91.91%
ssc/shared/lib_utility_rate.cpp 29 64.68%
Totals Coverage Status
Change from base Build 18185752877: 0.008%
Covered Lines: 66683
Relevant Lines: 117695

💛 - Coveralls

@brtietz brtietz merged commit 2afff4f into develop Oct 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Line up day of week in financial model with performance model

6 participants