ometah-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[oMetah-devel] ometah/experiment metahtest.py


From: Jean-Philippe Aumasson
Subject: [oMetah-devel] ometah/experiment metahtest.py
Date: Fri, 10 Jun 2005 06:41:29 -0400

CVSROOT:        /cvsroot/ometah
Module name:    ometah
Branch:         
Changes by:     Jean-Philippe Aumasson <address@hidden> 05/06/10 10:41:29

Modified files:
        experiment     : metahtest.py 

Log message:
        * added pb and metah infos, and execution time in log

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/experiment/metahtest.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text

Patches:
Index: ometah/experiment/metahtest.py
diff -u ometah/experiment/metahtest.py:1.13 ometah/experiment/metahtest.py:1.14
--- ometah/experiment/metahtest.py:1.13 Fri Jun 10 09:17:15 2005
+++ ometah/experiment/metahtest.py      Fri Jun 10 10:41:29 2005
@@ -81,13 +81,11 @@
 
 D fonction pour d├ęplacer le fichier de log
 
-copier valeur Header dans log
-
-Header.toString : pour mettre dans le log
+D Header.toString : pour mettre dans le log
 
 nettoyer le code, le lisibiliser
 
-print execution time in log
+D print execution time in log
 
 /----
 
@@ -285,7 +283,16 @@
     
     def toString(self):
         """ return a long string with long description """
-        return "s"
+        m = self.metah
+        p = self.problem
+        s = '\n--------------------\nInformations\n---------------------\n'
+        s += 'Metaheuristic:\n name: %s\n key: %s\n family: %s\n acronym: 
%s\n' % \
+            (m.name, m.key,  m.family, m.acronym)
+        s += ' description: %s\n' % \
+             (m.description)
+        s += '\nProblem:\n name: %s\n key: %s\n description: %s\n formula: 
%s\n' % \
+             (p.name, p.key, p.description, p.dimension)        
+        return s
 
     def getTitle(self):
         """ return a short string for titling files """
@@ -421,6 +428,8 @@
     # plan B for r.bitmap's segfault : move all png and ps files to our 
working directory
     cmd = 'mv *.png *.ps %s &> /dev/null' % (newpath)
     os.system(cmd)
+
+    intfc.log(header.toString())
      
     slog = "\nTotal time : %f\n" %  ( time.time()-t )
     intfc.log(slog)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]