reskit.util.economic.lcoe
=========================

.. py:module:: reskit.util.economic.lcoe


Functions
---------

.. autoapisummary::

   reskit.util.economic.lcoe.levelized_cost_of_electricity_simplified
   reskit.util.economic.lcoe.levelized_cost_of_electricity


Module Contents
---------------

.. py:function:: levelized_cost_of_electricity_simplified(capex, mean_production, opex_per_capex=0.02, lifetime=20, discount_rate=0.08)

   Compute the LCOE of a producer using the simple method

   Uses the equation:
   .. math::
       \mathrm{LCOE} = C * \frac{ (r/(1-(1+r)^{-N})) + O_c }{P_{mean}}

   where:
     * $C$ -> CAPEX [euros]
     * $O_c$ -> Fixed OPEX as a factor of CAPEX
     * $P_{mean}$ -> The average production in each year [kWh]
     * $r$ -> The discount rate
     * $N$ -> The economic lifetime [years]


   :param capex: The capital expenditures
   :type capex: numeric or array_like
   :param mean_production: The average annual production
   :type mean_production: numeric or array_like
   :param opex_per_capex: The operational expenditures given as a factor or the capex
   :type opex_per_capex: numeric
   :param lifetime: The economic lifetime in years
   :type lifetime: numeric
   :param discount_rate: The discount rate
   :type discount_rate: numeric

   :rtype: numeric or array_like


.. py:function:: levelized_cost_of_electricity(expenditures, productions, discount_rate=0.08)

   Compute the LCOE of a producer using explicitly given production and
   expeditures for each year in the economic lifetime

   Uses the equation:
   .. math::
       \mathrm{LCOE} = \sum{\frac{exp_y}{(1+r)^y}} / \sum{\frac{prod_y}{(1+r)^y}}

   where:
     * $exp_y$ -> The expenditures in year $y$ [Euro]
     * $prod_y$ -> The production in year $y$ [kWh]
     * $r$ -> The discount rate

   :param expenditures: All expenditures for each year in the lifetime
   :type expenditures: array_like
   :param productions: Annual production for each year in the lifetime
   :type productions: array_like
   :param discount_rate:
                         The discount rate
                           * If a numeric is given, the discount rate is applied to all years
                           * If an array is given, a discount rate for each year must by provided
   :type discount_rate: numeric or array_like

   :rtype: numeric or array_like


