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 componentsthat 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 overprojects 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_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 benefitover 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_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_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
-
run
(scalers={'capital costs': 1.0})[source]¶ abstract function should be implemented by child class to run 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.
-