zach401 / acnportal

Research tools for the Adaptive Charging Network
BSD 3-Clause "New" or "Revised" License
75 stars 32 forks source link

Interface v2 #62

Closed zach401 closed 4 years ago

zach401 commented 4 years ago

Updated interface to include SessionInfo and InfrastructureInfo objects. These objects allow a clear separation between ACN-Sim and the algorithm, making it easier to design new interfaces in the future. Also, they allow pipelining, where each step in the pipeline is able to change something about either SessionInfo or Infrastructure info objects.

Examples of this include preprocessing SessionInfo objects to update their max_rates and min_rates to implement minimum_charging_rate or apply ramp-down.

All tests pass.

zach401 commented 4 years ago

@sunash I used pytest for its parameterization features for testing algorithms. Do we want to require using only unittest? If so I need to refactor these tests.

zach401 commented 4 years ago

I actually found a way to use unittest directly which I like better using the subTests feature. The side benefit of this is that it is easier to reuse these tests for new algorithms.

zach401 commented 4 years ago

Wait on this one. We can just merge algorithm_pipelines which already has this code merged in.