Skip to content

Commit

Permalink
Fix EscalatedEnergy allocation so that 5ZoneEconomics... file runs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGlazer committed Aug 19, 2019
1 parent 07746b6 commit 1097a54
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/EnergyPlus/EconomicLifeCycleCost.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ namespace EconomicLifeCycleCost {
resourceCostAnnual(iResource) = annualCost;
}
// allocate the escalated energy cost arrays
EscalatedEnergy.allocate(lengthStudyYears, numResourcesUsed);
EscalatedEnergy.allocate(lengthStudyYears, NumOfResourceTypes);
EscalatedEnergy = 0.0;
EscalatedTotEnergy.allocate(lengthStudyYears);
EscalatedTotEnergy = 0.0;
Expand Down Expand Up @@ -1496,7 +1496,13 @@ namespace EconomicLifeCycleCost {

for (int iCashFlow = 1; iCashFlow <= numCashFlow; ++iCashFlow) {
if (CashFlow(iCashFlow).pvKind == pvkEnergy) {
curResource = CashFlow(iCashFlow).Resource - ResourceTypeInitialOffset;
// make sure this is not water
int curResource_iRT = CashFlow(iCashFlow).Resource;
if (CashFlow(iCashFlow).Resource == iRT_Water ||
(CashFlow(iCashFlow).Resource >= iRT_OnSiteWater && CashFlow(iCashFlow).Resource <= iRT_Condensate)) {
continue;
}
curResource = curResource_iRT - ResourceTypeInitialOffset;
if ((curResource >= 1) && (curResource < NumOfResourceTypes)) {
int found = 0;
for (nUsePriceEsc = 1; nUsePriceEsc <= numUsePriceEscalation; ++nUsePriceEsc) {
Expand Down

7 comments on commit 1097a54

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (9 of 9 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2509 of 2509 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1139 of 1139 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - Win64-Windows-10-VisualStudio-16: OK (2469 of 2469 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (669 of 669 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

FixLCC_Escalataion_6144 (JasonGlazer) - x86_64-MacOS-10.13-clang: OK (2469 of 2469 tests passed, 11 test warnings)

Messages:\n

  • 11 tests had: ERR diffs.

Build Badge Test Badge

Please sign in to comment.