[Paradiseo-help] Parallel MOEO?

Windo Hutabarat whutabarat at gmail.com
Mer 7 Mai 12:42:00 CEST 2008


Dear Developers,

Many thanks for your response.  I look forward to receiving the sources and
example!

Best wishes,

Windo

2008/5/7 paradiseo-help <paradiseo-help at lists.gforge.inria.fr>:

> Windo Hutabarat a écrit :
>
> > Dear all,
> >
> > Thank you very much for giving us ParadisEO!  I am interested in MOEO,
> > especially the possibility of using the ParadisEO machinery to make my life
> > easier!
> > One of my main requirements, however, is to be able to perform parallel
> > multiobjective evaluation.  Everything with PEO and MOEO runs cleanly, so it
> > occurred to me that PMOEO (if you like) might be possible using existing
> > ParadisEO infrastructure.  I tried this by modifying the Schaffer MOEO
> > example into something similar to the PEO tutorial example (code attached).
> >
> > Since the stock NSGA-II code does not accept peoPopEval, I used
> > moeoEasyEA to put an implementation of NSGA-II that do use peoPopEval.
> >
> > The code looks OK (to me), compiles cleanly, and initially appears to
> > run well.  However, it encounters problems when it tries to harvest the
> > result from the slave nodes, giving a lot of this:
> >
> > rank 7 in job 5 grunt_24087 caused collective abort of all ranks
> >  exit status of rank 7: killed by signal 9
> >
> > I've checked the source and header files, but I'm afraid it's not clear
> > to me what may have caused this.  It also occurred to me that perhaps
> > ParadisEO-PEO is not yet equipped to handle PMOEO.  Can somebody please set
> > me straight?  Any suggestion/comments would be gratefully received!
> >
> > Many thanks for your kind attention.
> >
> > Windo
> >
> > --
> > Windo Hutabarat
> > Research Student - Engineering Design Centre, University of Cambridge
> > www-edc.eng.cam.ac.uk <http://www-edc.eng.cam.ac.uk> - www.i-d-c.info <
> > http://www.i-d-c.info>
> > ------------------------------------------------------------------------
> >
> >
> > #include <iostream>
> > #include <moeo>
> > #include <peo>
> > #include <es.h>
> >
> > using namespace std;
> >
> >
> > //-----------------------------------------------------------------------------
> > // the moeoObjectiveVectorTraits: minimising 2 objectives
> >
> > //-----------------------------------------------------------------------------
> > class Sch1ObjectiveVectorTraits : public moeoObjectiveVectorTraits {
> > public:
> >    static bool minimizing(int i) {
> >        return true;
> >    }
> >    static bool maximizing(int i) {
> >        return false;
> >    }
> >    static unsigned int nObjectives(void) {
> >        return 2;
> >    }
> > };
> >
> >
> > //-----------------------------------------------------------------------------
> > // objective vector of real values
> >
> > //-----------------------------------------------------------------------------
> > typedef moeoRealObjectiveVector <Sch1ObjectiveVectorTraits>
> > Sch1ObjectiveVector;
> >
> >
> > //-----------------------------------------------------------------------------
> > // multi-objective evolving object for the Sch1 problem
> >
> > //-----------------------------------------------------------------------------
> > class Sch1 : public moeoRealVector< Sch1ObjectiveVector, double, double>
> > {
> > public:
> >    Sch1() : moeoRealVector<Sch1ObjectiveVector, double, double> (1) {}
> > };
> >
> >
> > //-----------------------------------------------------------------------------
> > // evaluation of objective functions
> >
> > //-----------------------------------------------------------------------------
> > class Sch1Eval : public moeoEvalFunc<Sch1> {
> > public:
> >    void operator() (Sch1 & _sch1) {
> >        if (_sch1.invalidObjectiveVector()) {
> >            Sch1ObjectiveVector objVec;
> >            double x = _sch1[0];
> >            objVec[0] = x * x;
> >            objVec[1] = (x - 2.0) * (x - 2.0);
> >            _sch1.objectiveVector(objVec);
> >        }
> >    }
> > };
> >
> > int main(int argc, char **argv)
> > {
> >    peo::init(argc, argv);
> >
> >    eoParser parser(argc, argv);
> >    eoState state;
> >
> >
> >  //-------------------------------------------------------------------------
> >    // parameters
> >
> >  //-------------------------------------------------------------------------
> >    unsigned int POP_SIZE = parser.createParam(
> >            (unsigned int)(100), "popSize", "Population size",
> > 'P',"Param"
> >            ).value();
> >    unsigned int MAX_GEN = parser.createParam(
> >            (unsigned int)(100), "maxGen", "Maximum number of
> > generations", 'G', "Param"
> >            ).value();
> >    double M_EPSILON = parser.createParam(
> >            0.01, "mutEpsilon", "epsilon for mutation", 'e', "Param"
> >            ).value();
> >    double P_CROSS = parser.createParam(
> >            0.25, "pCross", "Crossover probability", 'C', "Param"
> >            ).value();
> >    double P_MUT = parser.createParam(
> >            0.35, "pMut", "Mutation probability", 'M', "Param"
> >            ).value();
> >    int EA_TYPE = parser.createParam(
> >            0, "eaType", "Type of EA, 0 for NSGA-II, 1 for IBEA", 'T',
> > "Param"
> >            ).value();
> >
> >
> >  //-------------------------------------------------------------------------
> >    // objective functions evaluation
> >
> >  //-------------------------------------------------------------------------
> >
> >    Sch1Eval moEval;
> >    peoPopEval<Sch1> eval(moEval);
> >
> >
> >  //-------------------------------------------------------------------------
> >    // crossover and mutation
> >
> >  //-------------------------------------------------------------------------
> >    eoQuadCloneOp <Sch1> xover;
> >    eoUniformMutation <Sch1> mutation (M_EPSILON);
> >
> >
> >  //-------------------------------------------------------------------------
> >    // generate initial population
> >
> >  //-------------------------------------------------------------------------
> >    eoRealVectorBounds bounds(1, 0.0, 2.0);
> >    eoRealInitBounded <Sch1> init(bounds);
> >    eoPop<Sch1> pop(POP_SIZE, init);
> >
> >    if(getNodeRank()==1) cout << "NSGA-II from components selected" <<
> > endl;
> >
> >  //-------------------------------------------------------------------------
> >    // build NSGA-II from components
> >
> >  //-------------------------------------------------------------------------
> >    moeoArchive<Sch1> arch;
> >    eoGenContinue<Sch1> terminator(MAX_GEN);   // fixed generations
> >
> >    eoCheckPoint<Sch1> checkpoint(terminator); // if need be
> >    moeoArchiveUpdater<Sch1> updater(arch,pop);
> >    checkpoint.add(updater);
> >
> >    moeoFastNonDominatedSortingFitnessAssignment<Sch1> fitness;
> >    moeoFrontByFrontCrowdingDiversityAssignment<Sch1> diversity;
> >    moeoFitnessThenDiversityComparator<Sch1> comparator;
> >    moeoDetTournamentSelect<Sch1> select(2);    // binary
> >    moeoElitistReplacement<Sch1> replace(fitness, diversity, comparator);
> >    eoSGAGenOp<Sch1> op(xover, P_CROSS, mutation, P_MUT);
> >    eoGeneralBreeder<Sch1> breeder(select, op);
> >
> >    moeoEasyEA<Sch1>
> > moea(terminator,eval,breeder,replace,fitness,diversity);
> >
> >    peoWrapper parallelEA(moea, pop);
> >    eval.setOwner(parallelEA);
> >
> >    // help
> >    make_help(parser);
> >
> >    peo::run();
> >    peo::finalize();
> >
> >    if(getNodeRank()==1) {
> >        // extract first front of the final population
> >        moeoArchive<Sch1> arch;
> >        arch.update(pop);
> >
> >        cout << "Final Archive" << endl;
> >        arch.sortedPrintOn(cout);
> >        cout << endl;
> >    }
> >    return EXIT_SUCCESS;
> > }
> >
> >
> >  ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Paradiseo-help mailing list
> > Paradiseo-help at lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/paradiseo-help
> >
> >
> Dear ParadisEO user,
>
> Actually there exist an experimental implementation of the parallel and
> distributed multi-objective evolutionary algorithm. It's not included in the
> last version (1.1) but we can provide you the experimental sources to use
> it. The developper in charge of the development will send you the sources
> and an example on next tuesday.
>
> Best regards,
> ParadisEO team
>



-- 
Windo Hutabarat
Research Student - Engineering Design Centre, University of Cambridge
www-edc.eng.cam.ac.uk - www.i-d-c.info
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.gforge.inria.fr/pipermail/paradiseo-help/attachments/20080507/26523141/attachment.html>


Plus d'informations sur la liste de diffusion Paradiseo-help