ESA icon indicating copy to clipboard operation
ESA copied to clipboard

Improve the ecological analysis method

Open mzy2240 opened this issue 1 year ago • 2 comments

  1. 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}"]
  1. When computing the EFM, compute the line flow and the loss induced EFM together

  2. Use loc instead of column + index to access cells for better readiness and performance

mzy2240 avatar Sep 09 '22 03:09 mzy2240