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

Import json as SAM case #969

Merged
merged 73 commits into from May 4, 2023
Merged

Import json as SAM case #969

merged 73 commits into from May 4, 2023

Conversation

tyneises
Copy link
Collaborator

Updates to MSPT compute module to enable importing jsons (e.g. generated via Shift + F5) as a SAM case:

  • Convert 9 independent TOD values into a single array value for pricing TOD
  • New data type for "adjust" inputs

This pull request also includes modifications relevant for non-MSPT technologies:

  • New data type for "adjust" inputs, and compute modules updated accordingly

@sjanzou Please add anything I'm missing

tyneises and others added 23 commits October 5, 2022 10:17
Single Owner running - other compute modules are not
SAM and ssc both use dispatch_tod_factors array type
@cpaulgilman
Copy link
Collaborator

It looks like the change to adjustment factors correctly imports inputs from the SAM UI as-is, so we won't need to use the version upgrade script to handle opening files from older versions of SAM. @sjanzou, is that correct?

Not sure what impact this will have on the need for the "AdjustmentFactors" group in PySAM, for example in the Pvwattsv8 documentation: https://nrel-pysam.readthedocs.io/en/master/modules/Pvwattsv8.html#adjustmentfactors-group. We may need to add instructions for converting to the new table format in the PySAM documentation.

Copy link
Collaborator

@brtietz brtietz left a comment

Choose a reason for hiding this comment

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

Code seems to work, and this is a great improvement, but there needs to be a lot of clean-up around commented out code, the test runner, and documentation of the new SSC_TABLE variables.

ssc/cmod_etes_electric_resistance.cpp Outdated Show resolved Hide resolved
ssc/cmod_etes_electric_resistance.cpp Outdated Show resolved Hide resolved
ssc/common_financial.cpp Outdated Show resolved Hide resolved
ssc/common_financial.cpp Outdated Show resolved Hide resolved
test/main.cpp Outdated Show resolved Hide resolved
ssc/cmod_swh.cpp Outdated Show resolved Hide resolved
@sjanzou sjanzou self-requested a review April 13, 2023 10:26
@sjanzou sjanzou requested review from cpaulgilman, mjprilliman and brtietz and removed request for brtietz, cpaulgilman and mjprilliman April 15, 2023 10:17
@sjanzou
Copy link
Collaborator

sjanzou commented Apr 21, 2023

Code seems to work, and this is a great improvement, but there needs to be a lot of clean-up around commented out code, the test runner, and documentation of the new SSC_TABLE variables.

Comments removed and tests being updated

@sjanzou sjanzou requested a review from brtietz April 21, 2023 04:03
@sjanzou
Copy link
Collaborator

sjanzou commented Apr 21, 2023

Code seems to work, and this is a great improvement, but there needs to be a lot of clean-up around commented out code, the test runner, and documentation of the new SSC_TABLE variables.

Everything is flattened now, so the SSC_TABLE variables from SAM are non-existent.

implicit definition of function is invalid in C99 an later treated as error now. Add function prototype at top of file to build.
Fixes ETES, PTES equation issue when loading case
adjust_hourly functionality kept for scripting but was removed from UI in previous release
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.

SSC_TABLE removed from inputs from SAM and all requested changes made

@sjanzou sjanzou dismissed brtietz’s stale review May 2, 2023 05:27

All requested changes have been made and SSC_TABLE are not used for inputs from SAM

@sjanzou sjanzou merged commit 419d9f6 into develop May 4, 2023
4 checks passed
@sjanzou sjanzou deleted the mspt_no_finance branch May 4, 2023 07:12
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.

None yet

4 participants