Example #1
0
def OMNodeVSMNodeTest():
    factory = GridNetworkFactory(makeOMNode(0),Queues)
    result = mainProcessCtrl(factory=factory,rateList=gobalRateList,threadNum=3)
    py.plot(gobalRateList,result,label ='bp')
    for m in [2,4]:
        factory = GridNetworkFactory(makeOMNode(m),Queues)
        result = mainProcessCtrl(factory=factory,rateList=gobalRateList,threadNum=3)
        py.plot(gobalRateList,result,'--',label ='om=%d'%m)

        factory = GridNetworkFactory(makeMNode(m),Queues)
        result = mainProcessCtrl(factory=factory,rateList=gobalRateList,threadNum=3)
        py.plot(gobalRateList,result,label ='m=%d'%m)
    py.legend(loc=0)
    py.show()
Example #2
0
def differentOMNodeModeTest():
    for m in [0,2,4,10]:
        factory = GridNetworkFactory(makeOMNode(m),Queues)
        result = mainProcessCtrl(factory=factory,rateList=gobalRateList,threadNum=3)
        py.plot(gobalRateList,result,label ='om=%d'%m)
    py.legend(loc=0)
    py.show()
Example #3
0
def differentOMNodeModeTest():
    for m in [0, 2, 4, 10]:
        factory = GridNetworkFactory(makeOMNode(m), Queues)
        result = mainProcessCtrl(factory=factory,
                                 rateList=gobalRateList,
                                 threadNum=3)
        py.plot(gobalRateList, result, label='om=%d' % m)
    py.legend(loc=0)
    py.show()
Example #4
0
def OMNodeVSMNodeTest():
    factory = GridNetworkFactory(makeOMNode(0), Queues)
    result = mainProcessCtrl(factory=factory,
                             rateList=gobalRateList,
                             threadNum=3)
    py.plot(gobalRateList, result, label='bp')
    for m in [2, 4]:
        factory = GridNetworkFactory(makeOMNode(m), Queues)
        result = mainProcessCtrl(factory=factory,
                                 rateList=gobalRateList,
                                 threadNum=3)
        py.plot(gobalRateList, result, '--', label='om=%d' % m)

        factory = GridNetworkFactory(makeMNode(m), Queues)
        result = mainProcessCtrl(factory=factory,
                                 rateList=gobalRateList,
                                 threadNum=3)
        py.plot(gobalRateList, result, label='m=%d' % m)
    py.legend(loc=0)
    py.show()