Measures/m_5_example_5_computed_schedule/resources/util.rb
# Facilitates creating and assigning an OpenStudio construction (with accompanying 
# OpenStudio Materials) from Material objects. Handles parallel paths as well.
Facilitates creating and assigning an OpenStudio construction (with accompanying
OpenStudio Materials) from Material objects. Handles parallel paths as well.
Facilitates creating and assigning an OpenStudio construction ( with accompanying OpenStudio Materials ) from Material objects . Handles parallel paths as well .
def construct_materials(model, runner)
            materials = []
            @layers_materials.each_with_index do |layer_materials,layer_num|
                next if not @layers_includes[layer_num]
                if layer_materials.size == 1
                    if not @layers_names[layer_num].nil?
                        mat_name = @layers_names[layer_num]
                    else
                        mat_name = layer_materials[0].name
                    end
                    mat = create_os_material(model, runner, layer_materials[0], mat_name)
                else
                    parallel_path_mat = get_parallel_material(layer_num, runner)
                    mat = create_os_material(model, runner, parallel_path_mat)
                end
                materials << mat
            end
            return materials
        end
def construct_materials ( model , runner ) materials = [ ] @layers_materials . each_with_index do | layer_materials , layer_num | next if not @layers_includes [ layer_num ] if layer_materials . size == 1 if not @layers_names [ layer_num ] . nil? mat_name = @layers_names [ layer_num ] else mat_name = layer_materials [ 0 ] . name end mat = create_os_material ( model , runner , layer_materials [ 0 ] , mat_name ) else parallel_path_mat = get_parallel_material ( layer_num , runner ) mat = create_os_material ( model , runner , parallel_path_mat ) end materials << mat end return materials end
Facilitates creating and assigning an OpenStudio construction (with accompanying
OpenStudio Materials) from Material objects.
Facilitates creating and assigning an OpenStudio construction ( with accompanying OpenStudio Materials ) from Material objects .
# Create materials
model
<not_specific>
runner
<not_specific>