Sha256: 37e9410c9c4cd5aca720117ce57c77b7f7660c9232cba4976ac622e601acd553
Contents?: true
Size: 986 Bytes
Versions: 8
Compression:
Stored size: 986 Bytes
Contents
ClothesMachineUse.class_eval do data_miner do process "Ensure ResidentialEnergyConsumptionSurveyResponse is populated" do ResidentialEnergyConsumptionSurveyResponse.run_data_miner! end process "Derive from ResidentialEnergyConsumptionSurveyResponse" do ::Earth::Utils.insert_ignore( :src => ResidentialEnergyConsumptionSurveyResponse, :dest => ClothesMachineUse, :cols => { :clothes_washer_use => :name } ) end # sabshere 5/20/10 weird that this uses cohort process "precalculate annual energy use" do find_each do |record| record.annual_energy_from_electricity_for_clothes_driers = ResidentialEnergyConsumptionSurveyResponse.big_cohort(:clothes_machine_use_id => record.name).weighted_average :annual_energy_from_electricity_for_clothes_driers record.annual_energy_from_electricity_for_clothes_driers_units = 'joules' record.save! end end end end
Version data entries
8 entries across 8 versions & 1 rubygems