2 # Check the Merge of two graphs
4 # Creation of GraphSwitch
5 from GraphSwitch import *
7 # Creation of GraphSwitch1
8 from GraphSwitch1 import *
10 # Merge of GraphSwitch1 in GraphSwitch
11 GraphSwitch.Merge( GraphSwitch1 )
13 # Create a variable for each node of GraphSwitch :
14 # IsOdd,IsOdd_1,InitLoopSwitch,InitLoop,EndOfInitLoopSwitch,EndOfInitLoop,Switch,Switch_1,EndOfSwitch,EndSwitch
15 exec GraphSwitch.ListNodes()
17 # Print Input and Output Ports values of InitLoopSwitch
18 InitLoopSwitch.PrintPorts()
20 # Print Input and Output Ports values of InitLoop
23 # Print Input and Output Ports values of GraphSwitch
24 GraphSwitch.PrintPorts()
26 # Start asynchronous execution of GraphSwitch
29 # Wait for completion of GraphSwitch
32 # Print the state of GraphSwitch
35 # Print the results of GraphSwitch
36 GraphSwitch.PrintPorts()
38 # Start asynchronous execution of GraphSwitch
41 # Start asynchronous execution of GraphSwitch1 (parallel to the execution of GraphSwitch)
44 # Wait for completion of GraphSwitch1
47 # Print the state of GraphSwitch1
50 # Wait for completion of GraphSwitch
53 # Print the state of GraphSwitch
56 # Print the results of GraphSwitch
57 GraphSwitch.PrintPorts()
59 # Print the results of GraphSwitch1
60 GraphSwitch1.PrintPorts()