Closed jillylikedf closed 5 years ago
@jillylikedf (cc: @hlngo , @emayhorn )
Fei, I have a number of questions about running your code that would be great to discuss on the phone. Here is a summary:
Based on the drive cycle voltage csv file it is not clear that a non-zero P_request will be generated. The voltage range in the drive cycle is from 1.0282 to 1.0292. The upper and lower bounds of the desired voltage range are 1.04 and 0.98 so it looks like the drive cycle will not exceed these. Am I missing something?
There are references to forecast methods/functions and parameters but it is not clear where they come from (note there is also a hardcoded reference to 'PV' in the code too):
revise distribution voltage service code - updated March 25, 2019.
revise distribution voltage service code - updated March 25, 2019.
@jillylikedf (cc: @hlngo )
Thanks for the updated version. I was able to get this to run but it needs a number of changes:
1) The initialization should not have fleet as an input (as the service factory is run before the fleet factory). Therefore:
def __init__(self, fleet, *args, **kwargs):
# The scope of the project is to test service with one fleet...
self.fleet = fleet
Should be:
def __init__(self, *args, **kwargs):
# The scope of the project is to test service with one fleet...
2) The P and Q sensitivities are not provided by the integration test function or config file but are arguments in the input causing the code to crash. Since they are hard-coded in the service code I recommend that defaults be added. So:
def request_loop(self, sensitivity_P, sensitivity_Q):
# Sensitivity_P, Sensitivity_Q are values depending on feeder characteristics
# We can use dummy value to conduct test
sensitivity_P = 0.001
sensitivity_Q = 0.005
becomes:
def request_loop(self, sensitivity_P = 0.001, sensitivity_Q = 0.005):
# Sensitivity_P, Sensitivity_Q are values depending on feeder characteristics
# We can use dummy value to conduct test
#sensitivity_P = 0.001
#sensitivity_Q = 0.005
3) The fleet.process_request call needs to be modified to work correctly:
fleet_response = self.fleet_device.process_request(fleet_request)
should be:
fleet_response = self.fleet.process_request(fleet_request)
4) cur_time needs to be of datetime format for cur_time += delt
to work correctly. Reading in the config file needs to use the parser.parse command to get the right time format. More generally the code needs to be able to run with any start time set in the main integration file. Therefore there will need to be a way for the drive cycle to run based on any start time.
5) Finally, I could not get index = list(time.values).index(cur_time)
to work correctly. I thought it was because both time and cur_time were not in datetime format but this did not seem to fix it. The code works with cur_voltage set to a fixed value but this indexing will need to be fixed to run through the complete drive cycle.
@hlngo
Can you please reopen this PR?
Thanks Hayden
@raselmahmud02 ,
This PR (#43 ) has my feeback on the Voltage Regulation service.
Closed due to https://github.com/GMLC-1-4-2/battery_interface/pull/81
@emayhorn Can you review this PR please?