EMS Simulation Initialization Error

asked 2024-11-29 08:58:01 -0600

AvgStudent's avatar

(Resubmitting because of update errors) Hi, I am writing a Ruby measure for OpenStudio and I'm encountering an error with my EMS programs.

My measure seeks to implement and control a Coil:UserDefined component (my_coil) into an AirLoopHVAC and contains two EMS programs: an initialization program (initprogram) and a simulation program(simprogram).

The initprogram has been implemented into my component model using the following command:

my_coil.setInitializationSimulationProgram(initprogram)

Similarly, the simprogram has been implemented into the component model with the command:

my_coil.setOverallSimulationProgram(simprogram)

Two EMSProgramCallingManagers were also created (one for each program) and the programs were linked to them with the command .addProgram([program]). These EMSProgramCallingManagers both use the calling point ''UserDefinedComponentModel''.

Then, the EMSProgramCallingManagers were finally referenced into the user-defined component using the following commands:

my_coil.setOverallModelSimulationProgramCallingManager(simpcm)
my_coil.setModelSetupandSizingProgramCallingManager(initpcm)

When running the simulation in OpenStudio, I get the following error:

** Severe  ** <root>[EnergyManagementSystem:Program][initializationSimulationProgram] - Missing required property 'lines'.

However, when looking at the .idf file, the user-defined component model, the EMS programs and the EMSProgramCallingManagers are all referenced adequately.

Due to NDAs, I cannot share the entirety of the OSM or IDF file. However, I can show the relevant parts of the IDF code. In the following Dropbox, a text file contains snippets from the IDF defining the AirLoopHVAC along with the user-defined coil and the related EMS programs and calling managers. The system contains a single air loop consisting of a variable-speed fan, the user-defined coil, and an electric heating coil. For testing purposes, the air loop supplies a single zone.

Could the redundancy of the model references in both the model object and the EMSPCM cause this error? If so, should I reference the EMS programs only in the User-defined component model or should the object model refer to the calling managers which in turn should refer to the EMS programs?

Thanks.

edit retag flag offensive close merge delete