Skip to content
Snippets Groups Projects
Commit 1af7b7b8 authored by Hugo Winbladh's avatar Hugo Winbladh
Browse files

add suffixes to component names when unfolding sfg

parent a8a02ceb
No related branches found
No related tags found
1 merge request!424rename operations in unfolded SFGs
Pipeline #100575 failed
...@@ -1728,11 +1728,13 @@ class SFG(AbstractOperation): ...@@ -1728,11 +1728,13 @@ class SFG(AbstractOperation):
sfgs = [new_sfg() for _ in range(factor)] # Copy the SFG factor times sfgs = [new_sfg() for _ in range(factor)] # Copy the SFG factor times
# Add suffixes to all graphIDs in the SFGs in order to keep them separated # Add suffixes to all graphIDs and names in the SFGs in order to keep them separated
for i in range(factor): for i in range(factor):
for operation in sfgs[i].operations: for operation in sfgs[i].operations:
suffix = f'_{i}' suffix = f'_{i}'
operation.graph_id = operation.graph_id + suffix operation.graph_id = operation.graph_id + suffix
if operation.name != '':
operation.name = operation.name + suffix
input_name_to_idx = {} # save the input port indices for future reference input_name_to_idx = {} # save the input port indices for future reference
new_inputs = [] new_inputs = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment