Skip to content
Snippets Groups Projects
Commit dfa29032 authored by Rasmus Karlsson's avatar Rasmus Karlsson
Browse files

Added assertions before functionality of Split

parent b1784dde
No related branches found
No related tags found
1 merge request!34Resolve "Operation Splitting"
Pipeline #13855 failed
......@@ -234,7 +234,10 @@ class SFG(AbstractOperation):
def split(self) -> Iterable[Operation]:
""" Iterates over the SFG's Input- and OutputSignals to reconnect them to each necessary operation inside the SFG,
so that the inner operations of the SFG can function on their own, effectively replacing the SFG. """
assert len(self.inputs) == len(self.input_operations), "Number of inputs does not match the number of input_operations in SFG."
assert len(self.outputs) == len(self.output_operations), "Number of outputs does not match the number of output_operations SFG."
# For each input_signal, connect it to the corresponding operation
for port, input_operation in zip(self.inputs, self.input_operations):
# Connect the signal to the new destination
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment