Skip to content

Commit

Permalink
continue updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobson committed Oct 15, 2024
1 parent 5f1016b commit 492e304
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 167 deletions.
7 changes: 7 additions & 0 deletions docs/demo/scripts/custom_fwtw_pull.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from wsimod.extensions import register_node_patch


@register_node_patch("my_fwtw", "pull_distributed")
def custom_pull_distributed(self, vqip, *args, **kwargs):
"""A custom handler function."""
return self._patched_pull_distributed(vqip, tag="FWTW")
10 changes: 5 additions & 5 deletions docs/demo/scripts/custom_reservoir_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@


@register_node_patch("my_reservoir", "pull_set_handler", item="FWTW")
def custom_handler_function(self, vqip, *args, **kwargs):
def custom_pulls_fwtw(self, vqip, *args, **kwargs):
"""A custom handler function."""
return self.tank.pull_storage(vqip)


@register_node_patch("my_reservoir", "pull_check_handler", item="FWTW")
def custom_handler_function(self, vqip, *args, **kwargs):
def custom_pullc_fwtw(self, vqip, *args, **kwargs):
"""A custom handler function."""
return self.tank.get_avail()


@register_node_patch("my_reservoir", "pull_set_handler", item="default")
def custom_handler_function(self, vqip, *args, **kwargs):
def custom_pulls_default(self, vqip, *args, **kwargs):
"""A custom handler function."""
return self.pull_set_deny()
return self.pull_set_deny(vqip)


@register_node_patch("my_reservoir", "pull_check_handler", item="default")
def custom_handler_function(self, vqip, *args, **kwargs):
def custom_pullc_default(self, vqip, *args, **kwargs):
"""A custom handler function."""
return self.pull_check_deny()
Loading

0 comments on commit 492e304

Please sign in to comment.