-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dobson
committed
Oct 3, 2024
1 parent
1e608d5
commit a0e485e
Showing
3 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from wsimod.nodes.nodes import Node | ||
|
||
class CustomNode(Node): | ||
"""A custom node.""" | ||
def __init__(self, name): | ||
"""Initialise the node.""" | ||
super().__init__(name) | ||
self.custom_attr = 1 | ||
|
||
def end_timestep(self): | ||
self.custom_attr += 1 | ||
super().end_timestep() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters