4.20. weighted_results module

weighted_results.create_weighted_cost_dict(settings, averages_dict, arg_to_weight, arg_to_weight_by)[source]

This function weights ‘arg_to_weight’ attributes by the ‘arg_to_weight_by’ attribute.

Parameters::

settings: The SetInputs class.

averages_dict: Dictionary; contains fleet average data (e.g., miles/year, cost/year, cost/mile).

arg_to_weight: String; the attribute to be weighted by the arg_to_weight_by argument.

arg_to_weight_by: String; the argument to weight by.

Returns:

A dictionary of arguments weighted by the weight_by argument.

Note:

The weighting is limited by the number of years (ages) to be included which is set in the general inputs file. The weighting is also limited to model years for which sufficient data exits to include all of those ages. For example, if the maximum calendar year included in the input data is 2045, and the maximum numbers of ages of data to include for each model year is 9 (which would be 10 years of age since year 1 is age 0) then the maximum model year included will be 2035.