From bruno.calado.ribeiro at usp.br Fri Jul 11 20:35:39 2008 From: bruno.calado.ribeiro at usp.br (USP) Date: Fri, 11 Jul 2008 21:35:39 -0300 Subject: [galib] (no subject) Message-ID: <8cb534470807111735p5388293el5709981f27b6ec48@mail.gmail.com> -- Bruno Calado -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.mit.edu/pipermail/galib/attachments/20080711/9ba63e0a/attachment.htm From bruno.calado.ribeiro at usp.br Fri Jul 11 23:53:15 2008 From: bruno.calado.ribeiro at usp.br (USP) Date: Sat, 12 Jul 2008 00:53:15 -0300 Subject: [galib] Replace Message-ID: <8cb534470807112053g19f9a60x13252f0645ebe003@mail.gmail.com> Hi, I want to put a new gene each generation in the pop. I found the function replace to do it. But, how I can convert a string to gene format??? CODE: GA1DBinaryStringGenome genome(length, Objective); GASimpleGA ga(genome); ga.parameters(params); GAPopulation gapop(genome, popsize); // RAW:0 SCALED:1 cout << *gapop.replace( &gapop.individual(0), &gapop.individual(1) ); tks Bruno Calado -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.mit.edu/pipermail/galib/attachments/20080712/ee39f056/attachment.htm From Torsten.Gutjahr at ise.fraunhofer.de Mon Jul 14 07:59:05 2008 From: Torsten.Gutjahr at ise.fraunhofer.de (Torsten.Gutjahr@ise.fraunhofer.de) Date: Mon, 14 Jul 2008 13:59:05 +0200 Subject: [galib] (no subject) Message-ID: Hello, I want to read my GA-parameters from a txt.-file. Example 7 illustrates how to use the parameterlist for reading settings from a file. I tried this, but there is no describtion how the input file should look like. So when I made an entry in the parameterfile like: "popsize = 10;" I get an error like this: GAParameterlist :: read variable 10; has no value be sure there is a newline at end of the file GAParameter.c: 483 Can you tell me what's the Syntax of this Inputfile to change quickly the GA settings? best regards, Torsten -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.mit.edu/pipermail/galib/attachments/20080714/6ae07752/attachment.htm From Michael.Kupfer-1 at nasa.gov Tue Jul 22 14:58:29 2008 From: Michael.Kupfer-1 at nasa.gov (Michael Kupfer) Date: Tue, 22 Jul 2008 11:58:29 -0700 Subject: [galib] Galib and MPI Galib Message-ID: Dear all! I found the suggestion in the Galib mailing list, to use MPIGAlib for parallel computing (message from April 23rd 2007). Now, I am trying to install MPIGAlib, however encounter difficulties. Unfortunately I was unable to find any installing troubleshooting tips or FAQs. Would someone be able to give me some installation help? I am working on a MacBook Pro and I installed MPICH and of cause GAlib. As in the installation guide described, I generated in the MPIga directory a symbolic link to the Galib directory. Then, I adjusted the makefile and the makevars. When I now try to execute ?make? I get all sorts of errors and warnings such as ----- mpiCC -g -Wall -I.. -Iga -I. -IAM_INCLUDE -c MPIGAGeneticAlgorithm.cpp MPIGAGeneticAlgorithm.h: In member function 'MPIGAGeneticAlgorithm::MPIGAReplacementType MPIGAGeneticAlgorithm::replaceT(MPIGAGeneticAlgorithm::MPIGAReplacementType) ': MPIGAGeneticAlgorithm.h:77: warning: no return statement in function returning non-void MPIGAGeneticAlgorithm.cpp: In constructor 'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm*, const MPIGAGenome&)': MPIGAGeneticAlgorithm.cpp:39: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp: In constructor 'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm&, const MPIGAGenome&)': MPIGAGeneticAlgorithm.cpp:66: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp: In member function 'void MPIGAGeneticAlgorithm::migrate(MPIGAGenome&)': MPIGAGeneticAlgorithm.cpp:142: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:136: warning: unused variable 'flag' MPIGAGeneticAlgorithm.cpp:178: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:225: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:316: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:97: warning: enumeration value 'CUSTOM' not handled in switch MPIGAGeneticAlgorithm.cpp: In member function 'MPIGAGenome MPIGAGeneticAlgorithm::bestFrom(unsigned int)': MPIGAGeneticAlgorithm.cpp:381: error: 'cout' was not declared in this scope MPIGAGeneticAlgorithm.cpp:382: error: 'endl' was not declared in this scope make: *** [MPIGAGeneticAlgorithm.o] Error 1 --------- I was able to get rid of the cout and endl errors by adding ?#include ? and ?using namespace std;? However, then I get many more errors and warnings: ------ mpiCC -g -Wall -I.. -Iga -I. -IAM_INCLUDE -c MPIGAGeneticAlgorithm.cpp MPIGAGeneticAlgorithm.h: In member function 'MPIGAGeneticAlgorithm::MPIGAReplacementType MPIGAGeneticAlgorithm::replaceT(MPIGAGeneticAlgorithm::MPIGAReplacementType) ': MPIGAGeneticAlgorithm.h:80: warning: no return statement in function returning non-void MPIGAGeneticAlgorithm.cpp: In constructor 'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm*, const MPIGAGenome&)': MPIGAGeneticAlgorithm.cpp:38: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp: In constructor 'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm&, const MPIGAGenome&)': MPIGAGeneticAlgorithm.cpp:65: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp: In member function 'void MPIGAGeneticAlgorithm::migrate(MPIGAGenome&)': MPIGAGeneticAlgorithm.cpp:141: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:135: warning: unused variable 'flag' MPIGAGeneticAlgorithm.cpp:177: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:224: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:315: warning: comparison between signed and unsigned integer expressions MPIGAGeneticAlgorithm.cpp:96: warning: enumeration value 'CUSTOM' not handled in switch mpiCC -g -Wall -I.. -Iga -I. -IAM_INCLUDE -c MPIGA1DArrayGenome.cpp In file included from /Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi .h:1142, from MPIGA1DArrayGenome.cpp:16: /Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi cxx.h:26:2: error: #error "SEEK_SET is #defined but must not be for the C++ binding of MPI" /Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi cxx.h:30:2: error: #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI" /Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi cxx.h:35:2: error: #error "SEEK_END is #defined but must not be for the C++ binding of MPI" MPIGA1DArrayGenome.h:91: error: 'istream' has not been declared MPIGA1DArrayGenome.h:92: error: 'ostream' has not been declared MPIGA1DArrayGenome.h: In member function 'MPIGA1DArrayGenome& MPIGA1DArrayGenome::operator=(const T*)': MPIGA1DArrayGenome.h:85: error: 'sz' was not declared in this scope MPIGA1DArrayGenome.h: In member function 'const T& MPIGA1DArrayGenome::gene(unsigned int) const': MPIGA1DArrayGenome.h:97: error: 'a' was not declared in this scope MPIGA1DArrayGenome.h: In member function 'T& MPIGA1DArrayGenome::gene(unsigned int, const T&)': MPIGA1DArrayGenome.h:99: error: 'a' was not declared in this scope MPIGA1DArrayGenome.h:100: error: 'a' was not declared in this scope MPIGA1DArrayGenome.h: At global scope: MPIGA1DArrayGenome.h:241: error: 'istream' has not been declared MPIGA1DArrayGenome.h:242: error: 'ostream' has not been declared MPIGA1DArrayGenome.h:237: error: 'CONTENTS' was not declared in this scope ModifiedGA1DArrayGenome.cpp: In member function 'virtual int MPIGA1DArrayGenome::resize(int)': ModifiedGA1DArrayGenome.cpp:102: error: 'sz' was not declared in this scope ModifiedGA1DArrayGenome.cpp: At global scope: ModifiedGA1DArrayGenome.cpp:109: error: 'int MPIGA1DArrayGenome::read' is not a static member of 'class MPIGA1DArrayGenome' ModifiedGA1DArrayGenome.cpp:109: error: template definition of non-template 'int MPIGA1DArrayGenome::read' ModifiedGA1DArrayGenome.cpp:109: error: 'istream' was not declared in this scope ModifiedGA1DArrayGenome.cpp:109: error: expected primary-expression before ')' token ModifiedGA1DArrayGenome.cpp:109: error: expected `;' before '{' token ModifiedGA1DArrayGenome.cpp:118: error: 'int MPIGA1DArrayGenome::write' is not a static member of 'class MPIGA1DArrayGenome' ModifiedGA1DArrayGenome.cpp:118: error: template definition of non-template 'int MPIGA1DArrayGenome::write' ModifiedGA1DArrayGenome.cpp:118: error: 'ostream' was not declared in this scope ModifiedGA1DArrayGenome.cpp:118: error: 'os' was not declared in this scope ModifiedGA1DArrayGenome.cpp:118: error: expected `;' before 'const' ModifiedGA1DArrayGenome.cpp: In constructor 'MPIGA1DArrayAlleleGenome::MPIGA1DArrayAlleleGenome(unsigned int, const GAAlleleSet&, float (*)(GAGenome&), void*)': ModifiedGA1DArrayGenome.cpp:193: error: 'ElementComparator' was not declared in this scope ModifiedGA1DArrayGenome.cpp:193: error: there are no arguments to 'comparator' that depend on a template parameter, so a declaration of 'comparator' must be available ModifiedGA1DArrayGenome.cpp:193: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) ModifiedGA1DArrayGenome.cpp:194: error: 'OnePointCrossover' was not declared in this scope ModifiedGA1DArrayGenome.cpp:194: error: there are no arguments to 'crossover' that depend on a template parameter, so a declaration of 'crossover' must be available ModifiedGA1DArrayGenome.cpp: In constructor 'MPIGA1DArrayAlleleGenome::MPIGA1DArrayAlleleGenome(const GAAlleleSetArray&, float (*)(GAGenome&), void*)': ModifiedGA1DArrayGenome.cpp:209: error: 'ElementComparator' was not declared in this scope ModifiedGA1DArrayGenome.cpp:209: error: there are no arguments to 'comparator' that depend on a template parameter, so a declaration of 'comparator' must be available ModifiedGA1DArrayGenome.cpp:210: error: 'OnePointCrossover' was not declared in this scope ModifiedGA1DArrayGenome.cpp:210: error: there are no arguments to 'crossover' that depend on a template parameter, so a declaration of 'crossover' must be available ModifiedGA1DArrayGenome.cpp: In member function 'virtual int MPIGA1DArrayAlleleGenome::resize(int)': ModifiedGA1DArrayGenome.cpp:264: error: 'nx' was not declared in this scope ModifiedGA1DArrayGenome.cpp:268: error: 'a' was not declared in this scope ModifiedGA1DArrayGenome.cpp: At global scope: ModifiedGA1DArrayGenome.cpp:278: error: 'int MPIGA1DArrayAlleleGenome::read' is not a static member of 'class MPIGA1DArrayAlleleGenome' ModifiedGA1DArrayGenome.cpp:278: error: template definition of non-template 'int MPIGA1DArrayAlleleGenome::read' ModifiedGA1DArrayGenome.cpp:278: error: 'istream' was not declared in this scope ModifiedGA1DArrayGenome.cpp:278: error: 'is' was not declared in this scope ModifiedGA1DArrayGenome.cpp:278: error: expected `;' before '{' token ModifiedGA1DArrayGenome.cpp:283: error: 'int MPIGA1DArrayAlleleGenome::write' is not a static member of 'class MPIGA1DArrayAlleleGenome' ModifiedGA1DArrayGenome.cpp:283: error: template definition of non-template 'int MPIGA1DArrayAlleleGenome::write' ModifiedGA1DArrayGenome.cpp:283: error: 'ostream' was not declared in this scope ModifiedGA1DArrayGenome.cpp:283: error: 'os' was not declared in this scope ModifiedGA1DArrayGenome.cpp:283: error: expected `;' before 'const' MPIGA1DArrayGenome.cpp: In member function 'virtual void MPIGA1DArrayGenome::unpack(unsigned int)': MPIGA1DArrayGenome.cpp:122: error: 'cout' was not declared in this scope MPIGA1DArrayGenome.cpp:122: error: 'endl' was not declared in this scope MPIGA1DArrayGenome.cpp: In member function 'virtual void MPIGA1DArrayGenome::send(unsigned int)': MPIGA1DArrayGenome.cpp:217: error: 'cout' was not declared in this scope MPIGA1DArrayGenome.cpp:217: error: 'endl' was not declared in this scope MPIGA1DArrayGenome.cpp: In member function 'virtual void MPIGA1DArrayGenome::recv(unsigned int)': MPIGA1DArrayGenome.cpp:229: error: 'cout' was not declared in this scope MPIGA1DArrayGenome.cpp:229: error: 'endl' was not declared in this scope make: *** [MPIGA1DArrayGenome.o] Error 1 ---------------- Can someone help me out here? Best, Michael. michael.kupfer AT nasa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.mit.edu/pipermail/galib/attachments/20080722/c5111382/attachment.htm