LDAR-Sim / LDAR_Sim

MIT License
11 stars 22 forks source link

enhc: Improve weather_lookup_hourly performance #105

Closed ThomasGalesloot closed 1 year ago

ThomasGalesloot commented 1 year ago

Pull Request Key Information

Reason for change

LDAR-Sim is a complex model and takes time to run simulations. Improvements to model performance are always desirable.

What was changed

Changed calls in weather_lookup_hourly class from np.average(array) to np.mean() array. As np.average() assumes weights of 1 for when weights are not supplied, this is the same calculation, but avoids having to do the weight multiplication, which saves time.

Intended Purpose

Improve LDAR-Sim performance and runtime

Level of version change required

Patch

Testing Completed

All E2E and unit testing is passing. test_results_024dd556168b111c0b84dfc8e3f7ab547157b5a0.zip

Target Issue

N/A

Additional Information

N/A

ThomasGalesloot commented 1 year ago

All unit and end-to-end tests passing for latest commit: test_results_336b2ba5264459e072465b05faf6f7813cd1470f.zip