__author__ = 'li' import json from StepByStepSimulator import * sim = StepByStepSimulator( concurrency=5, simtime=0.01, rtt=0.000001 * 100) flows = sim.geninput() flowdict = dict() for f in flows: flowdict[f.flowId] = { 'flowSize': f.flowSize, 'deadline': f.deadline, 'startTime': f.startTime, 'finishTime': f.finishTime, } with open('Out/flowdump.json', 'wb') as f: flowdump = json.dump(flowdict, f) # print json.dumps(flowdict, sort_keys=True, indent=4, separators=(',', ': ')) # TODO: next step is to create a small scenario with only 10 or less flows to get a good example for mcp
__author__ = 'li' import json from StepByStepSimulator import * sim = StepByStepSimulator(concurrency=5, simtime=0.01, rtt=0.000001 * 100) flows = sim.geninput() flowdict = dict() for f in flows: flowdict[f.flowId] = { 'flowSize': f.flowSize, 'deadline': f.deadline, 'startTime': f.startTime, 'finishTime': f.finishTime, } with open('Out/flowdump.json', 'wb') as f: flowdump = json.dump(flowdict, f) # print json.dumps(flowdict, sort_keys=True, indent=4, separators=(',', ': ')) # TODO: next step is to create a small scenario with only 10 or less flows to get a good example for mcp
__author__ = 'li' from StepByStepSimulator import * sim = StepByStepSimulator(rtt=0.000001 * 80, # 80us simtime=1, # 1s = 1000ms concurrency=5, flowsizemean=0.1, # 0.1MB = 100KB 0.1MB/100ms=100KB/100ms=8000bps=8Gbps flowddlmean=0.001 * 50, # 50ms ecn=64, # 64 packets maxbuffer=12, # 12MB linkcap=10, # 1Gbps output='results.txt') if __name__ == "__main__": for rtt in [80, 100, 120, 160]: cclist = [1, 2, 3, 4, 5, 8, 10] cclist.reverse() for concur in cclist: for size in [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]: for ddl in [20, 30, 40, 50, 60, 70, 80, 90, 100]: for cap in [10, 100, 400]: sim = StepByStepSimulator(rtt=0.000001 * rtt, simtime=0.8, concurrency=concur, flowsizemean=size, flowddlmean=0.001 * ddl, ecn=64, maxbuffer=12, linkcap=cap, output='Out/rtt{}concur{}size{}ddl{}cap{}.txt'.format(rtt,
__author__ = 'li' from StepByStepSimulator import * sim = StepByStepSimulator( rtt=0.000001 * 80, # 80us simtime=1, # 1s = 1000ms concurrency=5, flowsizemean=0.1, # 0.1MB = 100KB 0.1MB/100ms=100KB/100ms=8000bps=8Gbps flowddlmean=0.001 * 50, # 50ms ecn=64, # 64 packets maxbuffer=12, # 12MB linkcap=10, # 1Gbps output='results.txt') if __name__ == "__main__": for rtt in [80, 100, 120, 160]: cclist = [1, 2, 3, 4, 5, 8, 10] cclist.reverse() for concur in cclist: for size in [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]: for ddl in [20, 30, 40, 50, 60, 70, 80, 90, 100]: for cap in [10, 100, 400]: sim = StepByStepSimulator( rtt=0.000001 * rtt, simtime=0.8, concurrency=concur, flowsizemean=size, flowddlmean=0.001 * ddl, ecn=64, maxbuffer=12,