ESA
ESA copied to clipboard
Improve the ecological analysis method
- Reduce the number of conditions by using formatted string
e.g.
if target == 'MW':
flow = gen.loc[i, 'GenMW']
can be optimized into
flow = gen.loc[i, f"Gen{target}"]
-
When computing the EFM, compute the line flow and the loss induced EFM together
-
Use loc instead of column + index to access cells for better readiness and performance