Salome HOME
79a298695557c69b6d251839dba07e9200ca1585
[modules/superv.git] / examples / newsupervisionexample.py
1
2 # Generated python file of Graph GraphEssai
3
4 from SuperV import *
5 # Graph creation 
6 GraphEssai = Graph( 'GraphEssai' )
7 GraphEssai.SetName( 'GraphEssai' )
8 GraphEssai.SetAuthor( '' )
9 GraphEssai.SetComment( '' )
10 GraphEssai.Coords( 0 , 0 )
11
12 # Creation of Computing Nodes
13 Add = GraphEssai.Node( 'AddComponent' , 'AddComponent' , 'Add' )
14 Add.SetName( 'Add' )
15 Add.SetAuthor( '' )
16 Add.SetContainer( 'FactoryServer' )
17 Add.SetComment( '' )
18 Add.Coords( 15 , 241 )
19 Sub = GraphEssai.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
20 Sub.SetName( 'Sub' )
21 Sub.SetAuthor( '' )
22 Sub.SetContainer( 'FactoryServer' )
23 Sub.SetComment( '' )
24 Sub.Coords( 227 , 99 )
25 Mul = GraphEssai.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
26 Mul.SetName( 'Mul' )
27 Mul.SetAuthor( '' )
28 Mul.SetContainer( 'FactoryServer' )
29 Mul.SetComment( '' )
30 Mul.Coords( 443 , 278 )
31 Div = GraphEssai.Node( 'DivComponent' , 'DivComponent' , 'Div' )
32 Div.SetName( 'Div' )
33 Div.SetAuthor( '' )
34 Div.SetContainer( 'FactoryServer' )
35 Div.SetComment( '' )
36 Div.Coords( 634 , 97 )
37
38 # Creation of intermediate Output variables and of Computing Links
39 Addz = Add.Port( 'z' )
40 Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) )
41 Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) )
42 Subz = Sub.Port( 'z' )
43 Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) )
44 Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) )
45 Mulz = Mul.Port( 'z' )
46 Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) )
47
48 # Creation of Input datas
49 Addx = Add.Input( 'x' , 3)
50 Addy = Add.Input( 'y' , 4.5)
51 Subx = Sub.Input( 'x' , 1.5)
52
53 # Creation of Output variables
54 AddFuncValue = Add.Port( 'FuncValue' )
55 Divz = Div.Port( 'z' )