Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Alec's profile - activity

2017-04-24 08:56:43 -0500 marked best answer Measure Test File Not Working with OS 2.1.0

I had measure test files working with 1.14, but then upgraded to 2.1.0 and can't seem to get them to work. I was using the Ruby instance packaged with OS before, but was unable to find the Ruby install with OS 2.1.0. I have installed Ruby 2.2.6 (32-bit) and set up the environment according to the Measure Writing Guide (required the full path to the openstudio.rb file in the measure test file). When I try to run the test file, it gives me the following error:

C:/openstudio-2.1.0/Ruby/openstudio.rb:55:in `require_relative': 193: %1 is not a valid Win32 application. - C:/openstudio-2.1.0/Ruby/openstudio.so (LoadError)

I suspect it could be an issue with the Ruby version or my Path not correctly pointing to OS, but I'm not sure. Any suggestions?

Update: I installed the 64-bit version of Ruby 2.2.6, which seems to have solved the problem above; however, now the measure does not seem to run from the test file and doesn't provide any error. I get the following output:

Run options: --seed 13881

Running:

Finished in 0.000000s, NaN runs/s, NaN assertions/s.

0 runs, 0 assertions, 0 failures, 0 errors, 0 skips

2017-04-24 08:56:41 -0500 commented answer Measure Test File Not Working with OS 2.1.0

I added the RUBYLIB environment variable, but the test still did not complete successfully. I do have tests defined in t

2017-04-21 10:56:01 -0500 commented question Measure Test File Not Working with OS 2.1.0

I switched my path to use the Ruby bundled with OS 2.1.0, which I found in the PAT folder. I verified that I'm now using

2017-04-20 15:49:14 -0500 edited question Measure Test File Not Working with OS 2.1.0

Measure Test File Not Working with OS 2.1.0 I had measure test files working with 1.14, but then upgraded to 2.1.0 and c

2017-04-20 15:16:17 -0500 asked a question Measure Test File Not Working with OS 2.1.0

Measure Test File Not Working with OS 2.1.0 I had measure test files working with 1.14, but then upgraded to 2.1.0 and c

2015-09-17 14:40:12 -0500 commented answer Adding Setpoint Manager for Air to Air Heat Exchanger

Thank you for all of your input! Calling primaryAirOutletModelObject worked great, and that is good information on OS taking care of the SPM for you.

2015-09-14 12:02:56 -0500 asked a question Adding Setpoint Manager for Air to Air Heat Exchanger

I'm tying to write an OpenStudio measure to add a HeatExchangerAirToAirSensibleAndLatent object to an outdoor air system attached to a unitary system on an air loop. The engineering reference for the heat exchanger indicates that I need to add a SetpointManagerScheduled on the unit’s supply air outlet node. I'm having trouble writing the code to place the setpoint manager on the correct node as there doesn't seem to be a method to identify the proper node. I'm looking for suggestions on how to find this node in the measure. Also, any advice on creating the schedule for this setpoint manager would be appreciated.

Here is the air loop as it stands currently:

image description

2015-09-03 07:10:17 -0500 received badge  Supporter (source)
2015-09-02 14:04:49 -0500 asked a question Measure to Replace Standard Motor with Electronically Commutated Motor in Fan Coil

I am writing a measure to replace the standard motor in a fan coil unit with an electronically commutated motor (ECM) and am looking for suggestions on the best way to model this. The standard motor is of type openstudio::model::FanOnOff in an openstudio::model::ZoneHVACFourPipeFanCoil object. My first thought was to change the fan to openstudio::model::FanVariableVolume and increase the motor efficiency, but I'm not sure this is the best way to model it. Alternatively, I considered just increasing the motor efficiency of the openstudio::model::FanOnOff object. What is the best way to model an ECM?

2015-08-11 14:29:43 -0500 commented answer Using Math Functions in Ruby Scripts

It looks like this did it. Thank you.

2015-08-11 14:29:14 -0500 received badge  Scholar (source)
2015-08-11 14:14:22 -0500 asked a question Using Math Functions in Ruby Scripts

I am looking to calculate a square root in a measure I'm writing, but the math.sqrt() method does not work. Is there a way to include Ruby's Math module when writing measures or is there another way to use the higher level math functions?

2015-08-11 10:14:59 -0500 commented answer Measure to change the Design Flow Rate Calculation Method in OpenStudio

David, thank you for your reply. I was setting all other design flow rates to 0.0, but was doing it after I set the Air Changes per Hour to the new value. When I changed the order of operation to set the other flow rates to 0.0 before changing the Air Changes per Hour, it worked. I'm guessing the order matters because it wouldn't allow me to change the Air Change per Hour until I zeroed out the other values and OS changed the calculation method automatically.

2015-08-11 09:44:55 -0500 received badge  Student (source)
2015-08-11 09:26:37 -0500 asked a question Measure to change the Design Flow Rate Calculation Method in OpenStudio

I am trying to write an OS measure to change the Air Changes/Hour for all spaces within a space type to a set value. The measure works as long as the Design Flow Rate Calculation Method is set to "AirChanges/Hour"; however, it does not work if the calculation method is set to a different value. I want the measure to first set the Design Flow Rate Calculation Method to "AirChanges/Hour" for the space type before attempting to set the value, but I can't figure out how to do this using the measure writing guide and SDK Documentation. There appears to be methods to return the Design Flow Rate Calculation Method, but not to set it. I have found an EnergyPlus measure that changes the calculation method, but I want to execute the measure in OS. What code can I use in a measure to set the Design Flow Rate Calculation Method for a space type in OS?