Table of Contents¶
- t3co.cli.sweep
- load_vehicle_scenario_energy
- generate_ledger
- create_results_filepath
- export_results_to_csv
- run_t3co
t3co.cli.sweep¶
load_vehicle_scenario_energy¶
Python
def load_vehicle_scenario_energy(
selection: Union[int, str],
config: Config,
vehicle: Vehicle = None,
scenario: Scenario = None,
energy: Energy = None) -> Tuple[Vehicle, Scenario, Energy]
Loads the vehicle, scenario, and energy models based on the selection and config.
Arguments:
selection
Union[int, str] - The selection index or string.config
Config - The configuration instance.
Returns:
Tuple[Vehicle, Scenario, Energy]: The vehicle, scenario, and energy models.
generate_ledger¶
Generates the ledger for the given selection and config.
Arguments:
selection
int - The selection index.config
Config - The configuration instance.
Returns:
Dict
- The ledger as a dictionary.
create_results_filepath¶
Creates the results file path based on the config.
Arguments:
config
Config - The configuration instance.
Returns:
Path
- The path to the results file.
export_results_to_csv¶
Python
def export_results_to_csv(
reports_list: List[Dict],
config: Config,
output_path: Union[str, Path] = None,
return_filepath: bool = True,
return_df: bool = False,
sort_values: bool = False
) -> Tuple[Union[Path, None], Union[pd.DataFrame, None]]
Exports the results to a CSV file.
Arguments:
reports_list
List[Dict] - The list of reports.config
Config - The configuration instance.output_path
Union[str, Path], optional - The output path for the CSV file. Defaults to None.return_filepath
bool, optional - Whether to return the file path. Defaults to True.return_df
bool, optional - Whether to return the DataFrame. Defaults to False.sort_values
bool, optional - Whether to sort the values by selection. Defaults to False.
Returns:
Tuple[Union[Path, None], Union[pd.DataFrame, None]]: The output path and DataFrame if specified.
run_t3co¶
Runs the T3CO analysis.
Arguments:
config
Config - The configuration instance.save_results
bool, optional - Whether to save the results. Defaults to True.