4.3. direct_costs module

direct_costs.tech_package_cost(settings, unit, alt, cost_step)[source]
Parameters:

settings: The SetInputs class.

unit: Tuple; represents a regclass_fueltype engine or a sourcetype_regclass_fueltype vehicle.

alt: Numeric; represents the Alternative or optionID.

cost_step: String; represents the model year of implementation of the tech; if standards are implemented in stages (i.e., for MY2027 and then again for MY2031), then these would represent two cost steps, one in ‘2027’ and the other in ‘2031’.

Returns:

A single value representing the package direct cost (a summation of individual tech direct costs) for the passed vehicle at the given cost_step.

direct_costs.tech_pkg_cost_withlearning(settings, unit, alt, cost_step, sales_arg, cumulative_sales, totals_dict)[source]
Parameters:

settings: The SetInputs class.

unit: Tuple; represents a regclass_fueltype engine or a sourcetype_regclass_fueltype vehicle.

alt: The alternative or option ID.

cost_step: String; represents the model year of implementation in case standards are implemented in stages then these would represent multiple cost steps.

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

cumulative_sales: Numeric; represents cumulative sales of unit since cost_step.

totals_dict: A dictionary containing sales (sales_arg) of units by model year.

Returns:

The package cost with learning applied for the passed unit in the given model year and associated with the given cost_step.

direct_costs.calc_yoy_costs_per_step(settings, totals_dict, sales_arg, program)[source]
Parameters:

settings: The SetInputs class.

totals_dict: Dictionary; provides sales of units by model year; this will be faster if age_id > 0 is scrubbed out first.

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

program: String; the program identifier (e.g., ‘CAP’ or ‘GHG’).

Returns:

A dictionary containing the package cost and cumulative sales used to calculate that package cost (learning effects depend on cumulative sales) for the passed unit in the given model year and complying with the standards set in the given cost step.

direct_costs.calc_per_veh_direct_costs(yoy_costs_per_step_dict, cost_steps, averages_dict, program)[source]
Parameters:

yoy_costs_per_step_dict: Dictionary; contains the package cost and cumulative sales used to calculate that package cost (learning effects depend on cumulative sales) for the passed unit in the given model year and complying with the standards set in the given cost step.

cost_steps: List; provides the cost steps (as strings) associated with the direct costs being calculated.

averages_dict: Dictionary; into which tech package direct costs/vehicle will be updated.

program: String; the program identifier (i.e., ‘CAP’ or ‘GHG’).

Returns:

The averages_dict dictionary updated with tech package costs/vehicle.

direct_costs.calc_direct_costs(totals_dict, averages_dict, sales_arg, program)[source]
Parameters:

totals_dict: Dictionary; into which tech package direct costs will be updated.

averages_dict: Dictionary; contains tech package direct costs/vehicle.

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

program: String; the program identifier (i.e., ‘CAP’ or ‘GHG’).

Returns:

The totals_dict dictionary updated with tech package direct costs (package cost * sales).