Skip to content

Commit

Permalink
add intermediate printing & extra kwargs to plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed Jul 1, 2022
1 parent 4a9cb75 commit 2667c50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion idaes/apps/grid_integration/bidder.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def compute_day_ahead_bids(self, date, hour=0):
)

def compute_real_time_bids(
self, date, hour, realized_day_ahead_prices, realized_day_ahead_dispatches
self, date, hour, realized_day_ahead_prices, realized_day_ahead_dispatches, **kwargs
):

"""
Expand Down
9 changes: 7 additions & 2 deletions idaes/apps/grid_integration/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def register_plugins(self, context, options, plugin_config):
context.register_before_operations_solve_callback(self.pass_static_params_to_RT)
context.register_before_operations_solve_callback(self.bid_into_RTM)
context.register_after_operations_callback(self.track_sced_signal)
context.register_after_operations_callback(self.write_plugin_results)
context.register_update_operations_stats_callback(self.update_observed_dispatch)
context.register_after_ruc_activation_callback(self.activate_pending_DA_data)

context.register_finalization_callback(self.write_plugin_results)

return
Expand Down Expand Up @@ -655,11 +657,14 @@ def bid_into_RTM(self, options, simulator, sced_instance):
date = simulator.time_manager.current_time.date
hour = simulator.time_manager.current_time.hour

implemented_profile = self.tracker.tracking_model_object.get_implemented_profile(self.tracker.model.fs, 3)

bids = self.bidder.compute_real_time_bids(
date=date,
hour=hour,
realized_day_ahead_prices=self.current_avail_DA_prices,
realized_day_ahead_dispatches=self.current_avail_DA_dispatches,
tracker_profile=implemented_profile
)

# pass bids into sced model
Expand Down Expand Up @@ -793,7 +798,7 @@ def update_observed_dispatch(self, options, simulator, ops_stats):
simulator: Prescient simulator.
ops_stats: Prescient operation statitstic object
ops_stats: Prescient operation statistic object
Returns:
None
Expand Down Expand Up @@ -840,7 +845,7 @@ def activate_pending_DA_data(self, options, simulator):
self.current_avail_DA_prices = self.current_DA_prices
self.current_avail_DA_dispatches = self.current_DA_dispatches

def write_plugin_results(self, options, simulator):
def write_plugin_results(self, options, simulator, *args):

"""
After the simulation is completed, the plugins can write their own customized
Expand Down

0 comments on commit 2667c50

Please sign in to comment.