Conversation
Generate and test in PySAM - no longer have random NaNs for output metrics for repeated runs
brtietz
reviewed
Feb 13, 2023
| double first_val = fuelcell_discharged[0]; | ||
| fuelcell_discharged.resize(nyears, first_val); | ||
| } | ||
| if (fuelcell_discharged.size() != nyears) |
Collaborator
There was a problem hiding this comment.
The ssc test failures appear to be caused by this line. Fuel cell and battery use different length conventions for output variables: battery is nyears, fuel cell is nyears + 1. I believe battery to be correct, but can't find where we wrote down the convention of the financial models pre-pending year 0.
Collaborator
Author
There was a problem hiding this comment.
@brtietz , the convention as far as I know is the the technology models start at year 1 and the financial models start at year zero. The cmod_fuelcell allocations:

seem to be due to startup fuel consumption in year 0:

I have updated all financial models to expect the fuel cell output arrays to be nyears+1.
brtietz
approved these changes
Feb 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No longer have random NaNs in financial model outputs for single year technology model runs with analysis periods greater than one