00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <moeo>
00016
00017 #include <make_eval_FlowShop.h>
00018
00019 #include <make_genotype_FlowShop.h>
00020
00021 #include <make_op_FlowShop.h>
00022
00023 #include <do/make_pop.h>
00024
00025 #include <do/make_continue_moeo.h>
00026
00027 #include <do/make_checkpoint_moeo.h>
00028
00029 #include <do/make_ea_moeo.h>
00030
00031 #include <do/make_run.h>
00032
00033 void make_help(eoParser & _parser);
00034
00035 #include <FlowShop.h>
00036
00037
00038 using namespace std;
00039
00040
00041 int main(int argc, char* argv[])
00042 {
00043 try
00044 {
00045
00046 eoParser parser(argc, argv);
00047 eoState state;
00048
00049
00050
00051
00052
00053 eoEvalFuncCounter<FlowShop>& eval = do_make_eval(parser, state);
00054
00055 eoInit<FlowShop>& init = do_make_genotype(parser, state);
00056
00057 eoGenOp<FlowShop>& op = do_make_op(parser, state);
00058
00059
00060
00061
00062
00063 eoPop<FlowShop>& pop = do_make_pop(parser, state, init);
00064
00065 moeoArchive<FlowShop> arch;
00066
00067 eoContinue<FlowShop>& term = do_make_continue_moeo(parser, state, eval);
00068
00069 eoCheckPoint<FlowShop>& checkpoint = do_make_checkpoint_moeo(parser, state, eval, term, pop, arch);
00070
00071 eoAlgo<FlowShop>& algo = do_make_ea_moeo(parser, state, eval, checkpoint, op, arch);
00072
00073
00074
00075
00076
00077 make_help(parser);
00078
00079
00080 apply<FlowShop>(eval, pop);
00081
00082
00083 cout << "Initial Population\n";
00084 pop.sortedPrintOn(cout);
00085 cout << endl;
00086
00087
00088 do_run(algo, pop);
00089
00090
00091 cout << "Final Population\n";
00092 pop.sortedPrintOn(cout);
00093 cout << endl;
00094
00095
00096 cout << "Final Archive\n";
00097 arch.sortedPrintOn(cout);
00098 cout << endl;
00099
00100
00101 }
00102 catch (exception& e)
00103 {
00104 cout << e.what() << endl;
00105 }
00106 return EXIT_SUCCESS;
00107 }