4.1.1.2. bca_tool_code.engine_input_modules package
4.1.1.2.1. Submodules
4.1.1.2.2. bca_tool_code.engine_input_modules.engine_learning_scalers module
INPUT FILE FORMAT
The file format consists of a one-row data header and subsequent data rows.
The data represent a “seed volume factor” that serves to slow learning effects; the higher the seed volume factor the slower the learning while a lower number results in more rapid learning.
- File Type
comma-separated values (CSV)
- Sample Data Columns
optionID
regClassName
regClassID
FuelName
fuelTypeID
SeedVolumeFactor
Notes
0
LHD
41
Gasoline
1
1
0
LHD
41
Diesel
2
10
SeedVolumeFactor: 10 to slow learning beyond first use
0
LHD
41
CNG
3
10
SeedVolumeFactor: 10 to slow learning beyond first use
- Data Column Name and Description
- optionID:
The option or alternative number.
- regClassName:
The MOVES reg class name, a string.
- regClassID:
The MOVES regClassID, an integer.
- FuelName:
The MOVES fuel name, e.g., ‘Gasoline’, ‘Diesel’.
- fuelTypeID:
The MOVES fuelTypeID, an integer.
- SeedVolumeFactor:
The value of the seed volume factor, an integer.
- Notes:
Notes pertinent to the data; Notes are ignored in code.
CODE
- class EngineLearningScalers[source]
Bases:
objectThe EngineLearningScalers class reads the engine_learning_scalers input file and provides methods to query its contents.
- init_from_file(filepath)[source]
- Parameters:
filepath – Path to the specified file.
- Returns:
Reads file at filepath; converts monetized values to analysis dollars (if applicable); creates a dictionary and other attributes specified in the class __init__.
- get_seedvolume_factor(engine_id, option_id)[source]
- Parameters:
engine_id – tuple; (regclass_id, fueltype_id).
option_id – int; the option_id.
- Returns:
The seed volume factor for the given engine and option_id.
- calc_learning_effect(vehicle, sales_year1, cumulative_sales, learning_rate)[source]
- Parameters:
vehicle – object; an object of the Vehicle class.
sales_year1 – numeric; the sales in the first year of implementation of a new standard.
cumulative_sales – numeric; the cumulative sales since and including the first year of implementation of a new standard.
learning_rate – numeric; the learning rate set via the General Inputs file.
- Returns:
The learning effect or factor to be applied to first year costs to reflect the learned cost after sales have totaled cumulative_sales.