NREL / alfalfa

Alfalfa is a web service that enables runtime interaction with building energy models (OpenStudio/EnergyPlus and FMUs compiled from Modelica or Spawn) over REST APIs.
Other
42 stars 13 forks source link

Alfalfa setpoint control does not allow number in the schedule name #462

Closed Kang-SungKu closed 1 year ago

Kang-SungKu commented 1 year ago

I am using Alfalfa 0.5.1, and it seems like alfalfa_setpoint_control does not allow number in the schedule name, even when the schedule name does not start with a number. I would like to report it, in case it is not known yet.

Symptom

Suppose the building model (idf file) contains the following ZoneControl:Thermostat, ThermostatSetpoint:DualSetpoint, and associated Schedule:Compact.

  ZoneControl:Thermostat,
    Core_ZN Thermostat,      !- Name
    Core_ZN,                 !- Zone or ZoneList Name
    Dual Zone Control Type Sched,  !- Control Type Schedule Name
    ThermostatSetpoint:DualSetpoint,  !- Control 1 Object Type
    Core_ZN DualSPSched;     !- Control 1 Name

  ZoneControl:Thermostat,
    Perimeter_ZN_1 Thermostat,  !- Name
    Perimeter_ZN_1,          !- Zone or ZoneList Name
    Dual Zone Control Type Sched,  !- Control Type Schedule Name
    ThermostatSetpoint:DualSetpoint,  !- Control 1 Object Type
    Perimeter_ZN_1 DualSPSched;  !- Control 1 Name

  ThermostatSetpoint:DualSetpoint,
    Core_ZN DualSPSched,     !- Name
    HTGSETP_SCH_ZN_CORE,  !- Heating Setpoint Temperature Schedule Name
    CLGSETP_SCH_ZN_CORE;  !- Cooling Setpoint Temperature Schedule Name

  ThermostatSetpoint:DualSetpoint,
    Perimeter_ZN_1 DualSPSched,  !- Name
    HTGSETP_SCH_ZN_1,  !- Heating Setpoint Temperature Schedule Name
    CLGSETP_SCH_ZN_1;  !- Cooling Setpoint Temperature Schedule Name

  Schedule:Compact,
    HTGSETP_SCH_ZN_CORE,  !- Name
    Temperature,             !- Schedule Type Limits Name
    Through: 12/31,          !- Field 1
    For: AllDays,            !- Field 2
    Until: 24:00,            !- Field 3
    21.667;     

  Schedule:Compact,
    HTGSETP_SCH_ZN_1,  !- Name
    Temperature,             !- Schedule Type Limits Name
    Through: 12/31,          !- Field 1
    For: AllDays,            !- Field 2
    Until: 24:00,            !- Field 3
    21.667; 

When the building model is submitted to Alfalfa, the actuators/EMS programs associated with the schedules HTGSETP_SCH_ZN_CORE and HTGSETP_SCH_ZN_1 are supposed to be created by alfalfa_setpoint_control. However, alfalfa_worker terminates when it creates the actuators/EMS programs for HTGSETP_SCH_ZN_1. Here is a part of log from alfalfa_worker containing the error message:

2023-08-10 13:39:45 Program Version,EnergyPlus, Version 9.6.0-e78d88a246, YMD=2023.08.10 17:37,
2023-08-10 13:39:45    ** Warning ** Sizing:Parameters: note Timesteps in Averaging Window entered value=[6] is less than 1 hour (i.e., 60 timesteps).
2023-08-10 13:39:45    ************* Beginning Zone Sizing Calculations
2023-08-10 13:39:45    ** Warning ** CheckUsedConstructions: There are 23 nominally unused constructions in input.
2023-08-10 13:39:45    **   ~~~   ** For explicit details on each unused construction, use Output:Diagnostics,DisplayExtraWarnings;
2023-08-10 13:39:45    ** Severe  ** EMS ParseExpression: Entity=__HTGSETP_SCH_ZN_1_SETPOINT_PROGRAM
2023-08-10 13:39:45    **   ~~~   ** ...Line=IF __HTGSETP_SCH_ZN_1_SETPOINT_ENABLE
2023-08-10 13:39:45    **   ~~~   ** ...Failed to process String="__HTGSETP_SCH_ZN_1_SETPOINT_ENABLE".
2023-08-10 13:39:45    **  Fatal  ** ...program terminates due to preceding condition.
2023-08-10 13:39:45    ...Summary of Errors that led to program termination:
2023-08-10 13:39:45    ..... Reference severe error count=1
2023-08-10 13:39:45    ..... Last severe error=EMS ParseExpression: Entity=__HTGSETP_SCH_ZN_1_SETPOINT_PROGRAM
2023-08-10 13:39:45    ************* Warning:  Node connection errors not checked - most system input has not been read (see previous warning).
2023-08-10 13:39:45    ************* Fatal error -- final processing.  Program exited before simulations began.  See previous error messages.
2023-08-10 13:39:45    *************
2023-08-10 13:39:45    ************* ===== Final Error Summary =====
2023-08-10 13:39:45    ************* The following error categories occurred.  Consider correcting or noting.
2023-08-10 13:39:45    ************* Nominally Unused Constructions
2023-08-10 13:39:45    ************* ..The nominally unused constructions warning is provided to alert you to potential conditions that can cause
2023-08-10 13:39:45    ************* ..extra time during simulation. Each construction is calculated by the algorithm indicated in the HeatBalanceAlgorithm
2023-08-10 13:39:45    ************* ..object. You may remove the constructions indicated (when you use the DisplayExtraWarnings option).
2023-08-10 13:39:45    *************
2023-08-10 13:39:45    ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
2023-08-10 13:39:45    ************* EnergyPlus Sizing Error Summary. During Sizing: 2 Warning; 1 Severe Errors.
2023-08-10 13:39:45    ************* EnergyPlus Terminated--Fatal Error Detected. 2 Warning; 1 Severe Errors; Elapsed Time=00hr 00min  0.21sec

Workaround

The error is gone when I remove the number in the name (for example, changing the name from HTGSETP_SCH_ZN_1 to HTGSETP_SCH_ZN_ONE).

TShapinsky commented 1 year ago

Hi @Kang-SungKu I think this bug should be fixed with the current release (0.6.0). Let me know if the issue persists.

Kang-SungKu commented 1 year ago

I confirmed that the issue is fixed with the latest update. Thanks!