diff --git a/branches/newMo/src/algo/moLocalSearch.h b/branches/newMo/src/algo/moLocalSearch.h index 562cbf4ba..a8f06dc37 100644 --- a/branches/newMo/src/algo/moLocalSearch.h +++ b/branches/newMo/src/algo/moLocalSearch.h @@ -42,19 +42,19 @@ /** * the main algorithm of the local search */ -template< class NHE , class C > +template class moLocalSearch: public eoMonOp { public: typedef NHE NeighborhoodExplorer ; - typedef C Continuator ; typedef typename NeighborhoodExplorer::EOT EOT ; + typedef typename NeighborhoodExplorer::Neighborhood Neighborhood ; /** * Constructor of a moLocalSearch needs a NeighborhooExplorer and a Continuator */ - moLocalSearch(NeighborhoodExplorer& _searchExpl, Continuator & _continuator, eoEvalFunc& _fullEval) : searchExplorer(_searchExpl), continuator(_continuator), fullEval(_fullEval) { } ; + moLocalSearch(NeighborhoodExplorer& _searchExpl, moContinuator & _continuator, eoEvalFunc& _fullEval) : searchExplorer(_searchExpl), continuator(_continuator), fullEval(_fullEval) { } ; /** * Run the local search on a solution @@ -64,15 +64,14 @@ public: if(_solution.invalid()) fullEval(_solution); - - // initialization of the external continuator (for example the time, or the number of generations) - continuator.init(_solution); // initialization of the parameter of the search (for example fill empty the tabu list) searchExplorer.initParam(_solution); - //A virer par la suite - unsigned int num = 0; + // initialization of the external continuator (for example the time, or the number of generations) + continuator.init(_solution); + + bool b=continuator(_solution); do{ // explore the neighborhood of the solution @@ -85,14 +84,13 @@ public: // update the parameter of the search (for ex. Temperature of the SA) searchExplorer.updateParam(_solution); - //A virer par la suite - std::cout << num << " : " << _solution << std::endl ; - num++; - - }while (continuator(_solution) && searchExplorer.isContinue(_solution)); + b=continuator(_solution); + }while (b && searchExplorer.isContinue(_solution)); searchExplorer.terminate(_solution); + continuator.lastCall(_solution); + //A CHANGER return true; @@ -103,7 +101,7 @@ private: NeighborhoodExplorer& searchExplorer ; // external continuator - Continuator& continuator ; + moContinuator& continuator ; //full evaluation function eoEvalFunc& fullEval; diff --git a/branches/newMo/src/continuator/moCheckpoint.h b/branches/newMo/src/continuator/moCheckpoint.h new file mode 100644 index 000000000..d5ae0a45a --- /dev/null +++ b/branches/newMo/src/continuator/moCheckpoint.h @@ -0,0 +1,106 @@ +/* + + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + + Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + ParadisEO WebSite : http://paradiseo.gforge.inria.fr + Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef moCheckpoint_h +#define moCheckpoint_h + +#include +#include +#include + +template +class moCheckpoint : public moContinuator { +public : + + typedef NH Neighborhood ; + typedef typename Neighborhood::EOT EOT ; + + moCheckpoint(moContinuator& _cont) { + continuators.push_back(&_cont); + } + + void add(moContinuator& _cont) { continuators.push_back(&_cont); } + void add(moStatBase& _stat) { stats.push_back(&_stat); } + void add(eoMonitor& _mon) { monitors.push_back(&_mon); } + void add(eoUpdater& _upd) { updaters.push_back(&_upd); } + + virtual void init(EOT& _sol) { + for(unsigned i = 0; i < continuators.size(); ++i) + continuators[i]->init(_sol); + } + + virtual std::string className(void) const { return "moCheckPoint"; } + + bool operator()(EOT & _sol) { + unsigned i; + bool bContinue = true; + + for (i = 0; i < stats.size(); ++i) + (*stats[i])(_sol); + + for (i = 0; i < updaters.size(); ++i) + (*updaters[i])(); + + for (i = 0; i < monitors.size(); ++i) + (*monitors[i])(); + + for (i = 0; i < continuators.size(); ++i) + if ( !(*continuators[i])(_sol) ) + bContinue = false; + + return bContinue; + } + + void lastCall(EOT& _sol){ + unsigned int i; + for (i = 0; i < stats.size(); ++i) + stats[i]->lastCall(_sol); + + for (i = 0; i < updaters.size(); ++i) + updaters[i]->lastCall(); + + for (i = 0; i < monitors.size(); ++i) + monitors[i]->lastCall(); + } + +private : + + std::vector*> continuators; + std::vector*> stats; + std::vector monitors; + std::vector updaters; +}; + + +#endif diff --git a/branches/newMo/src/continuator/moContinuator.h b/branches/newMo/src/continuator/moContinuator.h index 2ba23d78d..92eedad84 100644 --- a/branches/newMo/src/continuator/moContinuator.h +++ b/branches/newMo/src/continuator/moContinuator.h @@ -52,6 +52,12 @@ public: * @param _solution the related solution */ virtual void init(EOT& _solution) = 0 ; + + /** + * Last Call to terminate the checkpoint + * @param _solution the related solution + */ + virtual void lastCall(EOT& _solution){} }; #endif diff --git a/branches/newMo/src/continuator/moCounterMonitorSaver.h b/branches/newMo/src/continuator/moCounterMonitorSaver.h new file mode 100644 index 000000000..ae46fb024 --- /dev/null +++ b/branches/newMo/src/continuator/moCounterMonitorSaver.h @@ -0,0 +1,79 @@ +/* + + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + + Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + ParadisEO WebSite : http://paradiseo.gforge.inria.fr + Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef moCounterMonitorSaver_h +#define moCounterMonitorSaver_h + +#include +#include + +/** + * The actual class that will be used as base for all statistics + * that need to be calculated over the solution + * It is a moStatBase AND an eoValueParam so it can be used in Monitors. + */ +class moCounterMonitorSaver : public eoUpdater { +public : + + moCounterMonitorSaver(unsigned _interval, eoMonitor& _mon) : interval(_interval), counter(0) { + monitors.push_back(&_mon); + } + + void operator()(void) { + + if (++counter % interval == 0) + for (unsigned i = 0; i < monitors.size(); ++i) + (*monitors[i])(); + + } + + void lastCall(void) { + for (unsigned i = 0; i < monitors.size(); ++i) + monitors[i]->lastCall(); + } + + void add(eoMonitor& _mon) { + monitors.push_back(&_mon); + } + + virtual std::string className(void) const { return "moCounterMonitorSaver"; } + +private : + unsigned interval, counter; + + std::vector monitors; +}; + + +#endif diff --git a/branches/newMo/src/continuator/moCounterStat.h b/branches/newMo/src/continuator/moCounterStat.h new file mode 100644 index 000000000..c0f28e0d2 --- /dev/null +++ b/branches/newMo/src/continuator/moCounterStat.h @@ -0,0 +1,72 @@ +/* + + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + + Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + ParadisEO WebSite : http://paradiseo.gforge.inria.fr + Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef moCounterStat_h +#define moCoutnerStat_h + +#include + +/** + * The actual class that will be used as base for all statistics + * that need to be calculated over the solution + * It is a moStatBase AND an eoValueParam so it can be used in Monitors. + */ +template +class moCounterStat : public moStat< EOT, T > +{ +public : + moCounterStat(unsigned int _interval, moStat & _solStat): moStat(0, "every"), interval(_interval){ + solStats.push_back(&_solStat); + } + + void add(moStat& _stat) { + solStats.push_back(&_stat); + } + + + virtual void operator()(EOT & _sol) { + if (++counter % interval == 0) + for (unsigned i = 0; i < solStats.size(); ++i) + (*solStats[i])(_sol); + } + + virtual std::string className(void) const { return "moCounterStat"; } + +private: + unsigned int counter, interval; + + std::vector* > solStats; +}; + +#endif diff --git a/branches/newMo/src/continuator/moFitnessStat.h b/branches/newMo/src/continuator/moFitnessStat.h new file mode 100644 index 000000000..ed32dbe17 --- /dev/null +++ b/branches/newMo/src/continuator/moFitnessStat.h @@ -0,0 +1,64 @@ +/* + + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + + Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + ParadisEO WebSite : http://paradiseo.gforge.inria.fr + Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef moFitnessStat_h +#define moFitnessStat_h + +#include + +/** + * The actual class that will be used as base for all statistics + * that need to be calculated over the solution + * It is a moStatBase AND an eoValueParam so it can be used in Monitors. +*/ +template +class moFitnessStat : public moStat +{ +public : + typedef T Fitness; + using moStat< EOT, Fitness >::value; + + moFitnessStat(std::string _description = "fitness") + : moStat(Fitness(), _description) + {} + + virtual void operator()(EOT & _sol) + { + value() = _sol.fitness(); + } + + virtual std::string className(void) const { return "moFitnessStat"; } +}; + +#endif diff --git a/branches/newMo/src/continuator/moStat.h b/branches/newMo/src/continuator/moStat.h new file mode 100644 index 000000000..6c988ead2 --- /dev/null +++ b/branches/newMo/src/continuator/moStat.h @@ -0,0 +1,59 @@ +/* + + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + + Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + ParadisEO WebSite : http://paradiseo.gforge.inria.fr + Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef moStat_h +#define moStat_h + +#include + +/** + * The actual class that will be used as base for all statistics + * that need to be calculated over the solution + * It is a moStatBase AND an eoValueParam so it can be used in Monitors. +*/ +template +class moStat : public eoValueParam, public moStatBase +{ +public: + + moStat(T _value, std::string _description) + : eoValueParam(_value, _description) + {} + + virtual std::string className(void) const + { return "moStat"; } +}; + + +#endif diff --git a/branches/newMo/src/continuator/moStatBase.h b/branches/newMo/src/continuator/moStatBase.h new file mode 100644 index 000000000..9da048a64 --- /dev/null +++ b/branches/newMo/src/continuator/moStatBase.h @@ -0,0 +1,56 @@ +/* + + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + + Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + + This software is governed by the CeCILL license under French law and + abiding by the rules of distribution of free software. You can use, + modify and/ or redistribute the software under the terms of the CeCILL + license as circulated by CEA, CNRS and INRIA at the following URL + "http://www.cecill.info". + + As a counterpart to the access to the source code and rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors have only limited liability. + + In this respect, the user's attention is drawn to the risks associated + with loading, using, modifying and/or developing or reproducing the + software by the user in light of its specific status of free software, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + requirements in conditions enabling the security of their systems and/or + data to be ensured and, more generally, to use and operate it in the + same conditions as regards security. + The fact that you are presently reading this means that you have had + knowledge of the CeCILL license and that you accept its terms. + + ParadisEO WebSite : http://paradiseo.gforge.inria.fr + Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#ifndef moStatBase_h +#define moStatBase_h + +#include +#include + +/** + * Base class for all statistics that need to be calculated + * over the solution + * (I guess it is not really necessary? MS. + * Depstd::ends, there might be reasons to have a stat that is not an eoValueParam, + * but maybe I'm just kidding myself, MK) +*/ +template +class moStatBase : public eoUF +{ +public: + virtual void lastCall(EOT &) {} + virtual std::string className(void) const { return "moStatBase"; } +}; + +#endif diff --git a/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h b/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h index 93602c6e6..f6253760e 100644 --- a/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h +++ b/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h @@ -36,7 +36,7 @@ #define _moRndWithReplNeighborhood_h #include -#include +#include /** * A Random With replacement Neighborhood diff --git a/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h b/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h index c6fe1d803..79fbe54aa 100644 --- a/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h +++ b/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h @@ -36,7 +36,7 @@ #define _moRndWithoutReplNeighborhood_h #include -#include +#include /** * A Random without replacement Neighborhood diff --git a/branches/newMo/src/newmo.h b/branches/newMo/src/newmo.h index e8fec7bb0..56fbfe9d7 100755 --- a/branches/newMo/src/newmo.h +++ b/branches/newMo/src/newmo.h @@ -43,6 +43,12 @@ #include #include +#include +#include +#include +#include +#include +#include #include #include @@ -50,6 +56,12 @@ #include #include +#include +#include +#include +#include +#include + #include #include diff --git a/branches/newMo/tutorial/oneMax/application/testFirstImpr.cpp b/branches/newMo/tutorial/oneMax/application/testFirstImpr.cpp index 8bc30c7d4..6ae6251af 100644 --- a/branches/newMo/tutorial/oneMax/application/testFirstImpr.cpp +++ b/branches/newMo/tutorial/oneMax/application/testFirstImpr.cpp @@ -160,7 +160,7 @@ void main_function(int argc, char **argv) moTrueContinuator continuator;//always continue - moLocalSearch< moFirstImprExplorer, moTrueContinuator > localSearch(explorer, continuator, eval); + moLocalSearch< moFirstImprExplorer > localSearch(explorer, continuator, eval); /* ========================================================= * diff --git a/branches/newMo/tutorial/oneMax/application/testHCneutral.cpp b/branches/newMo/tutorial/oneMax/application/testHCneutral.cpp index f4de90dfb..a14367f7b 100644 --- a/branches/newMo/tutorial/oneMax/application/testHCneutral.cpp +++ b/branches/newMo/tutorial/oneMax/application/testHCneutral.cpp @@ -164,7 +164,7 @@ void main_function(int argc, char **argv) moTrueContinuator continuator;//always continue - moLocalSearch< moHCneutralExplorer, moTrueContinuator > localSearch(explorer, continuator, eval); + moLocalSearch< moHCneutralExplorer > localSearch(explorer, continuator, eval); /* ========================================================= * diff --git a/branches/newMo/tutorial/oneMax/application/testMetropolisHasting.cpp b/branches/newMo/tutorial/oneMax/application/testMetropolisHasting.cpp index 5213d9f9a..c8518f20d 100644 --- a/branches/newMo/tutorial/oneMax/application/testMetropolisHasting.cpp +++ b/branches/newMo/tutorial/oneMax/application/testMetropolisHasting.cpp @@ -164,7 +164,7 @@ void main_function(int argc, char **argv) moTrueContinuator continuator;//always continue - moLocalSearch< moMetropolisHastingExplorer, moTrueContinuator > localSearch(explorer, continuator, eval); + moLocalSearch< moMetropolisHastingExplorer > localSearch(explorer, continuator, eval); /* ========================================================= * diff --git a/branches/newMo/tutorial/oneMax/application/testRandomWalk.cpp b/branches/newMo/tutorial/oneMax/application/testRandomWalk.cpp index 455d75edb..eccf6330f 100644 --- a/branches/newMo/tutorial/oneMax/application/testRandomWalk.cpp +++ b/branches/newMo/tutorial/oneMax/application/testRandomWalk.cpp @@ -33,6 +33,12 @@ using namespace std; #include #include #include +#include +#include + + +#include +#include // REPRESENTATION //----------------------------------------------------------------------------- @@ -151,8 +157,18 @@ void main_function(int argc, char **argv) * ========================================================= */ moTrueContinuator continuator;//always continue + moFitnessStat fStat; + moCheckpoint checkpoint(continuator); + eoFileMonitor outputfile("out.dat", " "); + checkpoint.add(outputfile); + checkpoint.add(fStat); + eoValueParam genCounter(-1,"Gen"); + eoIncrementor increm(genCounter.value()); + checkpoint.add(increm); + outputfile.add(genCounter); + outputfile.add(fStat); - moLocalSearch< moRandomWalkExplorer, moTrueContinuator > localSearch(explorer, continuator, eval); + moLocalSearch< moRandomWalkExplorer > localSearch(explorer, checkpoint, eval); /* ========================================================= * diff --git a/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp b/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp index 08704e994..53da20692 100644 --- a/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp +++ b/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp @@ -160,7 +160,7 @@ void main_function(int argc, char **argv) moTrueContinuator continuator;//always continue - moLocalSearch< moSimpleHCexplorer, moTrueContinuator > localSearch(explorer, continuator, eval); + moLocalSearch< moSimpleHCexplorer > localSearch(explorer, continuator, eval); /* ========================================================= * diff --git a/branches/newMo/tutorial/oneMax/application/testSimpleHCneutral.cpp b/branches/newMo/tutorial/oneMax/application/testSimpleHCneutral.cpp index 548cf33b0..e193c0ab2 100644 --- a/branches/newMo/tutorial/oneMax/application/testSimpleHCneutral.cpp +++ b/branches/newMo/tutorial/oneMax/application/testSimpleHCneutral.cpp @@ -160,7 +160,7 @@ void main_function(int argc, char **argv) moTrueContinuator continuator;//always continue - moLocalSearch< moSimpleHCneutralExplorer, moTrueContinuator > localSearch(explorer, continuator, eval); + moLocalSearch< moSimpleHCneutralExplorer > localSearch(explorer, continuator, eval); /* ========================================================= * diff --git a/branches/newMo/tutorial/oneMax/application/testWithMove.cpp b/branches/newMo/tutorial/oneMax/application/testWithMove.cpp index 441666d98..726f1fa05 100644 --- a/branches/newMo/tutorial/oneMax/application/testWithMove.cpp +++ b/branches/newMo/tutorial/oneMax/application/testWithMove.cpp @@ -174,7 +174,7 @@ void main_function(int argc, char **argv) moTrueContinuator continuator; - moLocalSearch< moSimpleHCexplorer, moTrueContinuator > localSearch(explorer, continuator); + moLocalSearch< moSimpleHCexplorer > localSearch(explorer, continuator); /* ========================================================= *