gcubed.model_parameters
This module contains the Parameter calibration system for G-Cubed.
Generate the template user parameters DataFrame with the required adjustments to FTA and MUL parameters.
Arguments
sym_data : SymData
The SymData object containing model data such as regions and sectors.
Returns
The generated template user parameters DataFrame with regions matching the current model.
Generate a DataFrame of technology advancement rates for all sectors and years.
Arguments
advancement_rate : float
The annual advancement rate (e.g., 1.4 for 1.4% per year).
sectors : List[str]
The list of sectors in the model.
years : List[str]
The list of projection years in the model.
Returns
A DataFrame of technology advancement rates with sectors as the index and years as the columns.
Generate a DataFrame of technology catchup rates for all regions, sectors, and years.
Arguments
long_run_catchup_rate : float
The long-run catchup rate (e.g., 2 for 2%).
regions : List[str]
The list of regions in the model.
sectors : List[str]
The list of sectors in the model.
years : List[str]
The list of projection years in the model.
Returns
A DataFrame of technology catchup rates with a MultiIndex of (region, sector) and years as the columns.
Generate a DataFrame of technology gaps for all regions and sectors.
Arguments
regions : List[str]
The list of regions in the model.
sectors : List[str]
The list of sectors in the model.
Returns
A DataFrame of technology gaps sector rows and region columns.
Generate a DataFrame of autonomous energy efficiency improvements for all regions, sectors, and years.
Arguments
regions : List[str] The list of regions in the model.
sectors : List[str] The list of sectors in the model.
years : List[str] The list of projection years in the model.
rate : float, optional The annual improvement rate (default is 1.0, meaning 1 percent improvement).
Returns
A DataFrame of autonomous energy efficiency improvements with a MultiIndex of (region, sector) and years as the columns.
Remove the template data files and user parameters CSV files if they exist.
Overview
Write generated user parameters, optionally preserving existing user-owned rows while removing the obsolete runtime-derived capital-return family.
Arguments
generated_user_parameters: Complete generated parameter table.output_file_path: Destinationuser_parameters.csvpath.preserve_existing_user_parameters: When true and the destination exists, preserve every non-derived row and cell exactly.
Returns
None.
Exceptions
Raises ValueError for duplicate rows, a changed header, or a partial
obsolete capital-return family. Propagates filesystem errors.
Generate the template baseline data files and user parameters CSV files.
Arguments
model_configuration : ModelConfiguration
The ModelConfiguration object containing model configuration details.
overwrite : bool, optional Whether to overwrite existing files (use the standard names for the files). Default is False. If this is set to False, the files will be saved with "_template" appended to their names.
preserve_existing_user_parameters : bool, optional Whether an overwrite should preserve existing user-owned values while removing obsolete runtime-derived rows. Defaults to false.
Returns
None.