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

Pysam hybrids #1584

Merged
merged 47 commits into from
Mar 6, 2024
Merged

Pysam hybrids #1584

merged 47 commits into from
Mar 6, 2024

Conversation

dguittet
Copy link
Collaborator

Pull Request Template

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

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

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.

Cannot build on Windows with following export_config externals error
image

@brtietz brtietz changed the base branch from develop to patch December 13, 2023 16:37
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.

All the Projects are build on Windows - awesome!

However, the Generic PVWatts Wind FuelCell Battery Hybrid configurations are failing on Windows, looks like "generic_degradation" needs to be updated e.g. (Host Developer)
image

As are the PVWatts Wind FuelCell Battery configurations with missing "degradation" for FuelCell configurations, e.g. (Single Owner)
image

Also, the Hybrid configuration test results are changing from the patch branch
image

@dguittet
Copy link
Collaborator Author

dguittet commented Mar 4, 2024

@sjanzou I merged in SAM_1515 but I'm still getting outputs like ui_land_area_ha for PVWatts Hybrid when I run JSON for Inputs

@dguittet
Copy link
Collaborator Author

dguittet commented Mar 4, 2024

@sjanzou I made this change to the codegenerator that seems to fix it: 71940c6

@sjanzou
Copy link
Collaborator

sjanzou commented Mar 5, 2024

@sjanzou I made this change to the codegenerator that seems to fix it: 71940c6

Great! Thanks for fixing that!

@sjanzou
Copy link
Collaborator

sjanzou commented Mar 5, 2024

Same inputs giving different financial outputs, pysam_hybrids on left and patch on right
image

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.

We should resolve the differences in financial outputs for both ssc and SAM with the pysam_hybrids branches.

@@ -60,8 +60,8 @@ Standalone Battery,Merchant Plant,-8397703,26.6181,NA,; Warning: IRR at end of a
Standalone Battery,Leveraged Partnership Flip,-8397703,78.2835,72.514,; Warning: IRR at end of analysis period is not a number (NaN). This can indicate that revenues are too low to cover costs, or that they are excessively high compared to costs. Warning: IRR in target year is not a number (NaN). This can indicate that revenues are too low to cover costs, or that they are excessively high compared to costs. Warning: NPV is $-3.12112e+07. A negative NPV indicates project costs are higher than revenues.
Standalone Battery,All Equity Partnership Flip,-8397703,79.1754,72.514,; Warning: IRR at end of analysis period is not a number (NaN). This can indicate that revenues are too low to cover costs, or that they are excessively high compared to costs. Warning: IRR in target year is not a number (NaN). This can indicate that revenues are too low to cover costs, or that they are excessively high compared to costs. Warning: NPV is $-3.85976e+07. A negative NPV indicates project costs are higher than revenues.
Standalone Battery,Sale Leaseback,-8397703,80.5079,72.514,; Warning: IRR at end of analysis period is not a number (NaN). This can indicate that revenues are too low to cover costs, or that they are excessively high compared to costs. Warning: NPV is $-4.61131e+07. A negative NPV indicates project costs are higher than revenues. Warning: NPV is $-8.70063e+07. A negative NPV indicates project costs are higher than revenues.
ETES,Single Owner,-466572064,14.7945,7.40855,;
PTES,Single Owner,-197595520,18.6636,10.3676,;
ETES,Single Owner,-467817888,14.8003,7.39191,;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these differing? They are in the META tag for some o and m costs but are not hybridized...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It may be that these just are non-deterministic. I just ran the PTES Single Owner case off patch and got different values from both of these:

-198005504, 18.65, 10.35

PVWatts Wind FuelCell Battery Hybrid,Single Owner,579660736,10.6946,5.41105,; Notice: Simulation time step is 60 minutes for pvwattsv8. Notice: Simulation time step is 60 minutes for windpower.
PVWatts Wind FuelCell Battery Hybrid,Host Developer,2.68732e+06,49.7344,51.3994,; Notice: Simulation time step is 60 minutes for pvwattsv8. Notice: Simulation time step is 60 minutes for windpower.
Photovoltaic Wind Battery Hybrid,Single Owner,594070784,8.46988,5.95228,; Notice: Simulation time step is 60 minutes for pvsamv1. Notice: Simulation time step is 60 minutes for windpower.
PVWatts Wind Battery Hybrid,Single Owner,578883008,10.553,5.91853,; Notice: Simulation time step is 60 minutes for pvwattsv8. Notice: Simulation time step is 60 minutes for windpower.
Copy link
Collaborator

Choose a reason for hiding this comment

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

All the hybrid financial outputs differ and so do the ssc test using the same input file as commented on ssc pull request 1091.

@sjanzou sjanzou self-requested a review March 6, 2024 09:02
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.

Working on windows and results matching with patch branches ssc and SAM.

Great work

@sjanzou sjanzou merged commit 5f9f0e6 into patch Mar 6, 2024
4 checks passed
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.

3 participants