GMLC-1-4-2 / battery_interface

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

Artificial Inertia - Process Request Call #52

Open Hayden-Reeve opened 5 years ago

Hayden-Reeve commented 5 years ago

@jmaguire1 , @yliu250 , @raselmahmud02 , @afernandezcanosa @rkadavil @DavidRosewater

Continue to use Process_Request call. Devices can then call Frequency_watt directly (based on device_fleet.is_autonomous = True and device _fleet.FW21_Enabled = True flags that are set in fleet_factory when autonomous service is used).

See code in PV PR #40 for an example.

    def process_request(self, fleet_request):
        """
        This function takes the fleet request and repackages it for the interal run function
        :param fleet_request: an instance of FleetRequest
        :return fleet_response: an instance of FleetResponse
        """
        ts = fleet_request.ts_req
        dt = fleet_request.sim_step
        start_time = fleet_request.start_time
        p_req = fleet_request.P_req
        q_req = fleet_request.Q_req
        # call run function with proper inputs
        if self.is_autonomous==True:
            if self.FW21_Enabled==True:
                fleet_response=self.frequency_watt(ts=ts, start_time=start_time)
            elif self.VV11_Enabled==True:
                fleet_response=self.Volt_Var(ts=ts)
            else:
                print('Please select either Volt-Var or Frequency-Watt as autonomous mode of operation')
                fleet_response=[]
        else:
            fleet_response = self.Run_Fleet(ts=ts,sim_step=dt,P_req=p_req, Q_req=q_req, return_forecast=False,WP=self.is_P_priority)
#        print('p req',p_req)
#        print('p to grid',fleet_response.P_togrid)

        return fleet_response
yliu250 commented 5 years ago

Hi Hayden,

I have committed the changes on GitHub. If you don’t see it, let me know.

Yuan

From: Hayden-Reeve notifications@github.com Sent: Tuesday, February 26, 2019 3:25 PM To: GMLC-1-4-2/battery_interface battery_interface@noreply.github.com Cc: Liu, Yuan yuan.liu@pnnl.gov; Mention mention@noreply.github.com Subject: [GMLC-1-4-2/battery_interface] Artificial Inertia - Process Request Call (#52)

@jmaguire1https://github.com/jmaguire1 , @yliu250https://github.com/yliu250 , @raselmahmud02https://github.com/raselmahmud02 , @afernandezcanosahttps://github.com/afernandezcanosa @rkadavilhttps://github.com/rkadavil @DavidRosewaterhttps://github.com/DavidRosewater

Continue to use Process_Request call. Devices can then call Frequency_watt directly (based on device_fleet.is_autonomous = True and device _fleet.FW21_Enabled = True flags that are set in fleet_factory when autonomous service is used).

See code in PV PR #40https://github.com/GMLC-1-4-2/battery_interface/pull/40 for an example.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/GMLC-1-4-2/battery_interface/issues/52, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYKNH023qUFhqeU4emjAAFKF-Jj6aXsmks5vRcJWgaJpZM4bTEjg.

Hayden-Reeve commented 5 years ago

@yliu250 , I do not see the pull request. Is there a pull request number you can reference? (Or even better provide the link to the relevant pull request - e.g. #40 )

yliu250 commented 5 years ago

Ok. Here you go. Now you may see it.

From: Hayden-Reeve notifications@github.com Sent: Wednesday, February 27, 2019 9:51 AM To: GMLC-1-4-2/battery_interface battery_interface@noreply.github.com Cc: Liu, Yuan yuan.liu@pnnl.gov; Mention mention@noreply.github.com Subject: Re: [GMLC-1-4-2/battery_interface] Artificial Inertia - Process Request Call (#52)

@yliu250https://github.com/yliu250 , I do not see the pull request. Is there a pull request number you can reference? (Or even better provide the link to the relevant pull request - e.g. #40https://github.com/GMLC-1-4-2/battery_interface/pull/40 )

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/GMLC-1-4-2/battery_interface/issues/52#issuecomment-467962574, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYKNH2ZZz7dB9MugY8RAET2IjI8XdZ_Kks5vRsWFgaJpZM4bTEjg.