Skip to content

Conversation

@sjanzou
Copy link
Collaborator

@sjanzou sjanzou commented Jul 22, 2021

lib_dispatch_pv_smoothing_fom shared library and test
No weather file forecast until merged into develop

sjanzou added 30 commits April 29, 2021 04:35
@sjanzou sjanzou self-assigned this Jul 22, 2021
@sjanzou sjanzou requested review from brtietz and dguittet July 22, 2021 09:48
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.

SSC code looks good overall, mostly some cleanliness requests regarding the transition from development and debugging to production. Nice work!

@sjanzou sjanzou requested a review from brtietz July 23, 2021 12:03
@brtietz
Copy link
Collaborator

brtietz commented Jul 23, 2021

Travis seems to be having trouble with the tests, and I'm also having trouble locally:

From PV_Phoeniz_all_on:

    !! This test has probably CRASHED !!
    Test output:
    
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\vector(1566) : Assertion failed: vector subscript out of range

I dug into this on Generic_w_PV_input_all_on and it looks like the error is in the LCOS calculations in common_financial:

image

charged_pv only has length 1. batt_annual_charge_from_system appears to be empty.

I'm not sure whether this means the test needs to change to ensure this value is reported or the code in the financial models needs to be more robust. This metric appears to work in the GUI.

@sjanzou
Copy link
Collaborator Author

sjanzou commented Jul 23, 2021

@mjprilliman, why is the generic system failing here? The tests run fine on my Windows box. Thanks!

@mjprilliman
Copy link
Collaborator

mjprilliman commented Jul 23, 2021

Travis seems to be having trouble with the tests, and I'm also having trouble locally:

From PV_Phoeniz_all_on:

    !! This test has probably CRASHED !!
    Test output:
    
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\vector(1566) : Assertion failed: vector subscript out of range

I dug into this on Generic_w_PV_input_all_on and it looks like the error is in the LCOS calculations in common_financial:

image

charged_pv only has length 1. batt_annual_charge_from_system appears to be empty.

I'm not sure whether this means the test needs to change to ensure this value is reported or the code in the financial models needs to be more robust. This metric appears to work in the GUI.

Must be something to do with analysis_period being set to 1. When that happens the array doesn't seem to have a year 0 like I was assuming so there's the size 1 array @brtietz. My code assumes we skip the first index in a lot of places because that is year 0. Is that the correct array sizing behavior @sjanzou?

Sorry I was right the first time. The array goes to size 1 rather than size 2 (expected) and thus shows up in Single Values rather than Annual Values in the GUI

@mjprilliman
Copy link
Collaborator

@brtietz @sjanzou

image

This is in cmod_battery.cpp. Why make it 1 rather than 2?

@sjanzou
Copy link
Collaborator Author

sjanzou commented Jul 23, 2021

Agreed that should be 2. Same issue in cmod_fuelcell that prevented single year analysis periods to be run.

@sjanzou
Copy link
Collaborator Author

sjanzou commented Jul 25, 2021

PVSmoothing tests working fine on Windows and Travis-CI
image
image

@sjanzou
Copy link
Collaborator Author

sjanzou commented Jul 26, 2021

Latest Windows results with all test (usual widows weather_file_inputs test failure - usually different each time)
image

@sjanzou sjanzou merged commit 781d12b into develop Jul 27, 2021
@brtietz brtietz added this to the SAM Fall 2021 Release milestone Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants