-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add station controller #2228
add station controller #2228
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2228 +/- ##
===========================================
- Coverage 76.41% 76.04% -0.37%
===========================================
Files 280 281 +1
Lines 32429 32798 +369
===========================================
+ Hits 24779 24940 +161
- Misses 7650 7858 +208 ☔ View full report in Codecov by Sentry. |
…ntroller # Conflicts: # pandapower/converter/powerfactory/pp_import_functions.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide more description, a test and an entry in the changelog. @rbolgaryn
@rbolgaryn It seems that any documentation is missing. |
this is work in progress still |
…lable input/output elements and to overwrite local control settings from powerfactory element.
…lable input/output elements and to overwrite local control settings from powerfactory element.
@rbolgaryn @hilbrich suggestion for BinarySearchControl.control_step() def control_step(self, net):
self._binarysearchcontrol_step(net)
def _binarysearch_control_step(self, net)
if not self.in_service:
return
if self.output_values_old is None:
self.output_values_old, self.output_values = self.output_values, self.output_values + 1e-3
else:
step_diff = self.diff - self.diff_old
x = self.output_values - self.diff * (self.output_values - self.output_values_old) / np.where(
step_diff == 0, 1e-6, step_diff)
x = x * self.output_values_distribution if isinstance(x, numbers.Number) else sum(
x) * self.output_values_distribution
self.output_values_old, self.output_values = self.output_values, x
write_to_net(net, self.output_element, self.output_element_index, self.output_variable, self.output_values,
self.write_flag) So other controllers can use the Binary Search function when inheriting from BinarySearchController with: class NewControllerWithBinarySearch(BinarySearchControl):
def __init__(self, net, in_service, order, level,
drop_same_existing_ctrl,
matching_params, **kwargs):
super().__init__(net, in_service=in_service, order=order, level=level,
drop_same_existing_ctrl=drop_same_existing_ctrl,
matching_params=matching_params, **kwargs)
# init for NewControllerWithBinarySearch
def control_step(self, net):
self._binarysearch_control_step(net)
# use the results from self._binarysearch_control_step What do you think? This would i.m.o. make the BinarySearchController more usable for other controllers |
…feature/station_controller
…lers. Considered improvement for control step as discussed in pull request.
# Conflicts: # pandapower/converter/powerfactory/pp_import_functions.py
…ntroller # Conflicts: # CHANGELOG.rst
No description provided.