zach401 / acnportal

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

ENH: Update ChargingNetwork plugin() method to only take an EV object. #78

Closed zach401 closed 4 years ago

zach401 commented 4 years ago

Is your feature request related to a problem? Please describe. Currently the plugin() method for ChargingNetwork takes in an EV and a station_id. This could be confusing if station_id does not match ev.station_id.

Describe the solution you'd like To fix this, I propose that we remove station_id as an argument for plugin(), instead we will automatically plug in the vehicle to the EVSE in ev.station_id. If that EVSE is taken, we will raise an error.

In addition, this makes it easier for StochasticNetwork, in that solution we will simply update the EV's station_id parameter before plugging it in.

This will break the plugin() method's API, however this is only really used internally, so it shouldn't be too much of a problem. For the next release we could log a warning and update the EV's station_id if plugin() is called with a station_id argument. Eventually we can just depreciate this argument.

zach401 commented 4 years ago

@sunash