Table of Contents¶
t3co/input_data/scenario¶
Scenario Objects¶
Class object that contains all TCO parameters and performance target (range, grade, accel) information for a vehicle such that performance and TCO can be computed during optimization.
__new__¶
Creates a new instance of the Scenario class.
from_file¶
Python
@classmethod
def from_file(
cls,
selection: int,
scenario_file: Union[str, Path] = gl.RESOURCES_FOLDERPATH / "inputs" /
"Demo_FY22_scenario_assumptions.csv"
) -> Self
Creates a Scenario instance from a CSV file.
Arguments:
selection
int - The selection index to filter the scenario data.scenario_file
Union[str, Path] - Path to the scenario CSV file.
Returns:
Scenario
- An instance of the Scenario class.
override_from_config¶
Overrides certain scenario fields if use_config is True and config object is not None.
Arguments:
config
Config, optional - Config object containing configuration data. Defaults to None.verbose
bool, optional - If True, prints the overridden fields. Defaults to False.
Raises:
Exception
- If config file is not attached or scenario.use_config is set to False.
get_discounted_value¶
Calculates the discounted value for a given year.
Arguments:
value
float - The value to be discounted.year_number
int - The year number for discounting.
Returns:
float
- The discounted value.
delete_dataframes¶
Deletes DataFrame attributes from the Scenario instance.