T-reX.main
Main module of the T-reX tool.
This script serves as the entry point for the T-reX tool. It orchestrates the overall process, including the setup and execution of various subprocesses like database explosion, material and waste searches, and the editing of exchanges.
The script supports both single and multiple project/database modes, as well as the option to use multiprocessing. It also facilitates the use of the premise module to generate future scenario databases.
Customisation:
Project and database names, and other settings can be edited in config/user_settings.py.
Waste search query terms can be customised in config/queries_waste.py.
The list of materials can be modified in config/queries_materials.py.
Usage:
To use the default settings, run the script with python main.py. Arguments can be provided to change project/database names or to delete the project before running.
Attributes
Functions
|
Main function serving as the wrapper for the T-reX tool. |
|
Exploding the database into separate exchanges, searching for waste and |
|
Edit exchanges in the database. |
Module Contents
- T-reX.main.num_cpus
- T-reX.main.script_dir
- T-reX.main.run()[source]
Main function serving as the wrapper for the T-reX tool.
- This function coordinates the various components of the tool, including:
creating future scenario databases, setting up and processing each database for waste and material footprinting, and combining results into a custom database. adding LCIA methods to the project for each of the waste/material flows.
The function supports various modes of operation based on the settings in config/user_settings.py. Specifications for material and waste searches can be customised in queries_materials.
- T-reX.main.ExplodeAndSearch(args)[source]
Exploding the database into separate exchanges, searching for waste and material flows, and processing these results.
- This includes:
ExplodeDatabase.py
SearchWaste.py
SearchMaterial.py
- Parameters:
args – Dictionary containing database and project settings.
- Returns:
None