Salome HOME
Error messages
[modules/superv.git] / examples / newsupervisionexample.py
index 79a298695557c69b6d251839dba07e9200ca1585..053065eb4b1a1a82ce4d3c47ad87011d4e82ad72 100644 (file)
@@ -1,34 +1,38 @@
-
-# Generated python file of Graph GraphEssai
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : newsupervisionexample.py
+#  Module : SuperVisionTest
 
 from SuperV import *
 # Graph creation 
-GraphEssai = Graph( 'GraphEssai' )
-GraphEssai.SetName( 'GraphEssai' )
-GraphEssai.SetAuthor( '' )
-GraphEssai.SetComment( '' )
-GraphEssai.Coords( 0 , 0 )
+newsupervisionexample = Graph( 'newsupervisionexample' )
+newsupervisionexample.SetName( 'newsupervisionexample' )
+newsupervisionexample.SetAuthor( '' )
+newsupervisionexample.SetComment( '' )
+newsupervisionexample.Coords( 0 , 0 )
 
 # Creation of Computing Nodes
-Add = GraphEssai.Node( 'AddComponent' , 'AddComponent' , 'Add' )
+Add = newsupervisionexample.Node( 'AddComponent' , 'AddComponent' , 'Add' )
 Add.SetName( 'Add' )
 Add.SetAuthor( '' )
 Add.SetContainer( 'FactoryServer' )
 Add.SetComment( '' )
 Add.Coords( 15 , 241 )
-Sub = GraphEssai.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
+Sub = newsupervisionexample.Node( 'SubComponent' , 'SubComponent' , 'Sub' )
 Sub.SetName( 'Sub' )
 Sub.SetAuthor( '' )
 Sub.SetContainer( 'FactoryServer' )
 Sub.SetComment( '' )
 Sub.Coords( 227 , 99 )
-Mul = GraphEssai.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
+Mul = newsupervisionexample.Node( 'MulComponent' , 'MulComponent' , 'Mul' )
 Mul.SetName( 'Mul' )
 Mul.SetAuthor( '' )
 Mul.SetContainer( 'FactoryServer' )
 Mul.SetComment( '' )
 Mul.Coords( 443 , 278 )
-Div = GraphEssai.Node( 'DivComponent' , 'DivComponent' , 'Div' )
+Div = newsupervisionexample.Node( 'DivComponent' , 'DivComponent' , 'Div' )
 Div.SetName( 'Div' )
 Div.SetAuthor( '' )
 Div.SetContainer( 'FactoryServer' )
@@ -37,13 +41,13 @@ Div.Coords( 634 , 97 )
 
 # Creation of intermediate Output variables and of Computing Links
 Addz = Add.Port( 'z' )
-Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) )
-Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) )
+Suby = newsupervisionexample.Link( Addz , Sub.Port( 'y' ) )
+Muly = newsupervisionexample.Link( Addz , Mul.Port( 'y' ) )
 Subz = Sub.Port( 'z' )
-Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) )
-Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) )
+Mulx = newsupervisionexample.Link( Subz , Mul.Port( 'x' ) )
+Divx = newsupervisionexample.Link( Subz , Div.Port( 'x' ) )
 Mulz = Mul.Port( 'z' )
-Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) )
+Divy = newsupervisionexample.Link( Mulz , Div.Port( 'y' ) )
 
 # Creation of Input datas
 Addx = Add.Input( 'x' , 3)
@@ -53,3 +57,12 @@ Subx = Sub.Input( 'x' , 1.5)
 # Creation of Output variables
 AddFuncValue = Add.Port( 'FuncValue' )
 Divz = Div.Port( 'z' )
+
+newsupervisionexample.Run()
+
+newsupervisionexample.DoneW()
+
+newsupervisionexample.State()
+
+newsupervisionexample.PrintPorts()
+