From: rahuel Date: Fri, 7 Jan 2005 14:49:51 +0000 (+0000) Subject: Test with Loop(s) and with Inputs and Outputs inside the loop and only with links... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6a6ad204949a40058589aa583db5df799e2085f8;p=modules%2Fsuperv.git Test with Loop(s) and with Inputs and Outputs inside the loop and only with links between Gates --- diff --git a/examples/GraphLoopGates.py b/examples/GraphLoopGates.py new file mode 100644 index 0000000..0126d3b --- /dev/null +++ b/examples/GraphLoopGates.py @@ -0,0 +1,179 @@ + +# Generated python file of Graph GraphLoopGates + +from SuperV import * + +# Graph creation of GraphLoopGates +def DefGraphLoopGates() : + GraphLoopGates = Graph( 'GraphLoopGates' ) + GraphLoopGates.SetName( 'GraphLoopGates' ) + GraphLoopGates.SetAuthor( 'JR' ) + GraphLoopGates.SetComment( '' ) + GraphLoopGates.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphLoopGates.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'localhost/FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 248 , 70 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + Add_1 = GraphLoopGates.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add_1.SetName( 'Add_1' ) + Add_1.SetAuthor( '' ) + Add_1.SetContainer( 'localhost/FactoryServer' ) + Add_1.SetComment( 'Add from AddComponent' ) + Add_1.Coords( 249 , 305 ) + IAdd_1x = Add_1.GetInPort( 'x' ) + IAdd_1y = Add_1.GetInPort( 'y' ) + IAdd_1Gate = Add_1.GetInPort( 'Gate' ) + OAdd_1FuncValue = Add_1.GetOutPort( 'FuncValue' ) + OAdd_1z = Add_1.GetOutPort( 'z' ) + OAdd_1Gate = Add_1.GetOutPort( 'Gate' ) + + Sub = GraphLoopGates.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'localhost/FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 453 , 72 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + Sub_1 = GraphLoopGates.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub_1.SetName( 'Sub_1' ) + Sub_1.SetAuthor( '' ) + Sub_1.SetContainer( 'localhost/FactoryServer' ) + Sub_1.SetComment( 'Sub from SubComponent' ) + Sub_1.Coords( 455 , 304 ) + ISub_1x = Sub_1.GetInPort( 'x' ) + ISub_1y = Sub_1.GetInPort( 'y' ) + ISub_1Gate = Sub_1.GetInPort( 'Gate' ) + OSub_1z = Sub_1.GetOutPort( 'z' ) + OSub_1Gate = Sub_1.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PyGate = [] + PyGate.append( 'from time import * ' ) + PyGate.append( 'def Gate(G1,G2) : ' ) + PyGate.append( ' sleep(1) ' ) + PyGate.append( ' return G1&G2 ' ) + Gate = GraphLoopGates.INode( 'Gate' , PyGate ) + Gate.SetName( 'Gate' ) + Gate.SetAuthor( '' ) + Gate.SetComment( 'Compute Node' ) + Gate.Coords( 650 , 227 ) + IGateG1 = Gate.InPort( 'G1' , 'long' ) + IGateG2 = Gate.InPort( 'G2' , 'long' ) + IGateGate = Gate.GetInPort( 'Gate' ) + OGateG = Gate.OutPort( 'G' , 'long' ) + OGateGate = Gate.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInit = [] + PyInit.append( 'from time import * ' ) + PyInit.append( 'def Init(Index,Min,Max) : ' ) + PyInit.append( ' Index = Min ' ) + PyInit.append( ' sleep(1) ' ) + PyInit.append( ' return Index,Min,Max ' ) + PyMoreInit = [] + PyMoreInit.append( 'def More(Index,Min,Max) : ' ) + PyMoreInit.append( ' if Index < Max : ' ) + PyMoreInit.append( ' DoLoop = 1 ' ) + PyMoreInit.append( ' else : ' ) + PyMoreInit.append( ' DoLoop = 0 ' ) + PyMoreInit.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInit = [] + PyNextInit.append( 'def Next(Index,Min,Max) : ' ) + PyNextInit.append( ' Index = Index + 1 ' ) + PyNextInit.append( ' return Index,Min,Max ' ) + Init,EndInit = GraphLoopGates.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + EndInit.SetName( 'EndInit' ) + EndInit.SetAuthor( '' ) + EndInit.SetComment( 'Compute Node' ) + EndInit.Coords( 840 , 204 ) + PyEndInit = [] + EndInit.SetPyFunction( 'EndInit' , PyEndInit ) + IInitDoLoop = Init.GetInPort( 'DoLoop' ) + IInitIndex = Init.InPort( 'Index' , 'long' ) + IInitMin = Init.InPort( 'Min' , 'long' ) + IInitMax = Init.InPort( 'Max' , 'long' ) + IInitGate = Init.GetInPort( 'Gate' ) + OInitDoLoop = Init.GetOutPort( 'DoLoop' ) + OInitIndex = Init.GetOutPort( 'Index' ) + OInitMin = Init.GetOutPort( 'Min' ) + OInitMax = Init.GetOutPort( 'Max' ) + IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' ) + IEndInitIndex = EndInit.GetInPort( 'Index' ) + IEndInitMin = EndInit.GetInPort( 'Min' ) + IEndInitMax = EndInit.GetInPort( 'Max' ) + IEndInitGate = EndInit.GetInPort( 'Gate' ) + OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' ) + OEndInitGate = EndInit.GetOutPort( 'Gate' ) + OEndInitIndex = EndInit.GetOutPort( 'Index' ) + OEndInitMin = EndInit.GetOutPort( 'Min' ) + OEndInitMax = EndInit.GetOutPort( 'Max' ) + Init.SetName( 'Init' ) + Init.SetAuthor( '' ) + Init.SetComment( 'Compute Node' ) + Init.Coords( 10 , 181 ) + + # Creation of Links + LInitGateAdd_1Gate = GraphLoopGates.Link( OInitGate , IAdd_1Gate ) + + LInitGateAddGate = GraphLoopGates.Link( OInitGate , IAddGate ) + + LInitIndexEndInitIndex = GraphLoopGates.Link( OInitIndex , IEndInitIndex ) + + LInitMinEndInitMin = GraphLoopGates.Link( OInitMin , IEndInitMin ) + + LInitMaxEndInitMax = GraphLoopGates.Link( OInitMax , IEndInitMax ) + + LAddGateSubGate = GraphLoopGates.Link( OAddGate , ISubGate ) + + LAdd_1GateSub_1Gate = GraphLoopGates.Link( OAdd_1Gate , ISub_1Gate ) + + LSubGateGateG1 = GraphLoopGates.Link( OSubGate , IGateG1 ) + + LSub_1GateGateG2 = GraphLoopGates.Link( OSub_1Gate , IGateG2 ) + + LGateGEndInitGate = GraphLoopGates.Link( OGateG , IEndInitGate ) + + # Input datas + IInitIndex.Input( 0 ) + IInitMin.Input( 5 ) + IInitMax.Input( 13 ) + IAddx.Input( 1 ) + IAddy.Input( 2 ) + IAdd_1x.Input( 3 ) + IAdd_1y.Input( 4 ) + ISubx.Input( 5 ) + ISuby.Input( 6 ) + ISub_1x.Input( 7 ) + ISub_1y.Input( 8 ) + + # Output Ports of the graph + #OEndInitIndex = EndInit.GetOutPort( 'Index' ) + #OEndInitMin = EndInit.GetOutPort( 'Min' ) + #OEndInitMax = EndInit.GetOutPort( 'Max' ) + #OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + #OAddz = Add.GetOutPort( 'z' ) + #OAdd_1FuncValue = Add_1.GetOutPort( 'FuncValue' ) + #OAdd_1z = Add_1.GetOutPort( 'z' ) + #OSubz = Sub.GetOutPort( 'z' ) + #OSub_1z = Sub_1.GetOutPort( 'z' ) + return GraphLoopGates + + +GraphLoopGates = DefGraphLoopGates() diff --git a/examples/GraphLoopGates.xml b/examples/GraphLoopGates.xml new file mode 100644 index 0000000..f495d5a --- /dev/null +++ b/examples/GraphLoopGates.xml @@ -0,0 +1,514 @@ + + + + + +? + ? + GraphLoopGates + 1 + ? + +GraphLoopsGates + + +long + Init__Index + +long + Init__Min + +long + Init__Max + +double + Add__x + +double + Add__y + +double + Add_1__x + +double + Add_1__y + +double + Sub__x + +double + Sub__y + +double + Sub_1__x + +double + Sub_1__y + + +long + EndInit__Index + +long + EndInit__Min + +long + EndInit__Max + +double + Add__FuncValue + +double + Add__z + +double + Add_1__FuncValue + +double + Add_1__z + +double + Sub__z + +double + Sub_1__z + + + 7/1/2005 - 16:57:1 + 7/1/2005 - 17:8:8 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + Init + 4 + EndInit + +Init + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +Init + + + + + + +More + + + + + + + +Next + + + + 7/1/2005 - 16:59:3 + 7/1/2005 - 16:59:3 + 2.0 + ? + ? + Compute Node + 10 + 181 + +? + ? + EndInit + 5 + Init + +EndInit + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndInit + + 7/1/2005 - 16:59:3 + 7/1/2005 - 16:59:3 + 2.0 + ? + ? + Compute Node + 840 + 204 + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 7/1/2005 - 17:3:59 + 7/1/2005 - 17:3:59 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 248 + 70 + +AddComponent + AddComponent + Add_1 + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 7/1/2005 - 17:4:5 + 7/1/2005 - 17:4:5 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 249 + 305 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 7/1/2005 - 17:4:31 + 7/1/2005 - 17:4:31 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 453 + 72 + +SubComponent + SubComponent + Sub_1 + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 7/1/2005 - 17:4:32 + 7/1/2005 - 17:4:32 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 455 + 304 + +? + ? + Gate + 3 + ? + +Gate + + +long + G1 + +long + G2 + + +long + G + + + +Gate + + + + + 7/1/2005 - 17:7:9 + 7/1/2005 - 17:7:9 + 2.0 + ? + ? + Compute Node + 650 + 227 + + +Init + DoLoop + EndInit + DoLoop + + +Init + Gate + Add_1 + Gate + + +Init + Gate + Add + Gate + + +Init + Index + EndInit + Index + + +Init + Min + EndInit + Min + + +Init + Max + EndInit + Max + + +EndInit + DoLoop + Init + DoLoop + + +Add + Gate + Sub + Gate + + +Add_1 + Gate + Sub_1 + Gate + + +Sub + Gate + Gate + G1 + + +Sub_1 + Gate + Gate + G2 + + +Gate + G + EndInit + Gate + + + +GraphLoopGates + Init__Index + Init + Index + +3 + 0 + + +GraphLoopGates + Init__Min + Init + Min + +3 + 5 + + +GraphLoopGates + Init__Max + Init + Max + +3 + 13 + + +GraphLoopGates + Add__x + Add + x + +7 + 1 + + +GraphLoopGates + Add__y + Add + y + +7 + 2 + + +GraphLoopGates + Add_1__x + Add_1 + x + +7 + 3 + + +GraphLoopGates + Add_1__y + Add_1 + y + +7 + 4 + + +GraphLoopGates + Sub__x + Sub + x + +7 + 5 + + +GraphLoopGates + Sub__y + Sub + y + +7 + 6 + + +GraphLoopGates + Sub_1__x + Sub_1 + x + +7 + 7 + + +GraphLoopGates + Sub_1__y + Sub_1 + y + +7 + 8 + diff --git a/examples/GraphLoopsGates.py b/examples/GraphLoopsGates.py new file mode 100644 index 0000000..9d63e77 --- /dev/null +++ b/examples/GraphLoopsGates.py @@ -0,0 +1,255 @@ + +# Generated python file of Graph GraphLoopsGates_1 + +from SuperV import * + +# Graph creation of GraphLoopsGates_1 +def DefGraphLoopsGates_1() : + GraphLoopsGates_1 = Graph( 'GraphLoopsGates_1' ) + GraphLoopsGates_1.SetName( 'GraphLoopsGates_1' ) + GraphLoopsGates_1.SetAuthor( 'JR' ) + GraphLoopsGates_1.SetComment( '' ) + GraphLoopsGates_1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphLoopsGates_1.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'localhost/FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 230 , 76 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + Add_1 = GraphLoopsGates_1.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add_1.SetName( 'Add_1' ) + Add_1.SetAuthor( '' ) + Add_1.SetContainer( 'localhost/FactoryServer' ) + Add_1.SetComment( 'Add from AddComponent' ) + Add_1.Coords( 225 , 304 ) + IAdd_1x = Add_1.GetInPort( 'x' ) + IAdd_1y = Add_1.GetInPort( 'y' ) + IAdd_1Gate = Add_1.GetInPort( 'Gate' ) + OAdd_1FuncValue = Add_1.GetOutPort( 'FuncValue' ) + OAdd_1z = Add_1.GetOutPort( 'z' ) + OAdd_1Gate = Add_1.GetOutPort( 'Gate' ) + + Sub = GraphLoopsGates_1.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'localhost/FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 447 , 77 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + Sub_1 = GraphLoopsGates_1.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub_1.SetName( 'Sub_1' ) + Sub_1.SetAuthor( '' ) + Sub_1.SetContainer( 'localhost/FactoryServer' ) + Sub_1.SetComment( 'Sub from SubComponent' ) + Sub_1.Coords( 448 , 304 ) + ISub_1x = Sub_1.GetInPort( 'x' ) + ISub_1y = Sub_1.GetInPort( 'y' ) + ISub_1Gate = Sub_1.GetInPort( 'Gate' ) + OSub_1z = Sub_1.GetOutPort( 'z' ) + OSub_1Gate = Sub_1.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PyGate = [] + PyGate.append( 'from time import * ' ) + PyGate.append( 'def Gate(G1,G2) : ' ) + PyGate.append( ' sleep(1) ' ) + PyGate.append( ' return G1&G2 ' ) + Gate = GraphLoopsGates_1.INode( 'Gate' , PyGate ) + Gate.SetName( 'Gate' ) + Gate.SetAuthor( '' ) + Gate.SetComment( 'Compute Node' ) + Gate.Coords( 640 , 224 ) + IGateG1 = Gate.InPort( 'G1' , 'long' ) + IGateG2 = Gate.InPort( 'G2' , 'long' ) + IGateGate = Gate.GetInPort( 'Gate' ) + OGateG = Gate.OutPort( 'G' , 'long' ) + OGateGate = Gate.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInit = [] + PyInit.append( 'from time import * ' ) + PyInit.append( 'def Init(Index,Min,Max) : ' ) + PyInit.append( ' Index = Min ' ) + PyInit.append( ' sleep(1) ' ) + PyInit.append( ' return Index,Min,Max ' ) + PyMoreInit = [] + PyMoreInit.append( 'def More(Index,Min,Max) : ' ) + PyMoreInit.append( ' if Index < Max : ' ) + PyMoreInit.append( ' DoLoop = 1 ' ) + PyMoreInit.append( ' else : ' ) + PyMoreInit.append( ' DoLoop = 0 ' ) + PyMoreInit.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInit = [] + PyNextInit.append( 'from time import * ' ) + PyNextInit.append( 'def Next(Index,Min,Max) : ' ) + PyNextInit.append( ' Index = Index + 1 ' ) + PyNextInit.append( ' sleep(1) ' ) + PyNextInit.append( ' return Index,Min,Max ' ) + Init,EndInit = GraphLoopsGates_1.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + EndInit.SetName( 'EndInit' ) + EndInit.SetAuthor( '' ) + EndInit.SetComment( 'Compute Node' ) + EndInit.Coords( 851 , 200 ) + PyEndInit = [] + EndInit.SetPyFunction( 'EndInit' , PyEndInit ) + IInitDoLoop = Init.GetInPort( 'DoLoop' ) + IInitIndex = Init.InPort( 'Index' , 'long' ) + IInitMin = Init.InPort( 'Min' , 'long' ) + IInitMax = Init.InPort( 'Max' , 'long' ) + IInitGate = Init.GetInPort( 'Gate' ) + OInitDoLoop = Init.GetOutPort( 'DoLoop' ) + OInitIndex = Init.GetOutPort( 'Index' ) + OInitMin = Init.GetOutPort( 'Min' ) + OInitMax = Init.GetOutPort( 'Max' ) + IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' ) + IEndInitIndex = EndInit.GetInPort( 'Index' ) + IEndInitMin = EndInit.GetInPort( 'Min' ) + IEndInitMax = EndInit.GetInPort( 'Max' ) + IEndInitGate = EndInit.GetInPort( 'Gate' ) + OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' ) + OEndInitIndex = EndInit.GetOutPort( 'Index' ) + OEndInitMin = EndInit.GetOutPort( 'Min' ) + OEndInitMax = EndInit.GetOutPort( 'Max' ) + OEndInitGate = EndInit.GetOutPort( 'Gate' ) + Init.SetName( 'Init' ) + Init.SetAuthor( '' ) + Init.SetComment( 'Compute Node' ) + Init.Coords( 29 , 251 ) + + PyInit_1 = [] + PyInit_1.append( 'from time import * ' ) + PyInit_1.append( 'def Init_1(Index,Min,Max) : ' ) + PyInit_1.append( ' Index = Min ' ) + PyInit_1.append( ' sleep(1) ' ) + PyInit_1.append( ' return Index,Min,Max ' ) + PyMoreInit_1 = [] + PyMoreInit_1.append( 'def More_1(Index,Min,Max) : ' ) + PyMoreInit_1.append( ' if Index < Max : ' ) + PyMoreInit_1.append( ' DoLoop = 1 ' ) + PyMoreInit_1.append( ' else : ' ) + PyMoreInit_1.append( ' DoLoop = 0 ' ) + PyMoreInit_1.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInit_1 = [] + PyNextInit_1.append( 'from time import * ' ) + PyNextInit_1.append( 'def Next_1(Index,Min,Max) : ' ) + PyNextInit_1.append( ' Index = Index + 1 ' ) + PyNextInit_1.append( ' sleep(1) ' ) + PyNextInit_1.append( ' return Index,Min,Max ' ) + Init_1,EndInit_1 = GraphLoopsGates_1.LNode( 'Init_1' , PyInit_1 , 'More_1' , PyMoreInit_1 , 'Next_1' , PyNextInit_1 ) + EndInit_1.SetName( 'EndInit_1' ) + EndInit_1.SetAuthor( '' ) + EndInit_1.SetComment( 'Compute Node' ) + EndInit_1.Coords( 1049 , 201 ) + PyEndInit_1 = [] + EndInit_1.SetPyFunction( 'EndInit_1' , PyEndInit_1 ) + IInit_1DoLoop = Init_1.GetInPort( 'DoLoop' ) + IInit_1Index = Init_1.InPort( 'Index' , 'long' ) + IInit_1Min = Init_1.InPort( 'Min' , 'long' ) + IInit_1Max = Init_1.InPort( 'Max' , 'long' ) + IInit_1Gate = Init_1.GetInPort( 'Gate' ) + OInit_1DoLoop = Init_1.GetOutPort( 'DoLoop' ) + OInit_1Index = Init_1.GetOutPort( 'Index' ) + OInit_1Min = Init_1.GetOutPort( 'Min' ) + OInit_1Max = Init_1.GetOutPort( 'Max' ) + IEndInit_1DoLoop = EndInit_1.GetInPort( 'DoLoop' ) + IEndInit_1Index = EndInit_1.GetInPort( 'Index' ) + IEndInit_1Min = EndInit_1.GetInPort( 'Min' ) + IEndInit_1Max = EndInit_1.GetInPort( 'Max' ) + IEndInit_1Gate = EndInit_1.GetInPort( 'Gate' ) + OEndInit_1DoLoop = EndInit_1.GetOutPort( 'DoLoop' ) + OEndInit_1Index = EndInit_1.GetOutPort( 'Index' ) + OEndInit_1Min = EndInit_1.GetOutPort( 'Min' ) + OEndInit_1Max = EndInit_1.GetOutPort( 'Max' ) + OEndInit_1Gate = EndInit_1.GetOutPort( 'Gate' ) + Init_1.SetName( 'Init_1' ) + Init_1.SetAuthor( '' ) + Init_1.SetComment( 'Compute Node' ) + Init_1.Coords( 9 , 24 ) + + # Creation of Links + LInitIndexEndInitIndex = GraphLoopsGates_1.Link( OInitIndex , IEndInitIndex ) + + LInitIndexSubx = GraphLoopsGates_1.Link( OInitIndex , ISubx ) + + LInitMinEndInitMin = GraphLoopsGates_1.Link( OInitMin , IEndInitMin ) + + LInitMinSuby = GraphLoopsGates_1.Link( OInitMin , ISuby ) + + LInitMinSub_1x = GraphLoopsGates_1.Link( OInitMin , ISub_1x ) + + LInitMaxEndInitMax = GraphLoopsGates_1.Link( OInitMax , IEndInitMax ) + + LInitMaxSub_1y = GraphLoopsGates_1.Link( OInitMax , ISub_1y ) + + LInitGateAdd_1Gate = GraphLoopsGates_1.Link( OInitGate , IAdd_1Gate ) + + LInitGateAddGate = GraphLoopsGates_1.Link( OInitGate , IAddGate ) + + LEndInitGateEndInit_1Gate = GraphLoopsGates_1.Link( OEndInitGate , IEndInit_1Gate ) + + LAddGateSubGate = GraphLoopsGates_1.Link( OAddGate , ISubGate ) + + LAdd_1GateSub_1Gate = GraphLoopsGates_1.Link( OAdd_1Gate , ISub_1Gate ) + + LSubGateGateG1 = GraphLoopsGates_1.Link( OSubGate , IGateG1 ) + + LSub_1GateGateG2 = GraphLoopsGates_1.Link( OSub_1Gate , IGateG2 ) + + LGateGEndInitGate = GraphLoopsGates_1.Link( OGateG , IEndInitGate ) + + LInit_1IndexEndInit_1Index = GraphLoopsGates_1.Link( OInit_1Index , IEndInit_1Index ) + + LInit_1MinEndInit_1Min = GraphLoopsGates_1.Link( OInit_1Min , IEndInit_1Min ) + + LInit_1MaxEndInit_1Max = GraphLoopsGates_1.Link( OInit_1Max , IEndInit_1Max ) + + LInit_1GateInitGate = GraphLoopsGates_1.Link( OInit_1Gate , IInitGate ) + LInit_1GateInitGate.AddCoord( 1 , 9 , 346 ) + LInit_1GateInitGate.AddCoord( 2 , 9 , 199 ) + LInit_1GateInitGate.AddCoord( 3 , 194 , 199 ) + LInit_1GateInitGate.AddCoord( 4 , 194 , 119 ) + + # Input datas + IInitIndex.Input( 0 ) + IInitMin.Input( 5 ) + IInitMax.Input( 8 ) + IAddx.Input( 1 ) + IAddy.Input( 2 ) + IAdd_1x.Input( 3 ) + IAdd_1y.Input( 4 ) + IInit_1Index.Input( 0 ) + IInit_1Min.Input( 1 ) + IInit_1Max.Input( 3 ) + + # Output Ports of the graph + #OEndInitIndex = EndInit.GetOutPort( 'Index' ) + #OEndInitMin = EndInit.GetOutPort( 'Min' ) + #OEndInitMax = EndInit.GetOutPort( 'Max' ) + #OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + #OAddz = Add.GetOutPort( 'z' ) + #OAdd_1FuncValue = Add_1.GetOutPort( 'FuncValue' ) + #OAdd_1z = Add_1.GetOutPort( 'z' ) + #OSubz = Sub.GetOutPort( 'z' ) + #OSub_1z = Sub_1.GetOutPort( 'z' ) + #OEndInit_1Index = EndInit_1.GetOutPort( 'Index' ) + #OEndInit_1Min = EndInit_1.GetOutPort( 'Min' ) + #OEndInit_1Max = EndInit_1.GetOutPort( 'Max' ) + return GraphLoopsGates_1 + + +GraphLoopsGates_1 = DefGraphLoopsGates_1() diff --git a/examples/GraphLoopsGates.xml b/examples/GraphLoopsGates.xml new file mode 100644 index 0000000..38c05b6 --- /dev/null +++ b/examples/GraphLoopsGates.xml @@ -0,0 +1,692 @@ + + + + + +? + ? + GraphLoopsGates_1 + 1 + ? + +GraphLoopsGates_1 + + +long + Init__Index + +long + Init__Min + +long + Init__Max + +double + Add__x + +double + Add__y + +double + Add_1__x + +double + Add_1__y + +long + Init_1__Index + +long + Init_1__Min + +long + Init_1__Max + + +long + EndInit__Index + +long + EndInit__Min + +long + EndInit__Max + +double + Add__FuncValue + +double + Add__z + +double + Add_1__FuncValue + +double + Add_1__z + +double + Sub__z + +double + Sub_1__z + +long + EndInit_1__Index + +long + EndInit_1__Min + +long + EndInit_1__Max + + + 7/1/2005 - 16:57:1 + 7/1/2005 - 17:57:7 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + Init + 4 + EndInit + +Init + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +Init + + + + + + +More + + + + + + + +Next + + + + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + ? + Compute Node + 29 + 251 + +? + ? + EndInit + 5 + Init + +EndInit + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndInit + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + ? + Compute Node + 851 + 200 + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 230 + 76 + +AddComponent + AddComponent + Add_1 + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 225 + 304 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 447 + 77 + +SubComponent + SubComponent + Sub_1 + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 448 + 304 + +? + ? + Gate + 3 + ? + +Gate + + +long + G1 + +long + G2 + + +long + G + + + +Gate + + + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + ? + Compute Node + 640 + 224 + +? + ? + Init_1 + 4 + EndInit_1 + +Init_1 + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +Init_1 + + + + + + +More_1 + + + + + + + +Next_1 + + + + + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + ? + Compute Node + 9 + 24 + +? + ? + EndInit_1 + 5 + Init_1 + +EndInit_1 + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndInit_1 + + 7/1/2005 - 17:57:7 + 7/1/2005 - 17:57:7 + 2.0 + ? + ? + Compute Node + 1049 + 201 + + +Init + DoLoop + EndInit + DoLoop + + +Init + Index + EndInit + Index + + +Init + Index + Sub + x + + +Init + Min + EndInit + Min + + +Init + Min + Sub + y + + +Init + Min + Sub_1 + x + + +Init + Max + EndInit + Max + + +Init + Max + Sub_1 + y + + +Init + Gate + Add_1 + Gate + + +Init + Gate + Add + Gate + + +EndInit + DoLoop + Init + DoLoop + + +EndInit + Gate + EndInit_1 + Gate + + +Add + Gate + Sub + Gate + + +Add_1 + Gate + Sub_1 + Gate + + +Sub + Gate + Gate + G1 + + +Sub_1 + Gate + Gate + G2 + + +Gate + G + EndInit + Gate + + +Init_1 + DoLoop + EndInit_1 + DoLoop + + +Init_1 + Index + EndInit_1 + Index + + +Init_1 + Min + EndInit_1 + Min + + +Init_1 + Max + EndInit_1 + Max + + +Init_1 + Gate + Init + Gate + + +9 + 346 + +9 + 199 + +194 + 199 + +194 + 119 + +EndInit_1 + DoLoop + Init_1 + DoLoop + + + +GraphLoopsGates_1 + Init__Index + Init + Index + +3 + 0 + + +GraphLoopsGates_1 + Init__Min + Init + Min + +3 + 5 + + +GraphLoopsGates_1 + Init__Max + Init + Max + +3 + 8 + + +GraphLoopsGates_1 + Add__x + Add + x + +7 + 1 + + +GraphLoopsGates_1 + Add__y + Add + y + +7 + 2 + + +GraphLoopsGates_1 + Add_1__x + Add_1 + x + +7 + 3 + + +GraphLoopsGates_1 + Add_1__y + Add_1 + y + +7 + 4 + + +GraphLoopsGates_1 + Init_1__Index + Init_1 + Index + +3 + 0 + + +GraphLoopsGates_1 + Init_1__Min + Init_1 + Min + +3 + 1 + + +GraphLoopsGates_1 + Init_1__Max + Init_1 + Max + +3 + 3 +