Skip to content

Commit 59ff878

Browse files
committed
Update ptes and etes tests to run all is_dispatch and update pvsamv1 integration tests
1 parent 2b28f0b commit 59ff878

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

test/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ GTEST_API_ int main(int argc, char **argv) {
6363
//::testing::GTEST_FLAG(filter) = "CMPvsamv1PowerIntegration_cmod_pvsamv1.NoFinancialModelSystemDesign";
6464
//::testing::GTEST_FLAG(filter) = "CmodCashLoanTest*:CmodSingleOwnerTest*";
6565
//::testing::GTEST_FLAG(filter) = "Solesca*";
66-
66+
//::testing::GTEST_FLAG(filter) = "etes_ptes_test*";
6767
//::testing::GTEST_FLAG(filter) = "csp_tower.PowerTowerCmod*";
6868
//::testing::GTEST_FLAG(filter) = "CmodFresnelPhysicalTest.MSLFDefault";
6969

test/ssc_test/cmod_etes_etes_test.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ NAMESPACE_TEST(etes_etes_test, EtesEtesCmod, Default_NoFinancial)
4444
{
4545
ssc_data_t defaults = etes_etes_defaults();
4646
CmodUnderTest etes_system = CmodUnderTest("etes_electric_resistance", defaults);
47-
/*
47+
4848
etes_system.SetInput("is_dispatch", 0);
4949
int errors = etes_system.RunModule();
5050
double ann_energy = etes_system.GetOutput("annual_energy");
5151
EXPECT_FALSE(errors);
5252
if (!errors) {
5353
EXPECT_NEAR_FRAC(std::abs(etes_system.GetOutput("annual_energy")), std::abs(-739728801.), kErrorToleranceHi);
5454
}
55-
*/
55+
5656
etes_system.SetInput("is_dispatch", 1);
57-
int errors = etes_system.RunModule();
58-
double ann_energy = etes_system.GetOutput("annual_energy");
57+
errors = etes_system.RunModule();
58+
ann_energy = etes_system.GetOutput("annual_energy");
5959
EXPECT_FALSE(errors);
6060
if (!errors) {
6161
EXPECT_NEAR_FRAC(std::abs(etes_system.GetOutput("annual_energy")), std::abs(-497554825), kErrorToleranceHi);

test/ssc_test/cmod_etes_ptes_test.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,19 @@ NAMESPACE_TEST(etes_ptes_test, EtesPtesCmod, Default_NoFinancial)
4444
{
4545
ssc_data_t defaults = etes_ptes_defaults();
4646
CmodUnderTest ptes_system = CmodUnderTest("etes_ptes", defaults);
47-
/*
47+
4848
ptes_system.SetInput("is_dispatch", 0);
4949
int errors = ptes_system.RunModule();
5050
double ann_energy = ptes_system.GetOutput("annual_energy");
5151
EXPECT_FALSE(errors);
5252
if (!errors) {
5353
EXPECT_NEAR_FRAC(std::abs(ptes_system.GetOutput("annual_energy")), std::abs(264339255.), kErrorToleranceHi);
5454
}
55-
*/
5655
ptes_system.SetInput("is_dispatch", 1);
57-
int errors = ptes_system.RunModule();
58-
double ann_energy = ptes_system.GetOutput("annual_energy");
56+
errors = ptes_system.RunModule();
57+
ann_energy = ptes_system.GetOutput("annual_energy");
5958
EXPECT_FALSE(errors);
6059
if (!errors) {
6160
EXPECT_NEAR_FRAC(std::abs(ptes_system.GetOutput("annual_energy")), std::abs(202929176.), kErrorToleranceHi);
6261
}
63-
6462
}

test/ssc_test/cmod_pvsamv1_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ TEST_F(CMPvsamv1PowerIntegration_cmod_pvsamv1, NoFinancialModelSystemDesign)
670670
192329, 187710, 185732, 197565, 201021, 192329, 187710
671671
};
672672

673-
for (size_t i = 0; i < annual_energy_expected.size(); i+=15)
673+
for (size_t i = 57; i < annual_energy_expected.size(); i++)
674674
{
675675
pairs["enable_mismatch_vmax_calc"] = enable_mismatch[i];
676676
pairs["subarray1_azimuth"] = subarray1_azimuth[i];

0 commit comments

Comments
 (0)