T-reX.ExchangeEditor

This module is responsible for editing exchanges with wurst and Brightway2. It appends relevant exchanges from the db_T_reX (database containing waste and material exchange details) to activities identified by WasteAndMaterialSearch() in the specified project’s database (db_name). Each appended exchange replicates the same amount and unit as the original technosphere waste and material exchange.

Functions

ExchangeEditor(project_T_reX, db_name, db_T_reX_name)

Append relevant exchanges from db_T_reX to each activity in db_name identified by WasteAndMaterialSearch().

Module Contents

T-reX.ExchangeEditor.ExchangeEditor(project_T_reX, db_name, db_T_reX_name)[source]

Append relevant exchanges from db_T_reX to each activity in db_name identified by WasteAndMaterialSearch().

This function modifies the specified project’s database by appending exchanges from the db_T_reX to activities identified by WasteAndMaterialSearch(). The appended exchanges mirror the quantity and unit of the original technosphere waste and material exchange.

Parameters:
  • project_T_reX (str) – Name of the Brightway2 project to be modified.

  • db_name (str) – Name of the database within the project where activities and exchanges are stored.

  • db_T_reX_name (str) – Name of the database containing waste and material exchange details.

Returns:

None. Modifies the given Brightway2 project by appending exchanges and logs statistics about the added exchanges.

Return type:

None

Raises:

Exception – If any specified process or exchange is not found in the database.