Salome HOME
Imported using TkCVS
[samples/datafiles.git] / Superv / Python / GraphMerge.py
1
2 # Check the Merge of two graphs
3
4 # Creation of GraphSwitch
5 from GraphSwitch import *
6
7 # Creation of GraphSwitch1
8 from GraphSwitch1 import *
9
10 # Merge of GraphSwitch1 in GraphSwitch
11 GraphSwitch.Merge( GraphSwitch1 )
12
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()
16
17 # Print Input and Output Ports values of InitLoopSwitch
18 InitLoopSwitch.PrintPorts()
19
20 # Print Input and Output Ports values of InitLoop
21 InitLoop.PrintPorts()
22
23 # Print Input and Output Ports values of GraphSwitch
24 GraphSwitch.PrintPorts()
25
26 # Start asynchronous execution of GraphSwitch
27 GraphSwitch.Run()
28
29 # Wait for completion of GraphSwitch
30 GraphSwitch.DoneW()
31
32 # Print the state of GraphSwitch
33 GraphSwitch.State()
34
35 # Print the results of GraphSwitch
36 GraphSwitch.PrintPorts()
37
38 # Start asynchronous execution of GraphSwitch
39 GraphSwitch.Run()
40
41 # Start asynchronous execution of GraphSwitch1 (parallel to the execution of GraphSwitch)
42 GraphSwitch1.Run()
43
44 # Wait for completion of GraphSwitch1
45 GraphSwitch1.DoneW()
46
47 # Print the state of GraphSwitch1
48 GraphSwitch.State()
49
50 # Wait for completion of GraphSwitch
51 GraphSwitch.DoneW()
52
53 # Print the state of GraphSwitch
54 GraphSwitch.State()
55
56 # Print the results of GraphSwitch
57 GraphSwitch.PrintPorts()
58
59 # Print the results of GraphSwitch1
60 GraphSwitch1.PrintPorts()
61