[Paradiseo-help] Help with PEO and NSGAII

paradiseo-help at lists.gforge.inria.fr paradiseo-help at lists.gforge.inria.fr
Mar 15 Juil 14:25:11 CEST 2008


Dear Rodrigo Cilla,

Try to add this two following functions in your source code and tell us 
if it works correctly...


void pack( const _Bit_reference& bitRef ) {
        pack( (const bool)bitRef );
}

void unpack( _Bit_reference& bitRef ) {
        bool bit; unpack( bit ); bitRef = bit;
}


Regards,
The Paradiseo team


RODRIGO CILLA UGARTE a écrit :
> Thank you very much for your response.
> The example that you have sent me perfectly works, but when adapting it 
> to my problem, I get this compiler error:
> 
> /home/rodri/paradiseo/paradiseo-peo/src/core/eoVector_mesg.h: In 
> function 'void unpack(moeoVector<MOEOObjectiveVector, MOEOFitness, 
> MOEODiversity, GeneType>&) [with F = 
> moeoRealObjectiveVector<FSObjectiveVectorTraits>, T = double, V = 
> double, W = bool]':
> /home/rodri/programas/MOFeatureSelection/peoMoeoPopEval.h:189:   
> instantiated from 'void peoMoeoPopEval<EOT>::unpackData() [with EOT = 
> FSIndividual]'
> /home/rodri/programas/MOFeatureSelection/MOFeatureSelection.cpp:364:   
> instantiated from here
> /home/rodri/paradiseo/paradiseo-peo/src/core/eoVector_mesg.h:168: error: 
> no matching function for call to 'unpack(std::_Bit_reference)'
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:95: note: 
> candidates are: void unpack(char&)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:98: note:      
>            void unpack(bool&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:101: note:     
>             void unpack(float&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:104: note:     
>             void unpack(double&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:107: note:     
>             void unpack(int&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:110: note:     
>             void unpack(unsigned int&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:113: note:     
>             void unpack(short int&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:116: note:     
>             void unpack(short unsigned int&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:119: note:     
>             void unpack(long int&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:122: note:     
>             void unpack(long unsigned int&, int)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:125: note:     
>             void unpack(char*)
> /home/rodri/paradiseo/paradiseo-peo/src/core/messaging.h:126: note:     
>             void unpack(std::string&)
> make[2]: *** [CMakeFiles/mofeatureselection.dir/MOFeatureSelection.o] 
> Error 1
> make[2]: Leaving directory `/home/rodri/programas/MOFeatureSelection'
> make[1]: *** [CMakeFiles/mofeatureselection.dir/all] Error 2
> make[1]: Leaving directory `/home/rodri/programas/MOFeatureSelection'
> 
> 
> I think that the problem could be related to the fact that my invididual 
> type is a bit vector, isn't it?
> 
> Thank you,
> Rodrigo
> 
> 
> paradiseo-help at lists.gforge.inria.fr dijo:
> 
>> Dear Rodrigo Cilla,
>>
>> Please find attached an example of a multiobjective evolutionary 
>> algorithm where the evaluation of the population is parallelized (the 
>> source code has been designed for the SCH1 test problem).
>> All you need to use is the peoMoeoPopEval component, recently 
>> developed in our team. The only additional thing you need is the 
>> "peoMoeoPopEval.h" file, but we joined it to the test package.
>>
>> Here are the instructions to run the example:
>> - Extract the archive
>> - Edit the "install.cmake" and set your own path to paradiseo-1.1
>> - From the "build" directory, run "cmake .." (I assume you use Unix
>> makefiles)
>> - Copy "schema.xml" to "build"
>> - Compile from "build" with "make"
>> - Run it from "build": "mpiexec -n 4 ./pmoeo"
>>
>> In fact, when having the "peoMoeoPopEval.h" file, you just need to 
>> include it and to modify your code:
>>    "peoPopEval<Sch1> eval(myEval);"
>> by
>>    "peoMoeoPopEval<Sch1> eval(myEval);"
>>
>> Let us know if it works and if your problem is solved.
>>
>> Best regards,
>> The ParadisEO team
>>
> 
> 
> 




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