Skip to content

Import json as SAM case#969

Merged
sjanzou merged 73 commits into
developfrom
mspt_no_finance
May 4, 2023
Merged

Import json as SAM case#969
sjanzou merged 73 commits into
developfrom
mspt_no_finance

Conversation

@tyneises

Copy link
Copy Markdown
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
Copy Markdown
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.

@brtietz brtietz 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.

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.

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

sjanzou commented Apr 21, 2023

Copy link
Copy Markdown
Collaborator

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

sjanzou commented Apr 21, 2023

Copy link
Copy Markdown
Collaborator

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.
sjanzou added 3 commits April 23, 2023 04:37
Fixes ETES, PTES equation issue when loading case
adjust_hourly functionality kept for scripting but was removed from UI in previous release

@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.

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
@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.

4 participants