empire package

Subpackages

Submodules

empire.input_data_manager module

class empire.input_data_manager.AvailabilityManager(client, generator_technology, availability)

Bases: IDataManager

Manager responsible for updating the availability/capacity factor for specific generator technologies within a given dataset.

Parameters:
apply()
Return type:

None

validate()
Return type:

None

class empire.input_data_manager.CO2PricetManager(client, periods, co2_prices)

Bases: IDataManager

Manager responsible for updating the CO2 price within a given dataset.

Parameters:
apply()
Return type:

None

class empire.input_data_manager.CapitalCostManager(client, generator_technology, capital_cost)

Bases: IDataManager

Manager responsible for updating the capital cost for specific generator technologies within a given dataset.

Parameters:
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: IDataManager

Manager 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: IDataManager

Manager responsible for updating the fixed o&m cost for specific generator technologies within a given dataset.

Parameters:
apply()
Return type:

None

class empire.input_data_manager.FuelCostManager(client, generator_technology, fuel_cost)

Bases: IDataManager

Manager responsible for updating the fuel cost for specific generator technologies within a given dataset.

Parameters:
apply()
Return type:

None

class empire.input_data_manager.IDataManager

Bases: ABC

abstractmethod apply()
class empire.input_data_manager.MaxInstalledCapacityManager(client, generator_technology, nodes, max_installed_capacity)

Bases: IDataManager

Manager 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: IDataManager

Manager 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

Module contents