本文整理汇总了Python中Simulator.Simulator.runExperiment方法的典型用法代码示例。如果您正苦于以下问题:Python Simulator.runExperiment方法的具体用法?Python Simulator.runExperiment怎么用?Python Simulator.runExperiment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Simulator.Simulator
的用法示例。
在下文中一共展示了Simulator.runExperiment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runLDPCTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runLDPCTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 648*5/6},
'code': {'type': 'ldpc',
'n': 648,
'rate': (5,6),
'bitsPerSymbol': 3},
'map': {'type': 'gray',
'bitsPerSymbol': 3,
'precisionBits': 14},
'channel': {'type': 'AWGN',
'SNR_dB': 17.8},
'demap': {'type': 'ml-gray',
'SNR_dB': 17.8},
'decoder': {'type': 'ldpc-float-bp',
'numIter': 40},
'detector': {'type': 'oracle'},
'protocol': {'type': 'one-try',
'numSymbols': 648/3},
'statistics': {'type': 'errors'}
}
runner = Simulator(0)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().randint(0,4294967295,4),
100)
print str(res)
示例2: runCoherenceFadingTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runCoherenceFadingTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 300},
'code': {'type': 'spinal',
'puncturing': {'type': '8-way-v2',
'numLastCodeStep': 2},
'hash': 'one-at-a-time',
'bitsPerSymbol': 10,
'k': 3},
'map': {'type': 'soft',
'bitsPerSymbol': 10},
'channel': {'type': 'coherence-fading',
'interval': 10,
'SNR_dB': 10},
'demap': {'type': 'null'},
'decoder': {'type': 'regular',
'beamWidth': 16,
'maxPasses': 48*8},
'detector': {'type': 'oracle'},
'protocol': {'type': 'sequential',
'maxPasses': 48*8},
'statistics': {'type': 'errors'}
}
runner = Simulator(1)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
100)
print str(res)
示例3: runRateApproxProtocolTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runRateApproxProtocolTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 24},
'code': {'type': 'spinal',
'puncturing': {'type': '8-way-v2',
'numLastCodeStep': 2},
'hash': 'one-at-a-time',
'bitsPerSymbol': 10,
'k': 4},
'map': {'type': 'linear',
'bitsPerSymbol': 10,
'precisionBits': 14},
'channel': {'type': 'AWGN',
'SNR_dB': 10},
'demap': {'type': 'null'},
'decoder': {'type': 'regular',
'beamWidth': 16,
'maxPasses': 48*8},
'detector': {'type': 'oracle'},
'protocol': {'type': 'rate-approx',
'maxSymbols': 48*7,
'delta': 0.99},
'statistics': {'type': 'errors'}
}
if 1==0:
experimentSpec['protocol'] = {'type': 'sequential', 'maxPasses':48*8}
runner = Simulator(1)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
500)
print str(res)
示例4: runTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 300},
'code': {'type': 'spinal',
'puncturing': {'type': '8-way-v2',
'numLastCodeStep': 2},
'hash': 'one-at-a-time',
'bitsPerSymbol': 10,
'k': 3},
'map': {'type': 'linear',
'bitsPerSymbol': 10,
'precisionBits': 14},
'channel': {'type': 'AWGN',
'SNR_dB': 10},
'demap': {'type': 'null'},
'decoder': {'type': 'regular',
'beamWidth': 16,
'maxPasses': 48*8},
'detector': {'type': 'oracle'},
'protocol': {'type': 'sequential',
'maxPasses': 48*8},
'statistics': {'type': 'errors'}
}
runner = Simulator(2)
logging.debug('runtest begin');
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().randint(0,4294967295,4),
100)
print str(res)
示例5: runGaussianTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runGaussianTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 300},
'code': {'type': 'spinal',
'puncturing': {'type': '8-way-v2',
'numLastCodeStep': 2},
'hash': 'one-at-a-time',
'bitsPerSymbol': 10,
'k': 3},
'map': {'type': 'trunc-norm-v2',
'bitsPerSymbol': 10,
'precisionBits': 14,
'numStandardDevs': 0.1},
'channel': {'type': 'AWGN',
'SNR_dB': 10},
'demap': {'type': 'null'},
'decoder': {'type': 'regular',
'beamWidth': 16,
'maxPasses': 48*8},
'detector': {'type': 'oracle'},
'protocol': {'type': 'sequential',
'maxPasses': 48*8},
'statistics': {'type': 'errors'}
}
runner = Simulator(1)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4) % 4294967295,
100)
print str(res)
示例6: runBscLDPCTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runBscLDPCTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 648*2/3},
'code': {'type': 'ldpc',
'n': 648,
'rate': (2,3),
'bitsPerSymbol': 1},
'map': {'type': 'linear',
'bitsPerSymbol': 1,
'precisionBits': 1},
'channel': {'type': 'BSC',
'flipProb': 0.04},
'demap': {'type': 'BSC',
'flipProb': 0.04},
'decoder': {'type': 'ldpc-float-bp',
'numIter': 40},
'detector': {'type': 'oracle'},
'protocol': {'type': 'one-try',
'numSymbols': 648},
'statistics': {'type': 'errors'}
}
runner = Simulator(0)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
100)
print str(res)
示例7: runRaptorTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runRaptorTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 9500},
'code': {'type': 'raptor'},
'map': {'type': 'QAM',
'bitsPerSymbol': 6},
'channel': {'type': 'AWGN_c',
'SNR_dB': 20},
'demap': {'type': 'QAM',
'useApprox': True},
'decoder': {'type': 'raptor',
'numIter': 40},
'detector': {'type': 'oracle'},
'protocol': {'type': 'rate-approx',
'maxSymbols': 11500,
'delta': 0.97,
'minSymbols':1280},
'statistics': {'type': 'errors'}
}
runner = Simulator(2)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
3)
print str(res)
示例8: runFirstErrorStatisticsTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runFirstErrorStatisticsTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 256},
'code': {'type': 'spinal',
'puncturing': {'type': '8-way-v2',
'numLastCodeStep': 2},
'hash': 'one-at-a-time',
'bitsPerSymbol': 10,
'k': 4},
'map': {'type': 'linear',
'bitsPerSymbol': 10,
'precisionBits': 14},
'channel': {'type': 'AWGN',
'SNR_dB': -2},
'demap': {'type': 'null'},
'decoder': {'type': 'regular',
'beamWidth': 100,
'maxPasses': 48*8},
'detector': {'type': 'oracle'},
'protocol': {'type': 'one-try',
'numSymbols': 256*2},
'statistics': {'type': 'first-error'}
}
runner = Simulator(1)
for i in xrange(10):
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
1)
print str(res),
print
示例9: runParallelKTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runParallelKTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 300},
'code': {'type': 'spinal',
'puncturing': {'type': '8-way-v2',
'numLastCodeStep': 2},
'hash': 'one-at-a-time',
'bitsPerSymbol': 10,
'k': 3},
'map': {'type': 'linear',
'bitsPerSymbol': 10,
'precisionBits': 14},
'channel': {'type': 'AWGN',
'SNR_dB': 10},
'demap': {'type': 'null'},
'decoder': {'type': 'parallel',
'alpha': 4,
'beta': 64,
'maxPasses': 48*8},
'detector': {'type': 'oracle'},
'protocol': {'type': 'sequential',
'maxPasses': 48*8},
'statistics': {'type': 'errors'}
}
runner = Simulator(1)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
10)
print str(res)
示例10: runItppQamLDPCTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runItppQamLDPCTest():
experimentSpec = {
'packetGen': {'type': 'random',
'length': 648*5/6},
'code': {'type': 'ldpc',
'n': 648,
'rate': (5,6),
'bitsPerSymbol': 1},
'map': {'type': 'QAM',
'bitsPerSymbol': 6},
'channel': {'type': 'AWGN_c',
'SNR_dB': 17.8},
'demap': {'type': 'QAM'},
'decoder': {'type': 'ldpc-float-bp',
'numIter': 40},
'detector': {'type': 'oracle'},
'protocol': {'type': 'one-try',
'numSymbols': 648/6},
'statistics': {'type': 'errors'}
}
runner = Simulator(0)
res = runner.runExperiment(experimentSpec,
numpy.random.RandomState().tomaxint(4),
100)
print str(res)
示例11: runRaptorTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runRaptorTest():
experimentSpec = {
"packetGen": {"type": "random", "length": 9500},
"code": {"type": "raptor"},
"map": {"type": "QAM", "bitsPerSymbol": 6},
"channel": {"type": "AWGN_c", "SNR_dB": 20},
"demap": {"type": "QAM", "useApprox": True},
"decoder": {"type": "raptor", "numIter": 40},
"detector": {"type": "oracle"},
"protocol": {"type": "rate-approx", "maxSymbols": 11500, "delta": 0.97, "minSymbols": 1280},
"statistics": {"type": "errors"},
}
runner = Simulator(2)
res = runner.runExperiment(experimentSpec, numpy.random.RandomState().tomaxint(4), 3)
print str(res)
示例12: runItppQamTurboTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runItppQamTurboTest():
experimentSpec = {
"packetGen": {"type": "random", "length": 1530},
"code": {"type": "turbo"},
"map": {"type": "QAM", "bitsPerSymbol": 6},
"channel": {"type": "AWGN_c", "SNR_dB": 3.2},
"demap": {"type": "QAM"},
"decoder": {"type": "regular"},
"detector": {"type": "oracle"},
"protocol": {"type": "one-try", "numSymbols": (1530 * 5 + 18) / 6},
"statistics": {"type": "errors"},
}
runner = Simulator(0)
res = runner.runExperiment(experimentSpec, numpy.random.RandomState().tomaxint(4), 100)
print str(res)
示例13: runStriderFadingTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runStriderFadingTest():
experimentSpec = {
"packetGen": {"type": "random", "length": 1498 * 33},
"code": {"type": "strider"},
"map": {"type": "null", "avgPower": 1.0},
"channel": {"type": "coherence-fading_c", "SNR_dB": 30, "interval": 100},
"demap": {"type": "null"},
"decoder": {"type": "strider-fading"},
"detector": {"type": "oracle"},
"protocol": {"type": "multiple-try", "numSymbolsList": [(3840 / 4) * i for i in xrange(1, 4 * 27 + 1)]},
"statistics": {"type": "errors"},
}
runner = Simulator(1)
res = runner.runExperiment(experimentSpec, numpy.random.RandomState().tomaxint(4), 10)
print str(res)
示例14: runShortStriderTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runShortStriderTest():
experimentSpec = {
"packetGen": {"type": "random", "length": 480 * 33},
"code": {"type": "strider", "fragmentLength": 512},
"map": {"type": "null", "avgPower": 1.0},
"channel": {"type": "AWGN_c", "SNR_dB": 30},
"demap": {"type": "null"},
"decoder": {"type": "strider"},
"detector": {"type": "oracle"},
"protocol": {"type": "multiple-try", "numSymbolsList": [(1215 / 4) * i for i in xrange(1, 4 * 27 + 1)]},
"statistics": {"type": "errors"},
}
runner = Simulator(1)
res = runner.runExperiment(experimentSpec, numpy.random.RandomState().tomaxint(4), 10)
print str(res)
示例15: runBscLDPCTest
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import runExperiment [as 别名]
def runBscLDPCTest():
experimentSpec = {
"packetGen": {"type": "random", "length": 648 * 2 / 3},
"code": {"type": "ldpc", "n": 648, "rate": (2, 3), "bitsPerSymbol": 1},
"map": {"type": "linear", "bitsPerSymbol": 1, "precisionBits": 1},
"channel": {"type": "BSC", "flipProb": 0.04},
"demap": {"type": "BSC", "flipProb": 0.04},
"decoder": {"type": "ldpc-float-bp", "numIter": 40},
"detector": {"type": "oracle"},
"protocol": {"type": "one-try", "numSymbols": 648},
"statistics": {"type": "errors"},
}
runner = Simulator(0)
res = runner.runExperiment(experimentSpec, numpy.random.RandomState().tomaxint(4), 100)
print str(res)