Example #1
0
 def __init__(self,num_objectives, mutation_rate=0.1, crossover_rate=1.0,TargetPoint=[]):
     NSGA_II.__init__(self,num_objectives,mutation_rate,crossover_rate)
     NSGA_II.Is_Dominance_Handle         = self.Is_Dominance
     NSGA_II.Evolve_A_Generation_Handle  = self.Evolve_A_Generation
     NSGA_II.crowded_comparison_Handle   = self.crowded_comparison
     
     self.TargetPoint = TargetPoint
     
     self.Infeasible_Degree_Threshold = 0.0 #不可行度
Example #2
0
 def __init__(self,num_objectives, mutation_rate=0.1, crossover_rate=1.0,TargetPoint=[]):
     '''
     function:初始化
     para:1、num_objectives 目标函数个数  2、mutation_rate 变异率  3、crossover_rate 交叉率 4、TargetPoint 目标点
     '''
     NSGA_II.__init__(self,num_objectives,mutation_rate,crossover_rate)
     NSGA_II.Is_Dominance_Handle         = self.Is_Dominance
     NSGA_II.Evolve_A_Generation_Handle  = self.Evolve_A_Generation
     NSGA_II.crowded_comparison_Handle   = self.crowded_comparison
     
     self.TargetPoint = TargetPoint
     self.Num_generations = -1
     
     self.Infeasible_Degree_Threshold = 0.0 #不可行度
     self.R_Dominance_Threshol = 0.0     #R支配阈值
     self.MaxR_Dist = 0.0
     self.MinR_Dist = 0.0
Example #3
0
 def crowded_comparison(self, s1, s2):
     return NSGA_II.crowded_comparison(self, s1, s2)
     
Example #4
0
 def Evolve_A_Generation(self, Generation, Population, population_size):       
     return NSGA_II.Evolve_A_Generation(self, Generation, Population, population_size)
Example #5
0
 def Is_Dominance(self, Fir_Individual, Sec_Individual):    
     return NSGA_II.Is_Dominance(self, Fir_Individual, Sec_Individual)     
Example #6
0
    def run(self, Init_Population, population_size, num_generations):

        return NSGA_II.run(self, Init_Population, population_size, num_generations)