Breakthrough-Energy / PreREISE

Generate input data for scenario framework
https://breakthrough-energy.github.io/docs/
MIT License
20 stars 28 forks source link

refactor: standardize trip filtering; add an invariant model integration test #343

Closed dmuldrew closed 1 year ago

dmuldrew commented 1 year ago

Pull Request doc

Purpose

Incorporates changes from @danlivengood to match “immediate” and “smart charging” daily charging output results. Replaces existing integration test with a dimensionless invariant calculation that should equal 1 for the model.

What the code is doing

Standardizes the trip filtering between immediate and smart charging implementations.

Also adds the following automated test:

abs(((output_load_sum_array.sum() * charging_efficiency) / (daily_vmt_array.sum() * kwhmi) ) - 1) < 0.03

which checks that the daily load output over the trip window (adjusted by charging efficiency) equals the vehicles miles travel times a kWh per mile factor.

Testing

Manual and automated testing

Where to look

Files in the transportation electrification folder

Time estimate

~1hr

rouille commented 1 year ago

You might want to change the target branch to transportation_electrification