Salome HOME
a60f0e3114209bfea07aef159b9e7077cfd5c4ba
[modules/superv.git] / GraphEssai.py
1
2 # Generated python file of Graph GraphEssai
3
4 from SuperV import *
5 # Graph creation 
6 GraphEssai = Graph( 'GraphEssai' )
7 GraphEssai.SetAuthor( '' )
8 GraphEssai.SetComment( '' )
9 GraphEssai.Coords( 0 , 0 )
10
11 # Creation of Nodes
12 Add = GraphEssai.Node( 'AddComponent' , 'AddComponent' , 'Add' )
13 Add.SetAuthor( '' )
14 Add.SetContainer( 'FactoryServer' )
15 Add.SetComment( '' )
16 Add.Coords( 15 , 241 )
17 Sub = GraphEssai.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
18 Sub.SetAuthor( '' )
19 Sub.SetContainer( 'FactoryServer' )
20 Sub.SetComment( '' )
21 Sub.Coords( 227 , 99 )
22 Mul = GraphEssai.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
23 Mul.SetAuthor( '' )
24 Mul.SetContainer( 'FactoryServer' )
25 Mul.SetComment( '' )
26 Mul.Coords( 443 , 278 )
27 Div = GraphEssai.Node( 'DivComponent' , 'DivComponent' , 'Div' )
28 Div.SetAuthor( '' )
29 Div.SetContainer( 'FactoryServer' )
30 Div.SetComment( '' )
31 Div.Coords( 634 , 97 )
32
33 # Creation of intermediate Output variables and of links
34 Addz = Add.Port( 'z' )
35 Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) )
36 Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) )
37 Subz = Sub.Port( 'z' )
38 Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) )
39 Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) )
40 Mulz = Mul.Port( 'z' )
41 Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) )
42
43 # Creation of Input datas
44 Addx = Add.Input( 'x' , 3)
45 Addy = Add.Input( 'y' , 4.5)
46 Subx = Sub.Input( 'x' , 1.5)
47
48 # Missing Input datas
49
50 # Creation of Output variables
51 AddFuncValue = Add.Port( 'FuncValue' )
52 Divz = Div.Port( 'z' )
53
54 Add.Print()
55 Sub.Print()
56 Mul.Print()
57 Div.Print()
58
59 GraphEssai.PrintPorts()
60
61 nodes = GraphEssai.LevelNodes( 0 )
62 i = 0
63 while i < len( nodes ) :
64     print 'Nodes of level 0',nodes[i].Name()
65     i = i + 1
66
67 GraphEssai.Run()
68
69 GraphEssai.DoneW()
70
71 GraphEssai.State()
72
73 GraphEssai.PrintPorts()
74