Salome HOME
PR: avoids unnecessary compilation after regeneration of SALOMEconfig.h, with gcc3.2
[modules/superv.git] / examples / GraphRunSyr.py
1
2 from SuperV import *
3
4 # Warning this script has an IOR (object reference) as Input :
5 # You may have to redefine it with the result of :
6 #         SyrStruct.ComponentRef( 'FactoryServer' , 'SyrComponent' )
7 # See the Input Port forN.InPort( 'SyrComponent' , 'ComponentRef' )
8
9 #SyrStruct = Graph('../share/salome/resources/SyrStruct.xml')
10 SyrStruct = Graph('/home/data/jr_HEAD/build/share/salome/resources/SyrStruct.xml')
11
12 exec SyrStruct.ListNodes()
13
14 forN.Input('min',5)
15 forN.Input('max',8)
16
17 SyrStruct.Start()
18
19 endforN.State()
20
21 SyrStruct.State()
22
23 endforN.Suspend()
24
25 forN.State()
26
27 N = forN.Port( 'N' )
28 EndN = endwhileNotOne.Port( 'N' )
29 K = endforN.Port( 'K' )
30
31 forN.Resume()
32
33 while SyrStruct.IsDone() == 0 :
34     endforN.SuspendedW()
35     if SyrStruct.IsDone() == 0 :
36         print N.ToString(),'-->',EndN.ToString(),'with',K.ToString(),'steps'
37         endforN.Resume()
38
39 SyrStruct.State()
40
41 SyrStruct.PrintPorts()