Breakthrough-Energy / PreREISE

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

refactor: short hdv tests, common optimization functions #318

Closed dmuldrew closed 1 year ago

dmuldrew commented 1 year ago

Pull Request doc

Purpose

Merge existing LDV and HDV implementations into a common codebase with much less redundancy

What the code is doing

This PR: (1) creates short HDV smart charging integration tests by only using a subset of the data (2) moves optimization functions to common file charging_optimization.py (3) both the LDV and HDV smart charging implementations are changed to use this common code (4) changes LDV and HDV data loading to be more configurable

Testing

automated integration tests

Where to look

Notice that the get_constraints and calculate_optimization functions are removed from both the LDV and HDV implementations of smart charging and moved to charging_optimization.py

Time estimate

~20 min