Salome HOME
Error messages
[modules/superv.git] / examples / GraphGOTO.py
index 00b741454fd40d147f9c97d9570a2464946d533e..eb27bdf48bbdbaddb905fc1fba43ac063ee0a36c 100644 (file)
 
-# Generated python file of Graph GraphGOTO
+# Generated python file of Graph GraphGOTO_2
 
 from SuperV import *
-# Graph creation 
-GraphGOTO = Graph( 'GraphGOTO' )
-GraphGOTO.SetName( 'GraphGOTO' )
-GraphGOTO.SetAuthor( 'JR' )
-GraphGOTO.SetComment( 'Syracuse algorithm' )
-GraphGOTO.Coords( 0 , 0 )
-
-# Creation of Factory Nodes
-
-test_ISEVEN = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' )
-test_ISEVEN.SetName( 'test_ISEVEN' )
-test_ISEVEN.SetAuthor( '' )
-test_ISEVEN.SetContainer( 'localhost/FactoryServer' )
-test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' )
-test_ISEVEN.Coords( 195 , 417 )
-
-test_ISONE = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' )
-test_ISONE.SetName( 'test_ISONE' )
-test_ISONE.SetAuthor( '' )
-test_ISONE.SetContainer( 'localhost/FactoryServer' )
-test_ISONE.SetComment( 'C_ISONE from SyrComponent' )
-test_ISONE.Coords( 201 , 145 )
-
-m3p1 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' )
-m3p1.SetName( 'm3p1' )
-m3p1.SetAuthor( '' )
-m3p1.SetContainer( 'localhost/FactoryServer' )
-m3p1.SetComment( 'C_M3P1 from SyrComponent' )
-m3p1.Coords( 784 , 36 )
-
-div2 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' )
-div2.SetName( 'div2' )
-div2.SetAuthor( '' )
-div2.SetContainer( 'localhost/FactoryServer' )
-div2.SetComment( 'C_DIV2 from SyrComponent' )
-div2.Coords( 788 , 409 )
-
-incr = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' )
-incr.SetName( 'incr' )
-incr.SetAuthor( '' )
-incr.SetContainer( 'localhost/FactoryServer' )
-incr.SetComment( 'C_INCR from SyrComponent' )
-incr.Coords( 788 , 230 )
-
-# Creation of InLine Nodes
-Pylabel_begin = []
-Pylabel_begin.append( 'def label_begin( NB , KB ):' )
-Pylabel_begin.append( '    print "label_begin",NB,KB' )
-Pylabel_begin.append( '    return NB,KB' )
-label_begin = GraphGOTO.INode( 'label_begin' , Pylabel_begin )
-label_begin.InPort( 'NB' , 'long' )
-label_begin.InPort( 'KB' , 'long' )
-label_begin.OutPort( 'NT' , 'long' )
-label_begin.OutPort( 'KT' , 'long' )
-label_begin.SetName( 'label_begin' )
-label_begin.SetAuthor( '' )
-label_begin.SetComment( 'Python function' )
-label_begin.Coords( 9 , 250 )
-
-Pylabel_test = []
-Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' )
-Pylabel_test.append( '    print "label_begin",ValEven,ValOne,NB,KB' )
-Pylabel_test.append( '    return ValEven,ValOne,NB,KB' )
-label_test = GraphGOTO.INode( 'label_test' , Pylabel_test )
-label_test.InPort( 'ValEven' , 'long' )
-label_test.InPort( 'ValOne' , 'long' )
-label_test.InPort( 'NT' , 'long' )
-label_test.InPort( 'KT' , 'long' )
-label_test.OutPort( 'ValEven' , 'long' )
-label_test.OutPort( 'ValOne' , 'long' )
-label_test.OutPort( 'NT' , 'long' )
-label_test.OutPort( 'KT' , 'long' )
-label_test.SetName( 'label_test' )
-label_test.SetAuthor( '' )
-label_test.SetComment( 'Python function' )
-label_test.Coords( 396 , 193 )
-
-# Creation of Switch Nodes
-Pytest = []
-Pytest.append( 'def Switch_OneEven( ValOne , ValEven , NT , KT ) :' )
-Pytest.append( '    Finished = ValOne' )
-Pytest.append( '    if Finished == 0 :' )
-Pytest.append( '        Incr = 1' )
-Pytest.append( '        Even = ValEven' )
-Pytest.append( '        if Even == 0 :' )
-Pytest.append( '            Odd = 1' )
-Pytest.append( '        else :' )
-Pytest.append( '            Odd = 0' )
-Pytest.append( '    else :' )
-Pytest.append( '        Incr = 0' )
-Pytest.append( '        Even = 0' )
-Pytest.append( '        Odd = 0' )
-Pytest.append( '    Even = ValEven' )
-Pytest.append( '    return Finished,Incr,Even,Odd,NT,KT' )
-test,EndSwitch_OneEven = GraphGOTO.SNode( 'Switch_OneEven' , Pytest )
-EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' )
-EndSwitch_OneEven.SetAuthor( '' )
-EndSwitch_OneEven.SetComment( '' )
-EndSwitch_OneEven.Coords( 1152 , 292 )
-PyEndSwitch_OneEven = []
-PyEndSwitch_OneEven.append( 'def EndSwitch_OneEven( Finished , K ):' )
-PyEndSwitch_OneEven.append( '    print "label_begin",Finished,K' )
-PyEndSwitch_OneEven.append( '    return Finished,K' )
-EndSwitch_OneEven.SetPyFunction( 'EndSwitch_OneEven' , PyEndSwitch_OneEven )
-EndSwitch_OneEven.InPort( 'Finished' , 'long' )
-EndSwitch_OneEven.InPort( 'K' , 'long' )
-EndSwitch_OneEven.OutPort( 'Finished' , 'long' )
-EndSwitch_OneEven.OutPort( 'K' , 'long' )
-test.InPort( 'ValOne' , 'long' )
-test.InPort( 'ValEven' , 'long' )
-test.InPort( 'NT' , 'long' )
-test.InPort( 'KT' , 'long' )
-test.OutPort( 'Finished' , 'long' )
-test.OutPort( 'Incr' , 'long' )
-test.OutPort( 'Even' , 'long' )
-test.OutPort( 'Odd' , 'long' )
-test.OutPort( 'N' , 'long' )
-test.OutPort( 'K' , 'long' )
-test.SetName( 'test' )
-test.SetAuthor( '' )
-test.SetComment( '' )
-test.Coords( 595 , 239 )
-
-# Creation of GOTO Nodes
-Pycontrol_m3p1 = []
-Pycontrol_m3p1.append( 'def control_m3p1( N , K ):' )
-Pycontrol_m3p1.append( '    return 0,1,N,K' )
-control_m3p1 = GraphGOTO.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' )
-control_m3p1.InPort( 'N' , 'long' )
-control_m3p1.InPort( 'K' , 'long' )
-control_m3p1.OutPort( 'ValOne' , 'long' )
-control_m3p1.OutPort( 'ValEven' , 'long' )
-control_m3p1.OutPort( 'NT' , 'long' )
-control_m3p1.OutPort( 'KT' , 'long' )
-control_m3p1.SetName( 'control_m3p1' )
-control_m3p1.SetAuthor( '' )
-control_m3p1.SetComment( '' )
-control_m3p1.Coords( 980 , 81 )
-
-Pycontrol_div2 = []
-Pycontrol_div2.append( 'def control_div2( N , NB ) :' )
-Pycontrol_div2.append( '    return N,NB' )
-control_div2 = GraphGOTO.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' )
-control_div2.InPort( 'N' , 'long' )
-control_div2.InPort( 'K' , 'long' )
-control_div2.OutPort( 'NB' , 'long' )
-control_div2.OutPort( 'KB' , 'long' )
-control_div2.SetName( 'control_div2' )
-control_div2.SetAuthor( '' )
-control_div2.SetComment( '' )
-control_div2.Coords( 1039 , 454 )
-
-# Creation of Links
-test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' )
-label_testValEven = GraphGOTO.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) )
-label_testValEven.AddCoord( 1 , 369 , 273 )
-label_testValEven.AddCoord( 2 , 370 , 498 )
-
-test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' )
-label_testValOne = GraphGOTO.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) )
-label_testValOne.AddCoord( 1 , 385 , 303 )
-label_testValOne.AddCoord( 2 , 384 , 225 )
-
-m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' )
-control_m3p1N = GraphGOTO.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) )
-
-div2anInteger = div2.Port( 'anInteger' )
-control_div2N = GraphGOTO.Link( div2anInteger , control_div2.Port( 'N' ) )
-
-incraNewCount = incr.Port( 'aNewCount' )
-control_m3p1K = GraphGOTO.Link( incraNewCount , control_m3p1.Port( 'K' ) )
-control_m3p1K.AddCoord( 1 , 964 , 145 )
-control_m3p1K.AddCoord( 2 , 964 , 309 )
-
-control_div2K = GraphGOTO.Link( incraNewCount , control_div2.Port( 'K' ) )
-control_div2K.AddCoord( 1 , 963 , 518 )
-control_div2K.AddCoord( 2 , 964 , 312 )
-
-label_beginNT = label_begin.Port( 'NT' )
-label_testNT = GraphGOTO.Link( label_beginNT , label_test.Port( 'NT' ) )
-
-test_ISONEanInteger = GraphGOTO.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) )
-test_ISONEanInteger.AddCoord( 1 , 192 , 226 )
-test_ISONEanInteger.AddCoord( 2 , 191 , 331 )
-
-test_ISEVENanInteger = GraphGOTO.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) )
-test_ISEVENanInteger.AddCoord( 1 , 191 , 494 )
-test_ISEVENanInteger.AddCoord( 2 , 192 , 331 )
-
-label_beginKT = label_begin.Port( 'KT' )
-label_testKT = GraphGOTO.Link( label_beginKT , label_test.Port( 'KT' ) )
-
-label_testValEven = label_test.Port( 'ValEven' )
-testValEven = GraphGOTO.Link( label_testValEven , test.Port( 'ValEven' ) )
-testValEven.AddCoord( 1 , 587 , 318 )
-testValEven.AddCoord( 2 , 570 , 318 )
-testValEven.AddCoord( 3 , 569 , 272 )
-
-label_testValOne = label_test.Port( 'ValOne' )
-testValOne = GraphGOTO.Link( label_testValOne , test.Port( 'ValOne' ) )
-testValOne.AddCoord( 1 , 585 , 273 )
-testValOne.AddCoord( 2 , 586 , 303 )
-
-label_testNT = label_test.Port( 'NT' )
-testNT = GraphGOTO.Link( label_testNT , test.Port( 'NT' ) )
-
-label_testKT = label_test.Port( 'KT' )
-testKT = GraphGOTO.Link( label_testKT , test.Port( 'KT' ) )
-
-testFinished = test.Port( 'Finished' )
-EndSwitch_OneEvenFinished = GraphGOTO.Link( testFinished , EndSwitch_OneEven.Port( 'Finished' ) )
-
-testIncr = test.Port( 'Incr' )
-incrInGate = GraphGOTO.Link( testIncr , incr.Port( 'InGate' ) )
-incrInGate.AddCoord( 1 , 783 , 341 )
-incrInGate.AddCoord( 2 , 782 , 302 )
-
-testEven = test.Port( 'Even' )
-div2InGate = GraphGOTO.Link( testEven , div2.Port( 'InGate' ) )
-div2InGate.AddCoord( 1 , 754 , 518 )
-div2InGate.AddCoord( 2 , 753 , 330 )
-
-testOdd = test.Port( 'Odd' )
-m3p1InGate = GraphGOTO.Link( testOdd , m3p1.Port( 'InGate' ) )
-m3p1InGate.AddCoord( 1 , 758 , 145 )
-m3p1InGate.AddCoord( 2 , 760 , 359 )
-
-testN = test.Port( 'N' )
-m3p1anOddInteger = GraphGOTO.Link( testN , m3p1.Port( 'anOddInteger' ) )
-m3p1anOddInteger.AddCoord( 1 , 767 , 116 )
-m3p1anOddInteger.AddCoord( 2 , 767 , 116 )
-m3p1anOddInteger.AddCoord( 3 , 767 , 390 )
-
-div2anEvenInteger = GraphGOTO.Link( testN , div2.Port( 'anEvenInteger' ) )
-div2anEvenInteger.AddCoord( 1 , 767 , 489 )
-div2anEvenInteger.AddCoord( 2 , 766 , 389 )
-
-testK = test.Port( 'K' )
-EndSwitch_OneEvenK = GraphGOTO.Link( testK , EndSwitch_OneEven.Port( 'K' ) )
-
-incraCount = GraphGOTO.Link( testK , incr.Port( 'aCount' ) )
-incraCount.AddCoord( 1 , 772 , 311 )
-incraCount.AddCoord( 2 , 772 , 417 )
-incraCount.AddCoord( 3 , 772 , 417 )
-
-testDefault = test.Port( 'Default' )
-EndSwitch_OneEvenDefault = GraphGOTO.Link( testDefault , EndSwitch_OneEven.Port( 'Default' ) )
-EndSwitch_OneEvenDefault.AddCoord( 1 , 778 , 384 )
-EndSwitch_OneEvenDefault.AddCoord( 2 , 778 , 448 )
-
-control_m3p1OutGate = control_m3p1.Port( 'OutGate' )
-label_testInGate = GraphGOTO.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) )
-label_testInGate.AddCoord( 1 , 388 , 388 )
-label_testInGate.AddCoord( 2 , 389 , 597 )
-label_testInGate.AddCoord( 3 , 1319 , 597 )
-label_testInGate.AddCoord( 4 , 1318 , 231 )
-
-control_div2OutGate = control_div2.Port( 'OutGate' )
-label_beginInGate = GraphGOTO.Link( control_div2OutGate , label_begin.Port( 'InGate' ) )
-label_beginInGate.AddCoord( 1 , 4 , 388 )
-label_beginInGate.AddCoord( 2 , 3 , 587 )
-label_beginInGate.AddCoord( 3 , 1214 , 588 )
-label_beginInGate.AddCoord( 4 , 1213 , 546 )
-
-# Creation of Input datas
-label_beginNB = label_begin.Input( 'NB' , 7)
-label_beginKB = label_begin.Input( 'KB' , 0)
-
-# Creation of Output variables
-EndSwitch_OneEvenFinished = EndSwitch_OneEven.Port( 'Finished' )
-EndSwitch_OneEvenK = EndSwitch_OneEven.Port( 'K' )
-
-GraphGOTO.Run()
-
-GraphGOTO.DoneW()
-
-GraphGOTO.PrintPorts()
 
+# Graph creation of GraphGOTO_2
+def DefGraphGOTO_2() :
+    GraphGOTO_2 = Graph( 'GraphGOTO_2' )
+    GraphGOTO_2.SetName( 'GraphGOTO_2' )
+    GraphGOTO_2.SetAuthor( 'JR' )
+    GraphGOTO_2.SetComment( 'Syracuse algorithm' )
+    GraphGOTO_2.Coords( 0 , 0 )
+    
+    # Creation of Factory Nodes
+    
+    test_ISEVEN = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' )
+    test_ISEVEN.SetName( 'test_ISEVEN' )
+    test_ISEVEN.SetAuthor( '' )
+    test_ISEVEN.SetContainer( 'localhost/FactoryServer' )
+    test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' )
+    test_ISEVEN.Coords( 204 , 420 )
+    Itest_ISEVENanInteger = test_ISEVEN.GetInPort( 'anInteger' )
+    Itest_ISEVENGate = test_ISEVEN.GetInPort( 'Gate' )
+    Otest_ISEVENBoolEven = test_ISEVEN.GetOutPort( 'BoolEven' )
+    Otest_ISEVENGate = test_ISEVEN.GetOutPort( 'Gate' )
+    
+    test_ISONE = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' )
+    test_ISONE.SetName( 'test_ISONE' )
+    test_ISONE.SetAuthor( '' )
+    test_ISONE.SetContainer( 'localhost/FactoryServer' )
+    test_ISONE.SetComment( 'C_ISONE from SyrComponent' )
+    test_ISONE.Coords( 208 , 155 )
+    Itest_ISONEanInteger = test_ISONE.GetInPort( 'anInteger' )
+    Itest_ISONEGate = test_ISONE.GetInPort( 'Gate' )
+    Otest_ISONEBoolOne = test_ISONE.GetOutPort( 'BoolOne' )
+    Otest_ISONEGate = test_ISONE.GetOutPort( 'Gate' )
+    
+    m3p1 = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' )
+    m3p1.SetName( 'm3p1' )
+    m3p1.SetAuthor( '' )
+    m3p1.SetContainer( 'localhost/FactoryServer' )
+    m3p1.SetComment( 'C_M3P1 from SyrComponent' )
+    m3p1.Coords( 861 , 46 )
+    Im3p1anOddInteger = m3p1.GetInPort( 'anOddInteger' )
+    Im3p1Gate = m3p1.GetInPort( 'Gate' )
+    Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' )
+    Om3p1Gate = m3p1.GetOutPort( 'Gate' )
+    
+    div2 = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' )
+    div2.SetName( 'div2' )
+    div2.SetAuthor( '' )
+    div2.SetContainer( 'localhost/FactoryServer' )
+    div2.SetComment( 'C_DIV2 from SyrComponent' )
+    div2.Coords( 858 , 466 )
+    Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' )
+    Idiv2Gate = div2.GetInPort( 'Gate' )
+    Odiv2anInteger = div2.GetOutPort( 'anInteger' )
+    Odiv2Gate = div2.GetOutPort( 'Gate' )
+    
+    incr = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' )
+    incr.SetName( 'incr' )
+    incr.SetAuthor( '' )
+    incr.SetContainer( 'localhost/FactoryServer' )
+    incr.SetComment( 'C_INCR from SyrComponent' )
+    incr.Coords( 865 , 169 )
+    IincraCount = incr.GetInPort( 'aCount' )
+    IincrGate = incr.GetInPort( 'Gate' )
+    OincraNewCount = incr.GetOutPort( 'aNewCount' )
+    OincrGate = incr.GetOutPort( 'Gate' )
+    
+    incr_1 = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' )
+    incr_1.SetName( 'incr_1' )
+    incr_1.SetAuthor( '' )
+    incr_1.SetContainer( 'localhost/FactoryServer' )
+    incr_1.SetComment( 'C_INCR from SyrComponent' )
+    incr_1.Coords( 859 , 338 )
+    Iincr_1aCount = incr_1.GetInPort( 'aCount' )
+    Iincr_1Gate = incr_1.GetInPort( 'Gate' )
+    Oincr_1aNewCount = incr_1.GetOutPort( 'aNewCount' )
+    Oincr_1Gate = incr_1.GetOutPort( 'Gate' )
+    
+    # Creation of InLine Nodes
+    Pylabel_begin = []
+    Pylabel_begin.append( 'def label_begin( NB , KB ):' )
+    Pylabel_begin.append( '    print "label_begin",NB,KB' )
+    Pylabel_begin.append( '    return NB,KB' )
+    label_begin = GraphGOTO_2.INode( 'label_begin' , Pylabel_begin )
+    label_begin.SetName( 'label_begin' )
+    label_begin.SetAuthor( '' )
+    label_begin.SetComment( 'Python function' )
+    label_begin.Coords( 10 , 260 )
+    Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' )
+    Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' )
+    Ilabel_beginGate = label_begin.GetInPort( 'Gate' )
+    Olabel_beginNT = label_begin.OutPort( 'NT' , 'long' )
+    Olabel_beginKT = label_begin.OutPort( 'KT' , 'long' )
+    Olabel_beginGate = label_begin.GetOutPort( 'Gate' )
+    
+    Pylabel_test = []
+    Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' )
+    Pylabel_test.append( '    print "label_begin",ValEven,ValOne,NB,KB' )
+    Pylabel_test.append( '    return ValEven,ValOne,NB,KB' )
+    label_test = GraphGOTO_2.INode( 'label_test' , Pylabel_test )
+    label_test.SetName( 'label_test' )
+    label_test.SetAuthor( '' )
+    label_test.SetComment( 'Python function' )
+    label_test.Coords( 400 , 220 )
+    Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' )
+    Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' )
+    Ilabel_testNT = label_test.InPort( 'NT' , 'long' )
+    Ilabel_testKT = label_test.InPort( 'KT' , 'long' )
+    Ilabel_testGate = label_test.GetInPort( 'Gate' )
+    Olabel_testValEven = label_test.OutPort( 'ValEven' , 'long' )
+    Olabel_testValOne = label_test.OutPort( 'ValOne' , 'long' )
+    Olabel_testNT = label_test.OutPort( 'NT' , 'long' )
+    Olabel_testKT = label_test.OutPort( 'KT' , 'long' )
+    Olabel_testGate = label_test.GetOutPort( 'Gate' )
+    
+    # Creation of Switch Nodes
+    Pytest = []
+    Pytest.append( 'def Switch_OneEven( ValOne , ValEven , NT , KT ) :' )
+    Pytest.append( '    Finished = ValOne' )
+    Pytest.append( '    if Finished == 0 :' )
+    Pytest.append( '        Incr = 1' )
+    Pytest.append( '        Even = ValEven' )
+    Pytest.append( '        if Even == 0 :' )
+    Pytest.append( '            Odd = 1' )
+    Pytest.append( '        else :' )
+    Pytest.append( '            Odd = 0' )
+    Pytest.append( '    else :' )
+    Pytest.append( '        Incr = 0' )
+    Pytest.append( '        Even = 0' )
+    Pytest.append( '        Odd = 0' )
+    Pytest.append( '    Even = ValEven' )
+    Pytest.append( '    return Finished,Incr,Even,Odd,NT,KT' )
+    test,EndSwitch_OneEven = GraphGOTO_2.SNode( 'Switch_OneEven' , Pytest )
+    EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' )
+    EndSwitch_OneEven.SetAuthor( '' )
+    EndSwitch_OneEven.SetComment( 'Compute Node' )
+    EndSwitch_OneEven.Coords( 1331 , 310 )
+    PyEndSwitch_OneEven = []
+    PyEndSwitch_OneEven.append( 'def EndSwitch_OneEven( Finished , K ):' )
+    PyEndSwitch_OneEven.append( '    print "label_begin",Finished,K' )
+    PyEndSwitch_OneEven.append( '    return Finished,K' )
+    EndSwitch_OneEven.SetPyFunction( 'EndSwitch_OneEven' , PyEndSwitch_OneEven )
+    IEndSwitch_OneEvenFinished = EndSwitch_OneEven.InPort( 'Finished' , 'long' )
+    IEndSwitch_OneEvenK = EndSwitch_OneEven.InPort( 'K' , 'long' )
+    IEndSwitch_OneEvenDefault = EndSwitch_OneEven.GetInPort( 'Default' )
+    OEndSwitch_OneEvenFinished = EndSwitch_OneEven.OutPort( 'Finished' , 'long' )
+    OEndSwitch_OneEvenK = EndSwitch_OneEven.OutPort( 'K' , 'long' )
+    OEndSwitch_OneEvenGate = EndSwitch_OneEven.GetOutPort( 'Gate' )
+    test.SetName( 'test' )
+    test.SetAuthor( '' )
+    test.SetComment( 'Compute Node' )
+    test.Coords( 596 , 260 )
+    ItestValOne = test.InPort( 'ValOne' , 'long' )
+    ItestValEven = test.InPort( 'ValEven' , 'long' )
+    ItestNT = test.InPort( 'NT' , 'long' )
+    ItestKT = test.InPort( 'KT' , 'long' )
+    ItestGate = test.GetInPort( 'Gate' )
+    OtestFinished = test.OutPort( 'Finished' , 'long' )
+    OtestIncr = test.OutPort( 'Incr' , 'long' )
+    OtestEven = test.OutPort( 'Even' , 'long' )
+    OtestOdd = test.OutPort( 'Odd' , 'long' )
+    OtestN = test.OutPort( 'N' , 'long' )
+    OtestK = test.OutPort( 'K' , 'long' )
+    OtestDefault = test.GetOutPort( 'Default' )
+    
+    # Creation of GOTO Nodes
+    Pycontrol_m3p1 = []
+    Pycontrol_m3p1.append( 'def control_m3p1( N , K ):' )
+    Pycontrol_m3p1.append( '    return 0,1,N,K' )
+    control_m3p1 = GraphGOTO_2.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' )
+    control_m3p1.SetName( 'control_m3p1' )
+    control_m3p1.SetAuthor( '' )
+    control_m3p1.SetComment( 'Compute Node' )
+    control_m3p1.Coords( 1073 , 86 )
+    Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' )
+    Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' )
+    Icontrol_m3p1Gate = control_m3p1.GetInPort( 'Gate' )
+    Ocontrol_m3p1ValOne = control_m3p1.OutPort( 'ValOne' , 'long' )
+    Ocontrol_m3p1ValEven = control_m3p1.OutPort( 'ValEven' , 'long' )
+    Ocontrol_m3p1NT = control_m3p1.OutPort( 'NT' , 'long' )
+    Ocontrol_m3p1KT = control_m3p1.OutPort( 'KT' , 'long' )
+    Ocontrol_m3p1Gate = control_m3p1.GetOutPort( 'Gate' )
+    
+    Pycontrol_div2 = []
+    Pycontrol_div2.append( 'def control_div2( N , NB ) :' )
+    Pycontrol_div2.append( '    return N,NB' )
+    control_div2 = GraphGOTO_2.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' )
+    control_div2.SetName( 'control_div2' )
+    control_div2.SetAuthor( '' )
+    control_div2.SetComment( 'Compute Node' )
+    control_div2.Coords( 1128 , 453 )
+    Icontrol_div2N = control_div2.InPort( 'N' , 'long' )
+    Icontrol_div2K = control_div2.InPort( 'K' , 'long' )
+    Icontrol_div2Gate = control_div2.GetInPort( 'Gate' )
+    Ocontrol_div2NB = control_div2.OutPort( 'NB' , 'long' )
+    Ocontrol_div2KB = control_div2.OutPort( 'KB' , 'long' )
+    Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' )
+    
+    # Creation of Links
+    Ltest_ISEVENBoolEvenlabel_testValEven = GraphGOTO_2.Link( Otest_ISEVENBoolEven , Ilabel_testValEven )
+    Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 374 , 290 )
+    Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 374 , 491 )
+    
+    Ltest_ISONEBoolOnelabel_testValOne = GraphGOTO_2.Link( Otest_ISONEBoolOne , Ilabel_testValOne )
+    Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 385 , 311 )
+    Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 385 , 226 )
+    
+    Lm3p1anEvenIntegercontrol_m3p1N = GraphGOTO_2.Link( Om3p1anEvenInteger , Icontrol_m3p1N )
+    
+    Ldiv2anIntegercontrol_div2N = GraphGOTO_2.Link( Odiv2anInteger , Icontrol_div2N )
+    
+    LincraNewCountcontrol_m3p1K = GraphGOTO_2.Link( OincraNewCount , Icontrol_m3p1K )
+    LincraNewCountcontrol_m3p1K.AddCoord( 1 , 1048 , 135 )
+    LincraNewCountcontrol_m3p1K.AddCoord( 2 , 1048 , 241 )
+    
+    Lincr_1aNewCountcontrol_div2K = GraphGOTO_2.Link( Oincr_1aNewCount , Icontrol_div2K )
+    
+    Llabel_beginNTlabel_testNT = GraphGOTO_2.Link( Olabel_beginNT , Ilabel_testNT )
+    
+    Llabel_beginNTtest_ISONEanInteger = GraphGOTO_2.Link( Olabel_beginNT , Itest_ISONEanInteger )
+    Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 191 , 225 )
+    Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 191 , 331 )
+    
+    Llabel_beginNTtest_ISEVENanInteger = GraphGOTO_2.Link( Olabel_beginNT , Itest_ISEVENanInteger )
+    Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 190 , 491 )
+    Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 190 , 331 )
+    
+    Llabel_beginKTlabel_testKT = GraphGOTO_2.Link( Olabel_beginKT , Ilabel_testKT )
+    
+    Llabel_testValEventestValEven = GraphGOTO_2.Link( Olabel_testValEven , ItestValEven )
+    
+    Llabel_testValOnetestValOne = GraphGOTO_2.Link( Olabel_testValOne , ItestValOne )
+    
+    Llabel_testNTtestNT = GraphGOTO_2.Link( Olabel_testNT , ItestNT )
+    
+    Llabel_testKTtestKT = GraphGOTO_2.Link( Olabel_testKT , ItestKT )
+    
+    LtestFinishedEndSwitch_OneEvenFinished = GraphGOTO_2.Link( OtestFinished , IEndSwitch_OneEvenFinished )
+    
+    LtestEvenincr_1Gate = GraphGOTO_2.Link( OtestEven , Iincr_1Gate )
+    
+    LtestEvendiv2Gate = GraphGOTO_2.Link( OtestEven , Idiv2Gate )
+    
+    LtestOddincrGate = GraphGOTO_2.Link( OtestOdd , IincrGate )
+    
+    LtestOddm3p1Gate = GraphGOTO_2.Link( OtestOdd , Im3p1Gate )
+    
+    LtestNm3p1anOddInteger = GraphGOTO_2.Link( OtestN , Im3p1anOddInteger )
+    LtestNm3p1anOddInteger.AddCoord( 1 , 808 , 116 )
+    LtestNm3p1anOddInteger.AddCoord( 2 , 806 , 372 )
+    
+    LtestNdiv2anEvenInteger = GraphGOTO_2.Link( OtestN , Idiv2anEvenInteger )
+    LtestNdiv2anEvenInteger.AddCoord( 1 , 806 , 537 )
+    LtestNdiv2anEvenInteger.AddCoord( 2 , 806 , 373 )
+    
+    LtestKEndSwitch_OneEvenK = GraphGOTO_2.Link( OtestK , IEndSwitch_OneEvenK )
+    
+    LtestKincraCount = GraphGOTO_2.Link( OtestK , IincraCount )
+    
+    LtestKincr_1aCount = GraphGOTO_2.Link( OtestK , Iincr_1aCount )
+    
+    LtestDefaultEndSwitch_OneEvenDefault = GraphGOTO_2.Link( OtestDefault , IEndSwitch_OneEvenDefault )
+    LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 1 , 1319 , 385 )
+    LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 2 , 1319 , 577 )
+    LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 3 , 779 , 577 )
+    LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 4 , 778 , 415 )
+    
+    Lcontrol_m3p1Gatelabel_testGate = GraphGOTO_2.Link( Ocontrol_m3p1Gate , Ilabel_testGate )
+    Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 389 , 375 )
+    Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 389 , 597 )
+    Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1519 , 602 )
+    Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1508 , 201 )
+    
+    Lcontrol_div2Gatelabel_beginGate = GraphGOTO_2.Link( Ocontrol_div2Gate , Ilabel_beginGate )
+    Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 3 , 373 )
+    Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 3 , 587 )
+    Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1307 , 586 )
+    Lcontrol_div2Gatelabel_beginGate.AddCoord( 4 , 1307 , 528 )
+    
+    # Input datas
+    Ilabel_beginNB.Input( 7 )
+    Ilabel_beginKB.Input( 0 )
+    
+    # Output Ports of the graph
+    #OtestIncr = test.GetOutPort( 'Incr' )
+    #OEndSwitch_OneEvenFinished = EndSwitch_OneEven.GetOutPort( 'Finished' )
+    #OEndSwitch_OneEvenK = EndSwitch_OneEven.GetOutPort( 'K' )
+    return GraphGOTO_2
+
+
+GraphGOTO_2 = DefGraphGOTO_2()