lib/openstudio-standards/btap/fileio.rb in openstudio-standards-0.2.17.rc1 vs lib/openstudio-standards/btap/fileio.rb in openstudio-standards-0.2.17.rc2

- old
+ new

@@ -96,11 +96,11 @@ return url_string end end - # This method loads an Openstudio file into the model. + # This method loads an OpenStudio file into the model. # @author Phylroy A. Lopez # @param filepath [String] path to the OSM file. # @param name [String] optional model name to be set to model. # @return [OpenStudio::Model::Model] an OpenStudio model object. def self.load_idf(filepath, name = "") @@ -161,11 +161,11 @@ - # This method loads an Openstudio file into the model. + # This method loads an OpenStudio file into the model. # @author Phylroy A. Lopez # @param filepath [String] path to the OSM file. # @param name [String] optional model name to be set to model. # @return [OpenStudio::Model::Model] an OpenStudio model object. def self.load_osm(filepath, name = "") @@ -845,11 +845,11 @@ end # This method converts an idf object to a hash # # @author Padmassun Rajakareyar - # @param obj [Openstudio::ModelObject] + # @param obj [OpenStudio::ModelObject] # @return new_obj_hash [Hash] idf object converted to hash. # @example # Converts the following IDF (openstudio::ModelObject) to # ================================================================== # OS:Material, @@ -897,11 +897,11 @@ end # This method uses idf_to_h(obj) method, but deletes the fields named 'Handle' and 'Name' # # @author Padmassun Rajakareyar - # @param obj [Openstudio::ModelObject] + # @param obj [OpenStudio::ModelObject] # @return new_obj_hash [Hash] idf object converted to hash. # @example # Converts the following IDF (openstudio::ModelObject) to # ================================================================== # OS:Material, @@ -1015,13 +1015,13 @@ # Replace the UUID of the duplicate material, unless it contains ", !- Handle" # This is done so after the model has been written to the disk, It can be read and # the duplicate materials can be removed safely. # # @author Padmassun Rajakareyar - # @param model [Openstudio::Model] + # @param model [OpenStudio::Model] # @param grouped_objs [Hash] Output provided by group_similar_objects() - # @return model_string [String] An Openstudio::Model object converted to a string + # @return model_string [String] An OpenStudio::Model object converted to a string def self.replace_duplicate_obj_handles(model, grouped_objs) model_string = model.to_s # convert the OS:Model into a String grouped_objs.each {|key, dup_array| dup_array.each_with_index {|idf_hash, index | next if index == 0 # skipping index 0, because it has the shortest name and considered as the original @@ -1048,12 +1048,12 @@ # This method gets the model string, writes it in a temporary location, reads it, and # converts it to an OpenStudio Model using a VersionTranslater # # @author Padmassun Rajakareyar - # @param model_string [String] An Openstudio::Model object converted to a string - # @return model [Openstudio::Model] + # @param model_string [String] An OpenStudio::Model object converted to a string + # @return model [OpenStudio::Model] def self.get_OS_Model_from_string(model_string) require 'securerandom' require 'fileutils' # make temerorary directory called `temp` to store the osm file FileUtils.mkdir_p(File.join('.', 'temp')) @@ -1074,13 +1074,13 @@ # Eleminates duplicate ModelObjects of the given ModelObject type, # based on the values of each fields within the ModelObject # # @author Padmassun Rajakareyar - # @param model [Openstudio::Model] + # @param model [OpenStudio::Model] # @param model_obj_type [String] ModelObject type e.g. "OS:Material" - # @return new_model [Openstudio::Model] Returns new model (OS:Model) if the changes were made. + # @return new_model [OpenStudio::Model] Returns new model (OS:Model) if the changes were made. # or else returns the old model if no changes were made. def self.eleminate_duplicate_objs(model, model_obj_type) # = "OS:Material") model_objs_json = {} # convert each of the ModelObjectas a hash for easy parsing @@ -1153,11 +1153,11 @@ # "OS:DefaultSubSurfaceConstructions" # "OS:DefaultConstructionSet" # "OS:StandardsInformation:Construction" # # @author Padmassun Rajakareyar - # @param model [Openstudio::Model] - # @return new_model [Openstudio::Model] Returns new model after removing the + # @param model [OpenStudio::Model] + # @return new_model [OpenStudio::Model] Returns new model after removing the # duplicate ModelObjects atated abioe. def self.remove_duplicate_materials_and_constructions(model) old_number_of_objects = model.getModelObjects.length new_model = model # eleminate dplicate Material objects \ No newline at end of file