GMLC-1-4-2 / battery_interface

Implemenation of Device Models and their Battery Equivalent Interface
MIT License
5 stars 0 forks source link

Scaling service to fleet rating #55

Open emayhorn opened 5 years ago

emayhorn commented 5 years ago

@jmaguire1 @raselmahmud02 @rkadavil @ORNLJD @texasbb @TomEdmunds @DavidRosewater @jdo12 @Hayden-Reeve The team has agreed on the following changes to standardize how to scale services to device fleets. Currently the Electric Vehicle/Regulation Integration is working with these modifications and can be used as an example if needed. You should download the latest code and checkout PR #46 and #50 to run the test case on your end (see 'How to test a pull request' instructions at https://github.com/GMLC-1-4-2/battery_interface).

Device fleet changes

Service changes

Integration changes

hlngo commented 5 years ago

@emayhorn Can you update the fleet_interface.py and create a PR for this issue?

afernandezcanosa commented 5 years ago

@hlngo All the fleet_interface additions have been added in PR #46. I don't know if there will be any issue if there is a commit duplicated in two different PRs.

emayhorn commented 5 years ago

@hlngo All the fleet_interface additions have been added in PR #46. I don't know if there will be any issue if there is a commit duplicated in two different PRs.

@afernandezcanosa Can you update the PR to return service_weight*fleet_rating instead 1 ?

afernandezcanosa commented 5 years ago

@hlngo All the fleet_interface additions have been added in PR #46. I don't know if there will be any issue if there is a commit duplicated in two different PRs.

@afernandezcanosa Can you update the PR to return service_weight*fleet_rating instead 1 ?

@emayhorn @hlngo Done!

hlngo commented 5 years ago

@afernandezcanosa In the fleet_interface.py, if you are to return service_weight*fleet_rating, you need to provide the default value for service_weight and fleet_rating. If you don't provide those and a device don't provide those either, the code will crash. The best way to do this is to provide default values for service_weight and fleet_rating in the fleet_interface.py and devices will override those values if needed.

afernandezcanosa commented 5 years ago

@hlngo Yes, I forgot to include those.

I have added default values for both service_weight and fleet_rating in the constructor of the fleet interface. Check my last commit of my PR #46.

Thanks for the reminder!

hlngo commented 5 years ago

@afernandezcanosa Thank you. The PR looks good and is merged into master.