Skip to content

Fix JSON Read Issues for URDB Downloads#1862

Merged
cpaulgilman merged 5 commits into
developfrom
sam-1848-urdb-max-tier-download-issue
Oct 4, 2024
Merged

Fix JSON Read Issues for URDB Downloads#1862
cpaulgilman merged 5 commits into
developfrom
sam-1848-urdb-max-tier-download-issue

Conversation

@cpaulgilman

Copy link
Copy Markdown
Collaborator

Pull Request Template

Description

Use IsNumber() in place of IsDouble() to check numeric values from URDB JSON because tier max values are stored as integers, not doubles.

Use UTF16 instead of UTF8 to fix problem reading some URDB JSON in Windows.

Add RapidJSON error codes to error messages to help with future troubleshooting.

Fixes #1848

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

cpaulgilman and others added 4 commits October 1, 2024 15:15
In some cases for URDB data, e.g., energy charge tier max value, JSON stores an integer for a value that SAM requires to be double. IsNumber() allows integers to be read in and then be converted to double.

Also changing this for geotools so that integer values of lat/lon are read in from JSON as valid values.
@cpaulgilman cpaulgilman added bug UI User interface issue that applies across performance and financial models labels Oct 3, 2024
@cpaulgilman cpaulgilman added this to the SAM Fall 2024 Release milestone Oct 3, 2024
@cpaulgilman cpaulgilman requested review from brtietz and sjanzou October 3, 2024 15:25
@cpaulgilman cpaulgilman self-assigned this Oct 3, 2024

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for finding and fixing the issues!

Comment thread src/urdb.cpp
Comment thread src/geotools.cpp
@cpaulgilman cpaulgilman merged commit 0625be8 into develop Oct 4, 2024
@cpaulgilman cpaulgilman added the added to release notes PR and/or issue has been added to release notes for a public release label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes PR and/or issue has been added to release notes for a public release bug UI User interface issue that applies across performance and financial models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Georgia Power PLL-11 Rate does not download tiers properly from URDB

2 participants