Skip to content

Commit

Permalink
Merge pull request #4743 from NREL/4734-EMS-warmup-flag
Browse files Browse the repository at this point in the history
issue 4734 EMS add dynamic built in variable for WarmupFlag
  • Loading branch information
JasonGlazer committed Mar 2, 2015
2 parents e5c9e89 + c56982e commit 54e3769
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/EnergyPlus/RuntimeLanguageProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ namespace RuntimeLanguageProcessor {
int CurrentEnvironmentPeriodNum( 0 );
int ActualDateAndTimeNum( 0 );
int ActualTimeNum( 0 );
int WarmUpFlagNum( 0 );

static gio::Fmt fmtLD( "*" );
static gio::Fmt fmtA( "(A)" );
Expand Down Expand Up @@ -148,6 +149,7 @@ namespace RuntimeLanguageProcessor {
using DataGlobals::OutputFileDebug;
using DataGlobals::CurrentTime;
using DataGlobals::TimeStepZone;
using DataGlobals::WarmupFlag;
using DataEnvironment::Year;
using DataEnvironment::Month;
using DataEnvironment::DayOfMonth;
Expand Down Expand Up @@ -214,6 +216,7 @@ namespace RuntimeLanguageProcessor {
CurrentEnvironmentPeriodNum = NewEMSVariable( "CURRENTENVIRONMENT", 0 );
ActualDateAndTimeNum = NewEMSVariable( "ACTUALDATEANDTIME", 0 );
ActualTimeNum = NewEMSVariable( "ACTUALTIME", 0 );
WarmUpFlagNum = NewEMSVariable( "WARMUPFLAG", 0);

GetRuntimeLanguageUserInput(); // Load and parse all runtime language objects

Expand Down Expand Up @@ -268,6 +271,11 @@ namespace RuntimeLanguageProcessor {

tmpCurEnvirNum = double( CurEnvirNum );
ErlVariable( CurrentEnvironmentPeriodNum ).Value = SetErlValueNumber( tmpCurEnvirNum );
if ( WarmupFlag ) {
ErlVariable( WarmUpFlagNum ).Value = SetErlValueNumber( 1.0 );
} else {
ErlVariable( WarmUpFlagNum ).Value = SetErlValueNumber( 0.0 );
}

}

Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/RuntimeLanguageProcessor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ namespace RuntimeLanguageProcessor {
extern int CurrentEnvironmentPeriodNum;
extern int ActualDateAndTimeNum;
extern int ActualTimeNum;
extern int WarmUpFlagNum;

// SUBROUTINE SPECIFICATIONS:

Expand Down

7 comments on commit 54e3769

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (JasonGlazer) - x86_64-MacOS-10.9-clang: OK (1119 of 1119 tests passed)

Build Badge Test 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.

develop (JasonGlazer) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (1122 of 1122 tests passed)

Build Badge Test 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.

develop (JasonGlazer) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

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

develop (JasonGlazer) - Win64-Windows-7-VisualStudio-12: OK (1122 of 1122 tests passed)

Build Badge Test 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.

develop (JasonGlazer) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (622 of 622 tests passed)

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.

develop (JasonGlazer) - i386-Windows-7-VisualStudio-12: OK (1122 of 1122 tests passed)

Build Badge Test 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.

develop (JasonGlazer) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1122 of 1122 tests passed)

Build Badge Test Badge Coverage Badge

Please sign in to comment.