Replacement_Plugin#

Classes:

Planned_Replacement(dictionary, key, dcf)

Individual planned replacement objects.

Replacement_Plugin(dcf, print_info)

Calculating yearly overall replacement costs based on one-time replacement costs and frequency.

class pyH2A.Plugins.Replacement_Plugin.Planned_Replacement(dictionary, key, dcf)[source]#

Individual planned replacement objects.

Methods

calculate_yearly_cost:

Calculation of yearly costs from one-time cost and replacement frequency.

Methods:

calculate_yearly_cost(dictionary, key, dcf)

Calculation of yearly replacement costs.

calculate_yearly_cost(dictionary, key, dcf)[source]#

Calculation of yearly replacement costs.

Replacement costs are billed annually, replacements which are performed at a non-integer rate are corrected using non_integer_correction.

class pyH2A.Plugins.Replacement_Plugin.Replacement_Plugin(dcf, print_info)[source]#

Calculating yearly overall replacement costs based on one-time replacement costs and frequency.

Parameters
Planned Replacement > […] > Frequency (years)float

Replacement frequency of […] in years. Iteration over all entries in Planned Replacement table. No path key available.

Planned Replacement > […] > Cost ($)float

One-time replacement cost of […]. Iteration over all entries in Planned Replacement table. Path key is ‘Path’.

[…] Unplanned Replacement […] >> Valuefloat

sum_all_tables() is used.

Returns
[…] Unplanned Replacement […] > Summed Total > Valuefloat

Summed total for each individual table in “Unplanned Replacement” group.

Replacement > Total > Valuendarray

Total inflated replacement costs (sum of Planned Replacement entries and unplanned replacement costs).

Methods:

calculate_planned_replacement(dcf)

Calculation of yearly replacement costs by iterating over all entries of Planned Replacement.

initialize_yearly_costs(dcf)

Initializes ndarray filled with zeros with same length as dcf.inflation_factor.

unplanned_replacement(dcf, print_info)

Calculating unplanned replacement costs by appling sum_all_tables() to "Unplanned Replacement" group.

calculate_planned_replacement(dcf)[source]#

Calculation of yearly replacement costs by iterating over all entries of Planned Replacement.

initialize_yearly_costs(dcf)[source]#

Initializes ndarray filled with zeros with same length as dcf.inflation_factor.

unplanned_replacement(dcf, print_info)[source]#

Calculating unplanned replacement costs by appling sum_all_tables() to “Unplanned Replacement” group.