# Hourly changes in simulation conditions using EMS using .csv values

I have been trying to bring in hourly changes in simulation conditions that take values from a .csv file and convert them to the values take by the EMS sensor. This I am trying to implement on 2 aspects: 1. The construction (in order to change the aspects of SHGC and Visible Transmittance values of a Simple Glazing unit), for which I'm creating 7 states which are defined in the code and trying to choose the appropriate construction based on the corresponding value in .csv file. 2. The LPD of artificial lighting by choosing the appropriate value for the hour from the .csv file.

The end-result that I'm trying to acheve is similar to the question asked in https://unmethours.com/question/47169... , but I faced difficulty in implementing it which is why I have posted as a separate question. Kindly help me out. The input .csv files that I want to use are attached here

I'm attaching the code that I had tried, but it doesn't seem to be working. Since I'm a beginner in Measure Writing, I have tried to combine snippets from the following codes:

1. M13Example13SurfaceConstructionActuatorForThermochromaticWindow: https://github.com/NREL/OpenStudio-EM...
2. Set Lighting Loads by LPD: https://bcl.nrel.gov/node/84704
3. Replace Exterior Window Constructions with a Different Construction from the Model: https://bcl.nrel.gov/node/84690
4. Add Interval Schedule From File: https://bcl.nrel.gov/node/84422

My Code is available here

### Error Message

Standard Output: [16:24:03.525129 ERROR] uninitialized constant DynamicWindowGlazing::SimpleGlazing eval:355:in const_missing' C:/Users/nycta/OpenStudio/Measures/dynamic_window_glazing/measure.rb:264:inblock in run' C:/Users/nycta/OpenStudio/Measures/dynamic_window_glazing/measure.rb:252:in each' C:/Users/nycta/OpenStudio/Measures/dynamic_window_glazing/measure.rb:252:inrun' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/util/measure.rb:515:in apply_measure' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/util/measure.rb:114:inblock in apply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/util/measure.rb:67:in each_index' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/util/measure.rb:67:inapply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/jobs/run_os_measures.rb:70:in perform' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/run.rb:292:instep' :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/run.rb:234:in run' :/openstudio_cli.rb:963:inexecute' :/openstudio_cli.rb:753:in execute' :/openstudio_cli.rb:1747:in' eval:175:in eval' eval:175:inrequire_embedded_absolute' eval:160:in block in require_embedded' eval:154:ineach' eval:154:in require_embedded' eval:113:inrequire' eval:3:in ' [16:24:03.527430 ERROR] :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/util/measure.rb failed with message Runner error :/ruby/2.5.0/gems/openstudio-workflow-2.1.0/lib/openstudio/workflow/util/measure.rb failed with uninitialized constant DynamicWindowGlazing ...

edit retag close merge delete