LDAR-Sim / LDAR_Sim

MIT License
11 stars 20 forks source link

Optimize generate emissions #271

Closed SEAJang closed 1 month ago

SEAJang commented 2 months ago

Pull Request Key Information

Reason for change

Generate emissions function was taking a significant amount of time to run for more granular parameterization.

What was changed

Optimized to calculate all the dates, and vectorize the emissions for reduced function calls

Intended Purpose

Reduced time to generate_emissions.

Level of version change required

N/A

Testing Completed

Manually ran the simple_test_case1 without the generator files, ensured that the outputs made sense.

All unit tests pass results.txt

All end to end tests pass V4-simple_repairable_emissions_52341ce6b9032c2223ff7907d66f048c03454354.log V4_simple_non_repairable_emissions_52341ce6b9032c2223ff7907d66f048c03454354.log

Additional Information

Bench marking before generate_emissions_ori.txt

and after generate_emissions.txt

SEAJang commented 1 month ago

Updated Test results: results.txt V4_simple_non_repairable_emissions_bb30ab4362dd3064328bcb76f5ae888e094e17e6.log V4-simple_repairable_emissions_bb30ab4362dd3064328bcb76f5ae888e094e17e6.log