Salome HOME
NRI : Add documentation.
[modules/superv.git] / examples / GraphEssai2.py
1
2 # Generated python file of Graph GraphEssai2
3
4 from SuperV import *
5 # Graph creation 
6 GraphEssai2 = Graph( 'GraphEssai2' )
7 GraphEssai2.SetName( 'GraphEssai2' )
8 GraphEssai2.SetAuthor( '' )
9 GraphEssai2.SetComment( '' )
10 GraphEssai2.Coords( 0 , 0 )
11
12 # Creation of Computing Nodes
13 Add = GraphEssai2.Node( 'AddComponent' , 'AddComponent' , 'Add' )
14 Add.SetName( 'Add' )
15 Add.SetAuthor( '' )
16 Add.SetContainer( 'localhost/FactoryServer' )
17 Add.SetComment( '' )
18 Add.Coords( 49 , 182 )
19 Sub = GraphEssai2.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
20 Sub.SetName( 'Sub' )
21 Sub.SetAuthor( '' )
22 Sub.SetContainer( 'localhost/FactoryServer' )
23 Sub.SetComment( '' )
24 Sub.Coords( 300 , 270 )
25 Mul = GraphEssai2.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
26 Mul.SetName( 'Mul' )
27 Mul.SetAuthor( '' )
28 Mul.SetContainer( 'localhost/FactoryServer' )
29 Mul.SetComment( '' )
30 Mul.Coords( 306 , 28 )
31 Div = GraphEssai2.Node( 'DivComponent' , 'DivComponent' , 'Div' )
32 Div.SetName( 'Div' )
33 Div.SetAuthor( '' )
34 Div.SetContainer( 'localhost/FactoryServer' )
35 Div.SetComment( '' )
36 Div.Coords( 603 , 156 )
37
38 # Creation of intermediate Output variables and of Computing Links
39 AddFuncValue = Add.Port( 'FuncValue' )
40 Mulx = GraphEssai2.Link( AddFuncValue , Mul.Port( 'x' ) )
41 Addz = Add.Port( 'z' )
42 Subx = GraphEssai2.Link( Addz , Sub.Port( 'x' ) )
43 SubOutGate = Sub.Port( 'OutGate' )
44 MulInGate = GraphEssai2.Link( SubOutGate , Mul.Port( 'InGate' ) )
45 Subz = Sub.Port( 'z' )
46 Divx = GraphEssai2.Link( Subz , Div.Port( 'x' ) )
47 Mulz = Mul.Port( 'z' )
48 Divy = GraphEssai2.Link( Mulz , Div.Port( 'y' ) )
49
50 # Creation of Input datas
51 Addx = Add.Input( 'x' , 1)
52 Addy = Add.Input( 'y' , 2)
53 Suby = Sub.Input( 'y' , 3)
54 Muly = Mul.Input( 'y' , 4)
55
56 # Creation of Output variables
57 Divz = Div.Port( 'z' )
58
59 GraphEssai2.Run()
60
61 GraphEssai2.DoneW()
62
63 GraphEssai2.State()
64
65 GraphEssai2.PrintPorts()
66