lib/openstudio/analysis/translator/excel.rb in openstudio-analysis-0.1.11 vs lib/openstudio/analysis/translator/excel.rb in openstudio-analysis-0.1.12

- old
+ new

@@ -593,20 +593,23 @@ rows.each do |row| icnt += 1 # puts "Parsing line: #{icnt}" next if icnt <= 3 # skip the first 3 lines of the file - variable_index += 1 + var = {} var['display_name'] = row[0].strip var['name'] = row[1] var['units'] = row[2] var['objective_function'] = row[3].downcase == "true" ? true : false if var['objective_function'] == true @algorithm['objective_functions'] << var['name'] + variable_index += 1 + var['objective_function_index'] = variable_index + else + var['objective_function_index'] = nil end - var['objective_function_target'] = row[4] - var['objective_function_index'] = variable_index + var['objective_function_target'] = row[4] data['output_variables'] << var end data end