def main(load): print "calculating on", load, "load" f = open("./Dataset/flow_"+str(load)+"Load.tr").readlines() #Flow info is array: [size fct oracle_fct norm_fct] ideal_fct = ideal.get_ideal_fcts(f, 2.5) out = open("./Dataset/ideal_"+str(load)+"Result.txt", "w") for fct in ideal_fct: out.write(str(fct)+'\n') print "finish", load
def main(): f = open(sys.argv[1]).readlines() ideal_fct = ideal.get_ideal_fcts(f, 0, True) f2 = open(sys.argv[2], 'w') for x in ideal_fct: for y in x: f2.write(str(y) + " ") f2.write("\n") f2.close()
def main(): f = open(sys.argv[1]).readlines() #Flow info is array: [size fct oracle_fct norm_fct] #flow_info = parse.get_flow_info_new(f, 2.5) #Dictionary with indices as keys ideal_fct = ideal.get_ideal_fcts(f, 2.5) #inorm_fct_ideal = [x / y[2] for x, y in zip(ideal_fct, flow_info)] #print numpy.mean(norm_fct_ideal), numpy.mean([x[3] for x in flow_info]) f2 = open(sys.argv[2], 'w') for x in ideal_fct: f2.write(str(x) + "\n") f2.close()
def main(): f = open(sys.argv[1]).readlines() #Flow info is array: [size fct oracle_fct norm_fct] #flow_info = parse.get_flow_info_new(f, 2.5) #Dictionary with indices as keys ideal_fct = ideal.get_ideal_fcts(f, 0) #inorm_fct_ideal = [x / y[2] for x, y in zip(ideal_fct, flow_info)] #print numpy.mean(norm_fct_ideal), numpy.mean([x[3] for x in flow_info]) f2 = open(sys.argv[2], 'w') for x in ideal_fct: f2.write(str(x) + "\n") f2.close()
def main(): loads = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8] for l in loads: print "calculating on", l, "load" f = open("./Dataset/pfabric_aditya_" + str(l) + ".tr").readlines() #Flow info is array: [size fct oracle_fct norm_fct] ideal_fct = ideal.get_ideal_fcts(f, 2.5) out = open("./Dataset/ideal_aditya_" + str(l) + ".txt", "w") for fct in ideal_fct: out.write(str(fct) + '\n') print "finish", l
def main(): loads = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8] for l in loads: print "calculating on", l, "load" f = open("./Dataset/pfabric_aditya_"+str(l)+".tr").readlines() #Flow info is array: [size fct oracle_fct norm_fct] ideal_fct = ideal.get_ideal_fcts(f, 2.5) out = open("./Dataset/ideal_aditya_"+str(l)+".txt", "w") for fct in ideal_fct: out.write(str(fct)+'\n') print "finish", l
def main(): loads = ['0.8Load_xxlarge'] #, '0.8_xlarge'] for l in loads: print "calculating on", l, "load" f = open("./Dataset/flow_" + str(l) + ".tr").readlines()[:-1] #Flow info is array: [size fct oracle_fct norm_fct] print "Read" ideal_fct = ideal.get_ideal_fcts(f, 2.5) print "Computed" out = open("./Dataset/ideal_" + str(l) + "_redone.txt", "w") for fct in ideal_fct: out.write(str(fct) + '\n') print "finish", l