empire package¶
Subpackages¶
- empire.core package
- Submodules
- empire.core.config module
- empire.core.empire module
- empire.core.model_runner module
- empire.core.reader module
- empire.core.scenario_random module
check_scenarios_exist()check_scenarios_exist_and_copy()gather_peak_sample()gather_regular_sample()generate_random_scenario()make_copula_filter()make_filter_result()make_mean()make_ws()sample_generator()sample_generator_peak()sample_hydro()sample_hydro_peak()sample_load()sample_load_peak()
- Module contents
- empire.input_client package
- Submodules
- empire.input_client.client module
BaseClientEmpireInputClientGeneralClientGeneratorClientGeneratorClient.DEFAULT_SKIPROWSGeneratorClient.DEFAULT_STARTROWGeneratorClient.DEFAULT_USECOLSGeneratorClient.get_capital_costs()GeneratorClient.get_ccs_cost_ts_variable()GeneratorClient.get_co2_content()GeneratorClient.get_efficiency()GeneratorClient.get_fixed_om_costs()GeneratorClient.get_fuel_costs()GeneratorClient.get_generator_type_availability()GeneratorClient.get_initial_capacity()GeneratorClient.get_lifetime()GeneratorClient.get_max_built_capacity()GeneratorClient.get_max_installed_capacity()GeneratorClient.get_ramp_rate()GeneratorClient.get_ref_initial_capacity()GeneratorClient.get_scale_factor_initial_capacity()GeneratorClient.get_variable_om_costs()GeneratorClient.set_capital_costs()GeneratorClient.set_ccs_cost_ts_variable()GeneratorClient.set_co2_content()GeneratorClient.set_efficiency()GeneratorClient.set_fixed_om_costs()GeneratorClient.set_fuel_costs()GeneratorClient.set_generator_type_availability()GeneratorClient.set_initial_capacity()GeneratorClient.set_lifetime()GeneratorClient.set_max_built_capacity()GeneratorClient.set_max_installed_capacity()GeneratorClient.set_ramp_rate()GeneratorClient.set_ref_initial_capacity()GeneratorClient.set_scale_factor_initial_capacity()GeneratorClient.set_variable_om_costs()
NodeClientNodeClient.DEFAULT_SKIPROWSNodeClient.DEFAULT_STARTROWNodeClient.DEFAULT_USECOLSNodeClient.get_electric_annual_demand()NodeClient.get_hydro_generators_max_annual_production()NodeClient.get_node_lost_load_cost()NodeClient.set_electric_annual_demand()NodeClient.set_hydro_generators_max_annual_production()NodeClient.set_node_lost_load_cost()
SetsClientSetsClient.DEFAULT_SKIPROWSSetsClient.DEFAULT_STARTROWSetsClient.DEFAULT_USECOLSSetsClient.get_coordinates()SetsClient.get_directional_lines()SetsClient.get_generators()SetsClient.get_generators_of_node()SetsClient.get_generators_of_technology()SetsClient.get_horizon()SetsClient.get_line_type()SetsClient.get_line_type_of_directional_lines()SetsClient.get_nodes()SetsClient.get_offshore_nodes()SetsClient.get_storage()SetsClient.get_storage_of_nodes()SetsClient.get_technology()SetsClient.set_coordinates()SetsClient.set_directional_lines()SetsClient.set_generators()SetsClient.set_generators_of_node()SetsClient.set_generators_of_technology()SetsClient.set_horizon()SetsClient.set_line_type()SetsClient.set_line_type_of_directional_lines()SetsClient.set_nodes()SetsClient.set_offshore_nodes()SetsClient.set_storage()SetsClient.set_storage_of_nodes()SetsClient.set_technology()
StorageClientStorageClient.DEFAULT_SKIPROWSStorageClient.DEFAULT_STARTROWStorageClient.DEFAULT_USECOLSStorageClient.get_energy_capital_cost()StorageClient.get_energy_fixed_om_cost()StorageClient.get_energy_max_built_capacity()StorageClient.get_energy_max_installed_capacity()StorageClient.get_initial_energy_capacity()StorageClient.get_initial_power_capacity()StorageClient.get_lifetime()StorageClient.get_power_capital_cost()StorageClient.get_power_fixed_om_cost()StorageClient.get_power_max_built_capacity()StorageClient.get_power_max_installed_capacity()StorageClient.get_storage_bleed_efficiency()StorageClient.get_storage_charge_efficiency()StorageClient.get_storage_discharge_efficiency()StorageClient.get_storage_initial_energy_level()StorageClient.get_storage_power_to_energy()StorageClient.set_energy_capital_cost()StorageClient.set_energy_fixed_om_cost()StorageClient.set_energy_max_built_capacity()StorageClient.set_energy_max_installed_capacity()StorageClient.set_initial_energy_capacity()StorageClient.set_initial_power_capacity()StorageClient.set_lifetime()StorageClient.set_power_capital_cost()StorageClient.set_power_fixed_om_cost()StorageClient.set_power_max_built_capacity()StorageClient.set_power_max_installed_capacity()StorageClient.set_storage_bleed_efficiency()StorageClient.set_storage_charge_efficiency()StorageClient.set_storage_discharge_efficiency()StorageClient.set_storage_initial_energy_level()StorageClient.set_storage_power_to_energy()
TransmissionClientTransmissionClient.DEFAULT_SKIPROWSTransmissionClient.DEFAULT_STARTROWTransmissionClient.DEFAULT_USECOLSTransmissionClient.get_initial_capacity()TransmissionClient.get_length()TransmissionClient.get_lifetime()TransmissionClient.get_line_efficiency()TransmissionClient.get_max_built_capacity()TransmissionClient.get_max_install_capacity_raw()TransmissionClient.get_type_capital_cost()TransmissionClient.get_type_fixed_om_cost()TransmissionClient.set_initial_capacity()TransmissionClient.set_length()TransmissionClient.set_lifetime()TransmissionClient.set_line_efficiency()TransmissionClient.set_max_built_capacity()TransmissionClient.set_max_install_capacity_raw()TransmissionClient.set_type_capital_cost()TransmissionClient.set_type_fixed_om_cost()
- empire.input_client.sheets_structure module
- Module contents
- empire.output_client package
- Submodules
- empire.output_client.client module
EmpireOutputClientEmpireOutputClient.get_curtailed_operational()EmpireOutputClient.get_curtailed_production()EmpireOutputClient.get_europe_plot_generator_annual_production()EmpireOutputClient.get_europe_plot_generator_installed_capacity()EmpireOutputClient.get_europe_plot_storage_annual_discharge()EmpireOutputClient.get_europe_plot_storage_installed_capacity()EmpireOutputClient.get_europe_plot_storage_installed_energy()EmpireOutputClient.get_europe_summary_emission_and_energy()EmpireOutputClient.get_europe_summary_generator_types()EmpireOutputClient.get_europe_summary_storage_types()EmpireOutputClient.get_generators_values()EmpireOutputClient.get_node_operational_values()EmpireOutputClient.get_objective()EmpireOutputClient.get_storage_values()EmpireOutputClient.get_transmission_operational()EmpireOutputClient.get_transmission_values()
ResultFile
- Module contents
Submodules¶
empire.input_data_manager module¶
- class empire.input_data_manager.AvailabilityManager(client, generator_technology, availability)¶
Bases:
IDataManagerManager responsible for updating the availability/capacity factor for specific generator technologies within a given dataset.
- Parameters:
client (EmpireInputClient)
generator_technology (str)
availability (float)
- apply()¶
- Return type:
None
- validate()¶
- Return type:
None
- class empire.input_data_manager.CO2PricetManager(client, periods, co2_prices)¶
Bases:
IDataManagerManager responsible for updating the CO2 price within a given dataset.
- Parameters:
client (EmpireInputClient)
periods (list[int])
co2_prices (list[float])
- apply()¶
- Return type:
None
- class empire.input_data_manager.CapitalCostManager(client, generator_technology, capital_cost)¶
Bases:
IDataManagerManager responsible for updating the capital cost for specific generator technologies within a given dataset.
- Parameters:
client (EmpireInputClient)
generator_technology (str)
capital_cost (float)
- apply()¶
- Return type:
None
- class empire.input_data_manager.ElectricLoadManager(client, scenario_data_path, node, scale, shift, datetime_format='%d/%m/%Y %H:%M')¶
Bases:
IDataManagerManager responsible for adjusting the electric load.
- Parameters:
client (EmpireInputClient)
scenario_data_path (Path)
node (str)
scale (float)
shift (float)
datetime_format (str)
- apply()¶
Shift the load profile, then adjust the annual demand. Note that load in the first period is used for scaling.
- Return type:
None
- class empire.input_data_manager.FixedOMCostManager(client, generator_technology, fixed_om_cost)¶
Bases:
IDataManagerManager responsible for updating the fixed o&m cost for specific generator technologies within a given dataset.
- Parameters:
client (EmpireInputClient)
generator_technology (str)
fixed_om_cost (float)
- apply()¶
- Return type:
None
- class empire.input_data_manager.FuelCostManager(client, generator_technology, fuel_cost)¶
Bases:
IDataManagerManager responsible for updating the fuel cost for specific generator technologies within a given dataset.
- Parameters:
client (EmpireInputClient)
generator_technology (str)
fuel_cost (float)
- apply()¶
- Return type:
None
- class empire.input_data_manager.MaxInstalledCapacityManager(client, generator_technology, nodes, max_installed_capacity)¶
Bases:
IDataManagerManager responsible for updating the maximum installed capacities for specific generator technologies within a given dataset.
- Parameters:
client (EmpireInputClient)
generator_technology (str)
nodes (list[str])
max_installed_capacity (float)
- apply()¶
- Return type:
None
- class empire.input_data_manager.MaxTransmissionCapacityManager(client, from_node, to_node, max_installed_capacity)¶
Bases:
IDataManagerManager responsible for updating the maximum installed transmission capacity.
- Parameters:
client (EmpireInputClient)
from_node (str)
to_node (str)
max_installed_capacity (float)
- apply()¶
- Return type:
None
empire.logger module¶
- empire.logger.get_empire_logger(run_config)¶
Returns a logger handle configured according to ‘config/logging.yaml’ and ensures that logs are written to the specified results folder.
Assumes that the logger named “Empire” exists in the logging configuration.
- Parameters:
run_config (EmpireRunConfiguration) – Empire run configuration object containing run details.
- Raises:
FileNotFoundError, YAMLError
- Returns:
Configured logger.
- Return type:
Logger
empire.utils module¶
- empire.utils.copy_dataset(src_path, dest_path)¶
Copy dataset from source to destination folder.
- Parameters:
src_path (Path) – Folder containing dataset
dest_path (Path) – Folder to copy the dataset
- empire.utils.copy_file(src_file, dest_file)¶
Copy file from source to destination.
- Parameters:
src_file (Path) – Source file
dest_file (Path) – Destination file
- empire.utils.copy_scenario_data(base_dataset, scenario_data_path, use_scenario_generation, use_fixed_sample)¶
Copy scenario data from base dataset to active Empire dataset.
- Parameters:
base_dataset – path to base Empire dataset.
scenario_data_path – path to scenario data in active Empire dataset.
use_scenario_generation – Compute new scenarios or not.
use_fixed_sample – Use fixed samples or not.
- empire.utils.create_if_not_exist(path)¶
- Parameters:
path (Path)
- Return type:
Path
- empire.utils.get_name_of_last_folder_in_path(path)¶
- Parameters:
path (Path)
- Return type:
str
- empire.utils.get_run_name(empire_config, version)¶
- Parameters:
version (str)
- empire.utils.restricted_float(x)¶
- Return type:
float
- empire.utils.scale_and_shift_series(profile, scale, shift)¶
The function returns a new profile that can be scaled by ‘scale’ + ‘shift’ while preserving the same mean and standard deviation as a scaling and shifting of the original profile.
- Parameters:
profile (Series) – Profile to scale and shift, values within [0,1].
scale (float) – Scale value
shift (float) – Shift value
- Returns:
profile that only needs to be scaled