diff --git a/bpeng/ecm/led_savings.py b/bpeng/ecm/led_savings.py new file mode 100644 index 0000000000000000000000000000000000000000..546447fd02275bad50928ffbf781bc67a22e21b7 --- /dev/null +++ b/bpeng/ecm/led_savings.py @@ -0,0 +1,90 @@ +"""functions to calculate savings from Lighting Replacements by LEDs""" + + +# when we do not have any on site information +print('Replacing your lights with LEDs can bring upto 80% cost savings') + + +# when we have information about the "type" of existing lights +# Direct % Cost Savings based on Wattage Equivalence""" +INCANDESCENT_LED = 80 +HALOGEN_LED = 73.5 +CFL_LED = 20 + + +def cost_savings_type(): + """Function to give direct cost savings for replacement based on wattage equivalence""" + light_type = input('Enter the type of exisiting lights(Incandescent/Halogen/CFL)') + if light_type == "Incandescent": + print('Replacing your lights with LEDs can bring upto', INCANDESCENT_LED, '% cost savings') + elif light_type == "Halogen": + print('Replacing your lights with LEDs can bring upto', HALOGEN_LED, '% cost savings') + elif light_type == "CFL": + print('Replacing your lights with LEDs can bring upto', CFL_LED, '% cost savings') + else: + print('Replacing your lights with LEDs can bring upto 80% cost savings') + + +# Average Lifespan of different types of lights in hours +# INCANDESCENT = 1250 +# HALOGEN = 1250 +# METAL_HALIDE = 6000 +# CFL = 10000 +# LED = 50000 + + +# LED equivalent Wattage for Incandescents of same LUMENS +# 100 = 20 # Watts +# 75 = 14 # Watts +# 60 = 12 # Watts +# 40 = 8 # Watts + + +# Default values +# ELECTRICITY_RATE_NY = 0.19 # $/kwh +# ELECTRICITY_RATE_US_AVG = 0.12 # $/kwh +# EXISTING_LIGHT = "Incandescent" +# EXISTING_LIGHT_WATTS = 60 # Watts +# REPLACEMENT_LED_WATTS = 12 # Watts +# USAGE_HOURS_ANNUAL = 8760 # Hours +# UNIT_COST_LED = 5 # Dollars +# UNIT_COST_INCANDESCENT = 1 # Dollars + + +def energy_savings(watts=60, watts_led=12, number_lights=1, usage_hours=24, usage_days=7): + """ function to calculate annual energy savings""" + usage = usage_days * usage_hours * number_lights * 52 + usage_current = watts * usage + usage_led = watts_led * usage + annual_energy_savings = (usage_current - usage_led) * 100 / usage_current + return annual_energy_savings + + +def cost_savings(watts=60, watts_led=12, number_lights=1, usage_hours=24, usage_days=7): + """ function to calculate annual cost savings""" + electricity_rate = input('enter the electricity rate in $/kwh') + if electricity_rate == ' ': + electricity_rate = 19 + usage = usage_days * usage_hours * 52 + replacements_current = round(usage / 1200) + replacements_led = round(usage / 50000) + if replacements_led < 1: + replacements_led = 1 + else: + replacements_led = replacements_led + cost_per_unit_current = input('enter cost per unit of existing lights') + if cost_per_unit_current == ' ': + cost_per_unit_current = 1 + replacement_cost_currrent = replacements_current * cost_per_unit_current * number_lights + lighting_costs_current = (watts * usage * number_lights * electricity_rate) + replacement_cost_currrent + cost_per_unit_led = input('enter cost per unit of replacement LED lights') + if cost_per_unit_led == ' ': + cost_per_unit_led = 5 + replacement_cost_led = replacements_led * cost_per_unit_led * number_lights + lighting_costs_led = (watts_led * usage * number_lights * electricity_rate) + replacement_cost_led + annual_cost_savings = (lighting_costs_current - lighting_costs_led) * 100 / lighting_costs_current + return annual_cost_savings + + + +