Salome HOME
NRI : Add documentation.
[modules/superv.git] / examples / Graphs.py
1
2 # Generated python file of Graph Graphs
3
4 from SuperV import *
5 # Graph creation 
6 Graphs = Graph( 'Graphs' )
7 Graphs.SetAuthor( '' )
8 Graphs.SetComment( '' )
9 Graphs.Coords( 0 , 0 )
10
11 # Creation of Nodes
12 Add = Graphs.Node( 'AddComponent' , 'AddComponent' , 'Add' )
13 Add.SetAuthor( '' )
14 Add.SetContainer( 'localhost/FactoryServer' )
15 Add.SetComment( '' )
16 Add.Coords( 32 , 26 )
17 Sub = Graphs.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
18 Sub.SetAuthor( '' )
19 Sub.SetContainer( 'localhost/FactoryServer' )
20 Sub.SetComment( '' )
21 Sub.Coords( 241 , 38 )
22 Mul = Graphs.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
23 Mul.SetAuthor( '' )
24 Mul.SetContainer( 'localhost/FactoryServer' )
25 Mul.SetComment( '' )
26 Mul.Coords( 445 , 0 )
27 Div = Graphs.Node( 'DivComponent' , 'DivComponent' , 'Div' )
28 Div.SetAuthor( '' )
29 Div.SetContainer( 'localhost/FactoryServer' )
30 Div.SetComment( '' )
31 Div.Coords( 624 , 0 )
32 Add_1 = Graphs.Node( 'AddComponent' , 'AddComponent' , 'Add' )
33 Add_1.SetAuthor( '' )
34 Add_1.SetContainer( 'localhost/FactoryServer' )
35 Add_1.SetComment( '' )
36 Add_1.Coords( 13 , 297 )
37 Sub_1 = Graphs.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
38 Sub_1.SetAuthor( '' )
39 Sub_1.SetContainer( 'localhost/FactoryServer' )
40 Sub_1.SetComment( '' )
41 Sub_1.Coords( 235 , 217 )
42 Mul_1 = Graphs.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
43 Mul_1.SetAuthor( '' )
44 Mul_1.SetContainer( 'localhost/FactoryServer' )
45 Mul_1.SetComment( '' )
46 Mul_1.Coords( 423 , 303 )
47 Div_1 = Graphs.Node( 'DivComponent' , 'DivComponent' , 'Div' )
48 Div_1.SetAuthor( '' )
49 Div_1.SetContainer( 'localhost/FactoryServer' )
50 Div_1.SetComment( '' )
51 Div_1.Coords( 618 , 297 )
52
53 # Creation of intermediate Output variables and of links
54 Addz = Add.Port( 'z' )
55 Subx = Graphs.Link( Addz , Sub.Port( 'x' ) )
56 Subz = Sub.Port( 'z' )
57 Mulx = Graphs.Link( Subz , Mul.Port( 'x' ) )
58 Divx = Graphs.Link( Subz , Div.Port( 'x' ) )
59 Mulz = Mul.Port( 'z' )
60 Divy = Graphs.Link( Mulz , Div.Port( 'y' ) )
61 Add_1FuncValue = Add_1.Port( 'FuncValue' )
62 Mul_1x = Graphs.Link( Add_1FuncValue , Mul_1.Port( 'x' ) )
63 Add_1z = Add_1.Port( 'z' )
64 Sub_1x = Graphs.Link( Add_1z , Sub_1.Port( 'x' ) )
65 Sub_1z = Sub_1.Port( 'z' )
66 Div_1x = Graphs.Link( Sub_1z , Div_1.Port( 'x' ) )
67 Mul_1z = Mul_1.Port( 'z' )
68 Div_1y = Graphs.Link( Mul_1z , Div_1.Port( 'y' ) )
69
70 # Creation of Input datas
71 Addx = Add.Input( 'x' , 3)
72 Addy = Add.Input( 'y' , 5)
73 Suby = Sub.Input( 'y' , 7)
74 Muly = Mul.Input( 'y' , 11)
75 Add_1x = Add_1.Input( 'x' , 1)
76 Add_1y = Add_1.Input( 'y' , 2)
77 Sub_1y = Sub_1.Input( 'y' , 3)
78 Mul_1y = Mul_1.Input( 'y' , 4)
79
80 # Missing Input datas
81
82 # Creation of Output variables
83 AddFuncValue = Add.Port( 'FuncValue' )
84 Divz = Div.Port( 'z' )
85 Div_1z = Div_1.Port( 'z' )
86
87 Graphs.Run()
88
89 Graphs.DoneW()
90
91 Graphs.State()
92
93 Graphs.PrintPorts()
94