[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[oMetah-devel] ometah interface/ometah.cpp metaheuristic/itsMe...
From: |
NoJhan |
Subject: |
[oMetah-devel] ometah interface/ometah.cpp metaheuristic/itsMe... |
Date: |
Thu, 09 Jun 2005 09:21:02 -0400 |
CVSROOT: /cvsroot/ometah
Module name: ometah
Branch:
Changes by: NoJhan <address@hidden> 05/06/09 13:21:02
Modified files:
interface : ometah.cpp
metaheuristic : itsMetaheuristic.cpp itsMetaheuristic.hpp
Log message:
* xml output
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/interface/ometah.cpp.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/metaheuristic/itsMetaheuristic.cpp.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/metaheuristic/itsMetaheuristic.hpp.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: ometah/interface/ometah.cpp
diff -u ometah/interface/ometah.cpp:1.36 ometah/interface/ometah.cpp:1.37
--- ometah/interface/ometah.cpp:1.36 Thu Jun 9 13:12:24 2005
+++ ometah/interface/ometah.cpp Thu Jun 9 13:21:02 2005
@@ -1,5 +1,5 @@
/***************************************************************************
- * $Id: ometah.cpp,v 1.36 2005/06/09 13:12:24 jpa Exp $
+ * $Id: ometah.cpp,v 1.37 2005/06/09 13:21:02 nojhan Exp $
* Copyright : Université Paris 12 Val-de-Marne
* (61 avenue du Général de Gaulle, 94010, Créteil, France)
* Author : Johann Dréo <address@hidden>
@@ -331,8 +331,12 @@
<< " on " << setProblem.item()->getName()
<< " using " << setCommunicationClient.item()->getKey() << endl;
- //clog << setProblem.item()->getName() << " description:" << endl;
- //clog << setProblem.item()->getInformations() << endl;
+
+ setMetaheuristic.item()->setOutProcessResult(&cout);
+ cout << "<? xml-version=\"1.0\" encoding=\"iso-8859-15\" ?>" << endl;
+ cout << setProblem.item()->getInformations_XML() << endl;
+ cout << setMetaheuristic.item()->getInformations_XML() << endl;
+ cout << "<ometah>" << endl;
try {
setMetaheuristic.item()->start();
@@ -346,5 +350,7 @@
catch (...) {
cerr << "Unknown error" << endl;
}
+
+ cout << "</ometah>" << endl;
}
Index: ometah/metaheuristic/itsMetaheuristic.cpp
diff -u ometah/metaheuristic/itsMetaheuristic.cpp:1.23
ometah/metaheuristic/itsMetaheuristic.cpp:1.24
--- ometah/metaheuristic/itsMetaheuristic.cpp:1.23 Thu Jun 9 12:56:31 2005
+++ ometah/metaheuristic/itsMetaheuristic.cpp Thu Jun 9 13:21:02 2005
@@ -1,5 +1,5 @@
/****************************************************************************
- * $Id: itsMetaheuristic.cpp,v 1.23 2005/06/09 12:56:31 nojhan Exp $
+ * $Id: itsMetaheuristic.cpp,v 1.24 2005/06/09 13:21:02 nojhan Exp $
* Copyright : Université Paris 12 Val-de-Marne
* (61 avenue du Général de Gaulle, 94010, Créteil, France)
* Authors : Walid Tfaili <address@hidden>
@@ -131,6 +131,11 @@
*outProcessResult << "<step class=\"" << "start" << ">" << endl;
outputSample();
*outProcessResult << "</step>" << endl;
+
+ *outProcessResult << "<evaluations>";
+ *outProcessResult << getEvaluationNumber();
+ *outProcessResult << "</evaluations>" << endl;
+
*outProcessResult << "</iteration>" << endl;
@@ -181,7 +186,9 @@
*outProcessResult << "</step>" << endl;
- *outProcessResult << "<evaluations>" << "?" << "</evaluations>" << endl;
// FIXME : nombre d'évaluations
+ *outProcessResult << "<evaluations>";
+ *outProcessResult << getEvaluationNumber();
+ *outProcessResult << "</evaluations>" << endl;
*outProcessResult << "</iteration>" << endl;
@@ -380,6 +387,10 @@
{
itsPoint res = this->problem->call(p);
printDebug("evaluations",res.getValues().size());
+
+ // increment the evaluation counter
+ this->evaluationsNumber++;
+
return res;
}
@@ -454,3 +465,9 @@
{
this->outDebug = out;
}
+
+
+unsigned int itsMetaheuristic::getEvaluationNumber()
+{
+ return this->evaluationsNumber;
+}
Index: ometah/metaheuristic/itsMetaheuristic.hpp
diff -u ometah/metaheuristic/itsMetaheuristic.hpp:1.21
ometah/metaheuristic/itsMetaheuristic.hpp:1.22
--- ometah/metaheuristic/itsMetaheuristic.hpp:1.21 Thu Jun 9 12:56:32 2005
+++ ometah/metaheuristic/itsMetaheuristic.hpp Thu Jun 9 13:21:02 2005
@@ -1,5 +1,5 @@
/***************************************************************************
- * $Id: itsMetaheuristic.hpp,v 1.21 2005/06/09 12:56:32 nojhan Exp $
+ * $Id: itsMetaheuristic.hpp,v 1.22 2005/06/09 13:21:02 nojhan Exp $
* Copyright : Université Paris 12 Val-de-Marne
* (61 avenue du Général de Gaulle, 94010, Créteil, France)
* Author : Walid Tfaili <address@hidden>
@@ -123,6 +123,9 @@
*/
unsigned int iterationsMaxNumber;
+ //! The true evaluations number
+ unsigned int evaluationsNumber;
+
//! Stream for the main result of the optimization
/*!
This is used for the output of the global optimum point
@@ -254,6 +257,9 @@
//! Change the maximum iterations number
void setIterationsMaxNumber(unsigned int nbr);
+ //! Return the current number of evaluationsNumber
+ unsigned int getEvaluationNumber();
+
//! Return the key
string getKey();
//! Change the key
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [oMetah-devel] ometah interface/ometah.cpp metaheuristic/itsMe...,
NoJhan <=