Exemplo n.º 1
0
 def ave_tc(self):
     for i in range(len(self.lengths_of_system)):
         ave_tc = 0.0
         model = RelaxModel(0.5, self.lengths_of_system[i], self.times)
         model.start()
         model.cross_over_time()
         for j in range(len(model.ave_slop)):
             self.ave_tc = self.ave_tc + model.ave_slop[i]*(i+1)
         self.ave_tc_list.append(ave_tc)
Exemplo n.º 2
0
def ave_tc(number_of_piles):
    lengths_of_system = [4, 8, 16, 32, 64, 128, 256]
    all_tc_list = []
    times = 100000
    for i in range(len(lengths_of_system)):
        ave_tc_list = []
        for j in range(number_of_piles):
            model = RelaxModel(0.5, lengths_of_system[i], times)
            model.start()
            model.cross_over_time()
            ave_tc_list.append(model.t_c)
        all_tc_list.append(sum(ave_tc_list) / len(ave_tc_list))
    return all_tc_list