4.2. def_costs module

def_costs.calc_def_doserate(settings, vehicle)[source]
Parameters:

settings: The SetInputs class

vehicle: Tuple; represents a sourcetype_regclass_fueltype vehicle.

Returns:

The DEF dose rate for the passed vehicle based on the DEF dose rate input file.

def_costs.calc_nox_reduction(settings, vehicle, alt, calendar_year, model_year, totals_dict)[source]
Parameters:

settings: The SetInputs class.

vehicle: Tuple; represents an alt_sourcetype_regclass_fueltype vehicle.

alt: Numeric; represents the Alternative or optionID.

calendar_year: Numeric; represents the calendar year (yearID).

model_year: Numeric; represents the model year of the passed vehicle.

totals_dict: Dictionary; provides fleet NOx tons by vehicle.

Returns:

The NOx reduction for the passed model year vehicle in the given calendar year.

def_costs.calc_def_gallons(settings, vehicle, alt, calendar_year, model_year, totals_dict, fuel_arg)[source]
Parameters:

settings: The SetInputs class.

vehicle: Tuple; represents an alt_sourcetype_regclass_fueltype vehicle.

alt: Numeric; represents the Alternative or optionID.

calendar_year: Numeric; represents the calendar year (yearID).

model_year: Numeric; represents the model year of the passed vehicle.

totals_dict: Dictionary; provides gallons (fuel consumption) by vehicle.

fuel_arg: String; specifies the fuel attribute to use (e.g., “Gallons” or “Gallons_withTech”)

Returns:

The gallons of DEF consumption for the passed model year vehicle in the given calendar year.

def_costs.calc_def_costs(settings, totals_dict, fuel_arg)[source]
Parameters:

settings: The SetInputs class.

totals_dict: Dictionary; provides fleet DEF consumption by vehicle.

fuel_arg: String; specifies the fuel attribute to use (e.g., “Gallons” or “Gallons_withTech”)

Returns:

The passed dictionary updated with costs associated with DEF consumption.

def_costs.calc_average_def_costs(totals_dict, averages_dict, vpop_arg)[source]
Parameters:

totals_dict: Dictionary; provides fleet DEF costs by vehicle.

averages_dict: Dictionary, into which DEF costs/vehicle will be updated.

vpop_arg: String; specifies the population attribute to use (e.g., “VPOP” or “VPOP_withTech”)

Returns:

The passed dictionary updated with costs/mile and costs/vehicle associated with DEF consumption.