Exemple #1
0
 def run(self, results):
     name = self.getValueOfParameter("objective function parameter")
     iteration = findBestIterationNumber(results,name)
     bestvalue = -1
     if(iteration > -1):
         bestvalue = results[iteration].getObjectiveFunctionParameterResults(name)[0]
     
     title = "Best result"
     values = (name, str(iteration), str(bestvalue) )
     text = "Name: %s Iteration: %s Value: %s" % values
     QMessageBox.information(QApplication.activeWindow(),title,text)
     return True
Exemple #2
0
 def run(self, results):
     if(not(results.__len__())):
         return False
     
     names = results[0].getNamesOfObjectiveFunctionParameters()
     title = "Best results"
     messagetext = ""
     
     for name in names:
         iteration = findBestIterationNumber(results,name)
         bestvalue = -1
         if(iteration > -1):
             bestvalue = results[iteration].getObjectiveFunctionParameterResults(name)[0]
         
         values = (messagetext, name, str(iteration), bestvalue )
         messagetext =  "%sName: %s Iteration: %s Value: %f\n" % values
                                                              
     QMessageBox.information(QApplication.activeWindow(),title,messagetext)                                                       
     return True