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

vlle's profile - activity

2019-09-17 07:55:48 -0500 marked best answer Assign building unit to spaces?

Hello, Could some one can tell me how can I assign the building unit to the spaces using ruby scripts. I tried to do something as follows, but it doesn't work

class AssignBuildingUnitToSpaces < OpenStudio::Ruleset::ModelUserScript

  def name
    return 'Assign building unit to spaces based on spaces name'
  end

  def arguments(model)
    args = OpenStudio::Ruleset::OSArgumentVector.new
    return args
  end

  def run(model, runner, user_arguments)
    super(model, runner, user_arguments)

    if !runner.validateUserArguments(arguments(model), user_arguments)
      return false
    end

    spaces = model.getSpaces

    unit = OpenStudio::Model::BuildingUnit.new(model)
    unit.setBuildingUnitType("Residential")
    spaces.each do |space|
      space_name  = [] # space name as a list
      if space.name.to_s.include? '_'
          space_name = space.name.to_s.split('_') # split space name
      else
          space_name[0] = space.name.to_s
      end

      if ["A","B","C","D","M"].any? {|prefix| space_name[0].include? prefix}
        if space.buildingUnit.empty? || !space.buildingUnit.get.name.to_s.include?(space_name[0])
            unit.setName(space_name[0])
            space.setBuildingUnit(unit)            
        end          
      end      
    end

    return true
  end
end

AssignBuildingUnitToSpaces.new.registerWithApplication

I am a very newbie in using OpenStudio and Openstudio SDK.

Thanks

Long

2019-09-17 07:24:24 -0500 marked best answer Question about NoIDDFieldsError when using eppy

Hello,

When using eppy to run energyplus model, I got the following error. Could anyone tell how to resolve this please? I am using EnergyPlus 9.1.0 and eppy 0.5.51. Indeed, the model was successfully run using EP-Launch.

eppy.idfreader.NoIDDFieldsError: idfobject with key 'WINDOWSHADINGCONTROL' & first field 'Shading Control 1' has 169 fields while the idd for 'WINDOWSHADINGCONTROL' has only 26 fields. Add the following fields to the object 'WINDOWSHADINGCONTROL' in file Energy+.idd 'A24, A25, A26, A27, A28, A29, A30, A31, A32, A33, A34, A35, A36, A37, A38, A39, A40, A41, A42, A43, A44, A45, A46, A47, A48, A49, A50, A51, A52, A53, A54, A55, A56, A57, A58, A59, A60, A61, A62, A63, A64, A65, A66, A67, A68, A69, A70, A71, A72, A73, A74, A75, A76, A77, A78, A79, A80, A81, A82, A83, A84, A85, A86, A87, A88, A89, A90, A91, A92, A93, A94, A95, A96, A97, A98, A99, A100, A101, A102, A103, A104, A105, A106, A107, A108, A109, A110, A111, A112, A113, A114, A115, A116, A117, A118, A119, A120, A121, A122, A123, A124, A125, A126, A127, A128, A129, A130, A131, A132, A133, A134, A135, A136, A137, A138, A139, A140, A141, A142, A143, A144, A145, A146, A147, A148, A149, A150, A151, A152, A153, A154, A155, A156, A157, A158, A159, A160, A161, A162, A163, A164, A165, A166;'

Thanks in advance!

Long

2019-09-17 07:23:49 -0500 marked best answer Errors for building EnergyPlus from source

Hello,

I was trying to build EnergyPlus (V9-1-0) on Red Hat Enterprise Linux Server release 6.5, on which I built successfully EnergyPlus V8-7-0, and I got the following errors. I used gcc 5.5.0 and, cmake 3.14.5 and python 2.7.5.

In file included from /.../.../.../.../.../EnergyPlus/third_party/eigen/Eigen/SparseCore:40:0,
             from /.../.../.../.../.../EnergyPlus/third_party/kiva-ep/src/libkiva/Cell.hpp:18,
             from /.../.../.../.../.../EnergyPlus/third_party/kiva-ep/src/libkiva/Domain.hpp:7,
             from /.../.../.../.../.../EnergyPlus/third_party/kiva-ep/src/libkiva/Ground.hpp:9,
             from /.../.../.../.../.../EnergyPlus/third_party/kiva-ep/src/libkiva/Aggregator.hpp:7,
             from /.../.../.../.../.../EnergyPlus/src/EnergyPlus/HeatBalanceKivaManager.hh:52,
             from /.../.../.../.../.../EnergyPlus/src/EnergyPlus/SurfaceGeometry.hh:59,
             from /.../.../.../.../.../EnergyPlus/src/EnergyPlus/ConvectionCoefficients.cc:79:
/.../.../.../.../.../EnergyPlus/third_party/eigen/Eigen/src/SparseCore/AmbiVector.h: In member function ‘_Scalar& Eigen::internal::AmbiVector<_Scalar, _StorageIndex>::coeff(Eigen::Index)’:
/.../.../.../.../.../EnergyPlus/third_party/eigen/Eigen/src/SparseCore/AmbiVector.h:270:44: error: parse error in 
template argument list
   while (elid >= 0 && llElements[elid].index<i)                                            ^
[ 51%] Building CXX object src/EnergyPlus/CMakeFiles/energypluslib.dir/DataAirSystems.cc.o
[ 51%] Building CXX object src/EnergyPlus/CMakeFiles/energypluslib.dir/DataBSDFWindow.cc.o
make[2]: *** [src/EnergyPlus/CMakeFiles/energypluslib.dir/ConvectionCoefficients.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/EnergyPlus/CMakeFiles/energypluslib.dir/all] Error 2
make: *** [all] Error 2

Does someone have any idea for these problem and know how to solve these problems please?

Thanks

Long

2019-09-17 07:23:49 -0500 received badge  Scholar (source)
2019-09-14 03:03:46 -0500 answered a question EMS for ERV bypass (free-cooling) control

It seems that I can control the bypass using a Constant:Schedule erv_bypass_stp = 24.0 erv_unit = eqpt.to_ZoneHVACEnerg

2019-09-13 06:55:15 -0500 received badge  Supporter (source)
2019-09-12 02:12:35 -0500 commented question Errors for building EnergyPlus from source

Hello, Thanks both for your comment and suggestion. Yes it seems to work with a higher version of gcc. I still have had

2019-09-10 15:11:28 -0500 asked a question EMS for ERV bypass (free-cooling) control

EMS for ERV bypass (free-cooling) control Hello, I was trying to model a controlled mechanical ventilation with heat re

2019-09-10 04:48:38 -0500 asked a question Errors for building EnergyPlus from source

Errors for building EnergyPlus from source Hello, I was trying to build EnergyPlus (V9-1-0) on Red Hat Enterprise Linux

2019-09-09 04:40:54 -0500 asked a question Error for using btap equest converter

Error for using btap equest converter Hello, when using btap_equest_converter to covert an INP file to OSM, I got the f

2019-09-05 04:44:07 -0500 commented answer eQuest Geometry to EnergyPlus

Hello, I got this error for using btap_equest_converter to covert an INP file to OSM: Standard Output: [10:46:46.71535

2019-08-12 09:51:44 -0500 answered a question Question about NoIDDFieldsError when using eppy

I found the solution by adding missing fields to Energy+.idd file as mentioned here

2019-08-12 04:56:53 -0500 asked a question Question about NoIDDFieldsError when using eppy

Question about NoIDDFieldsError when using eppy Hello, When using eppy to run energyplus model, I got the following er

2019-07-15 02:54:47 -0500 received badge  Teacher (source)
2019-07-15 02:14:29 -0500 answered a question Assign building unit to spaces?

As requested by @Luis Lara: I have a residential multifamily building whose spaces are named as A01_Living, A01_Bed1, B0

2019-07-11 01:29:53 -0500 commented question Assign building unit to spaces?

Hi shorowit, you are right. There was a problem of the indentation in the code. Thanks a lot.

2019-07-09 08:24:05 -0500 commented question Assign building unit to spaces?

Hi shorowit, you are right. There was a problem of the indentation in the code. And, can you tell me if different spac

2019-07-08 23:40:37 -0500 commented question Assign building unit to spaces?

Hi shorowit, you are right. There was a problem of the indentation in the code. Thanks a lot.

2019-07-06 03:09:10 -0500 commented question Assign building unit to spaces?

Hi Luis, please see my updated question above. Thanks

2019-07-06 03:07:46 -0500 edited question Assign building unit to spaces?

Assign building unit to spaces? Hello, Could some one can tell me how can I assign the building unit to the spaces usin

2019-07-05 13:43:50 -0500 received badge  Student (source)
2019-07-05 09:20:48 -0500 commented answer BEopt to OpenStudio measures

Hi, I realized that https://github.com/NREL/OpenStudio-BEopt/ repo is no longer available. Is it just temporarily or def

2019-07-05 09:20:46 -0500 asked a question Assign building unit to spaces?

Assign building unit to spaces? Hello, Could some one can tell me how can I assign the building unit to the spaces usin