A Python class to mass balance SUT matrices.
- Read in the required data files (initial mass guesses, activity geography, flag of capital and heterogeneous products)
- Fix some potential issues, including capital EOL, disaggregating heterogeneous products with 'help_functions.py' and include obvious missing flows with 'table_fixer.py'
- Rescale the coefficients in the SUT and the initial guesses using 'rescaling.py' and 'rescaling_geo.py' to increase solver efficiency
- Save adjusted tables and masses to csv
The code can be used by running mass_balance_het_310.py
Have a look at the demo code in the demo folder for a simple use case and which information is required.
- Python 3
- Pandas
- Numpy
- Math
- Pyomo
- Gzip
- Pickle
- Copy
This tool is open-source, so feel most welcome to use, give feedback, modify or contribute.