00001
00002 #include <ecf/ECF.h>
00003 #include "EvalOp.h"
00004 #include "atributi.h"
00005
00006
00007
00008 int main(int argc, char **argv)
00009 {
00010 StateP state (new State);
00011
00012 state->setEvalOp(new EvalOp);
00013
00014
00015 TreeP tree (new Tree::Tree);
00016
00017
00018 Tree::PrimitiveP unimodal(new Unimodal);
00019 tree->addFunction(unimodal);
00020
00021 Tree::PrimitiveP distance(new Distance);
00022 tree->addFunction(distance);
00023
00024
00025 state->addGenotype(tree);
00026
00027
00028 state->initialize(argc, argv);
00029
00030
00031
00032 XMLNode xInd = XMLNode::parseFile("./ind.txt", "Individual");
00033 IndividualP ind = (IndividualP) new Individual(state);
00034 ind->read(xInd);
00035 state->getAlgorithm()->evaluate(ind);
00036 std::cout << ind->toString() << std::endl;
00037
00038 return 0;
00039 }