aaem.components.annual_savings package

aaem.components.annual_savings.annual_savings module

annual_savings.py ross spicer created: 2015/09/16

this file is the representation of what is being calculated at the bottom of

each of the spread sheet tabs.

class aaem.components.annual_savings.annual_savings.AnnualSavings[source]

Bases: object

Abstract base class to use as base class for all model components

that have the goal of generating an NPV benefit for the project

Methods

calc_annual_costs(rate, cost_scaler=1.0)[source]

calculate the cost of the project for each year.

pre:
rate should be an interest rate. self.project_life is the # of years project is active for self.capital_costs is the total cost of the project
post:
self.annual_costs will be a numpy array of dollar values

indicating the cost of the project per year.

calc_annual_electric_savings()[source]

abstract function should be implemented by child class to create self.annual_electric_savings as an np.array, length self.project_life, of dollar values(numbers)”

calc_annual_heating_savings()[source]

abstract function should be implemented by child class to create self.annual_heating_savings as an np.array, length self.project_life, of dollar values(numbers)”

calc_annual_net_benefit()[source]

calculate the yearly benefit of the project pre:

annual_total_savings and annual_costs are arrays of the same length

(project life) consisting of dollar values post:

annual_net_benefit is an array of the annual monetary benefit over

projects life time

calc_annual_total_savings()[source]

calculate an array of annual savings values for the project

pre:
self.annual_electric_savings and self.annual_heating_savings

need to be arrays of dollar values. post:

annual_total_savings will be an array of dollar amounts.
calc_capital_costs()[source]

abstract function should be implemented by child class to calculate self.capital_costs (the cost of the project) a dollar value

calc_cost_of_energy(fuel_amount, maintenance=0)[source]

calculates the cost of energy pre:

fuel_amount is a the amount of fuel generated, used or saved
units may vary (i.e. kWh, gal..) per year scaler, list, or np.array
maintenance is the operation and maintenance cost per year as a

scaler, list, or np.array

post:
returns a price in $/[units of fuel_amount]
calc_internal_rate_of_return()[source]

calculate the interal rate of return

calc_levelized_costs(maintenance_costs)[source]

calculate the levelized costs pre:

maintenance_costs is the operation and maintenance cost per year self.get_fuel_total_saved(), and self.get_total_energy_produced (),

must exitst and return numbers representing fuel saved, anenergy produced or a dict with ‘MMBtu’ and ‘kWh’ as keys whose values are numbers post:

self.break_even_cost is the break even cost in $/gal self.levelized_cost_of_energy is the LCOE in $/kWh for
electricity projects, and $/MMBtu for heating projects
for projectes with electricity efficciency and heating efficiency

self.levelized_cost_of_energy is a dictonary wiht ‘MMBtu’ and ‘kWh’ as keys

calc_npv(rate, current_year)[source]

clacualte the NPV net benfit pre:

rate: should be the savings rate self.annual_net_benefit is an array of the annual monetary benefit

over projects life time post:

self.net_npv, self.benefit_npv, slef.cost_npv is a dollar value self.benefit_cost_ratio is a ratio
get_BC_ratio()[source]

return NPV benefit/cost ratio (float)

get_NPV_benefits()[source]

return NPV benefits (float)

get_NPV_costs()[source]

return NPV costs (float)

get_NPV_net_benefit()[source]

return NPV net benefit (float)

get_base_HF_cost()[source]

returns HF cost array (baseline)

get_base_HF_use()[source]

returns HF use array (baseline)

get_base_kWh_cost()[source]

returns kWh cost array (baseline)

get_base_kWh_use()[source]

returns kWh use array (baseline)

get_capital_costs()[source]

return capital costs array

get_diesel_prices()[source]

get the diesel prices

pre:
community name should be in the community data.
post:
self.diesel prices has prices for the project life
get_electric_savings_costs()[source]

returns kWh savings array (base - proposed)

get_electricity_prices()[source]
get_fuel_price()[source]

get the diesel fuel price used

get_heating_savings_costs()[source]

returns HF savings array (base - proposed)

get_nan_range()[source]
gets an array of nan’s for the project life time, the “get”

functions defined here should return a array of nan’s indicating that the value is not applicable to the component. If a “get” should do something else overload it in the component pre:

self.lifetime > 0
post:
returns array of nan’s length self.lifetime
get_net_benefit()[source]

return net benefit array

get_proposed_HF_cost()[source]

returns HF cost array (proposed)

get_proposed_HF_use()[source]

returns HF use array (proposed)

get_proposed_kWh_cost()[source]

returns kWh cost array (proposed)

get_proposed_kWh_use()[source]

returns kWh use array (proposed)

get_total_savings_costs()[source]

returns total savings array

run(scalers={'capital costs': 1.0})[source]

abstract function should be implemented by child class to run component

save_additional_output(directory)[source]
save_component_csv(directory)[source]

save the output from the component.

save_csv_outputs(directory)[source]

save all csv outputs pre:

directory should exist and be an absolute path
post:
electric,heating, and finical csv files are saved
set_project_life_details(start_year, project_life)[source]

set the details for the project life time( pre:

start_year is an int represnting a year projct life: is the number(int >0) of years (<= fc_period) fc_period: <int> length of forecast period
post:
self.start_year, and self.project_life are the input values

and self.end_year would be the year the project ends.