3 #include <samchon/example/interaction/ChiefDriver.hpp> 5 #include <samchon/example/tsp/Scheduler.hpp> 6 #include <samchon/example/packer/Packer.hpp> 8 #include <samchon/library/XML.hpp> 9 #include <samchon/protocol/Invoke.hpp> 21 using namespace library;
22 using namespace protocol;
57 : super(nullptr, 37200)
63 virtual void addClient(Socket *socket)
override 65 cout <<
"The chief has connected." << endl;
67 super::addClient(socket);
74 virtual void replyData(shared_ptr<Invoke> invoke)
77 shared_ptr<XML> &xml = invoke->at(0)->getValueAsXML();
79 if (xml->getTag() ==
"scheduler")
81 else if (xml->getTag() ==
"packer")
93 tsp::Scheduler scheduler;
94 scheduler.construct(xml);
96 cout <<
"----------------------------------------------------------------------------" << endl;
97 cout <<
" TSP SOLVER" << endl;
98 cout <<
"----------------------------------------------------------------------------" << endl;
99 cout << scheduler.toString() << endl << endl;
109 packer::Packer packer;
110 packer.construct(xml);
112 cout <<
"----------------------------------------------------------------------------" << endl;
113 cout <<
" PACKER" << endl;
114 cout <<
"----------------------------------------------------------------------------" << endl;
115 cout << packer.toString() << endl << endl;
129 cout <<
"----------------------------------------------------------------------------" << endl;
130 cout <<
" REPOTER" << endl;
131 cout <<
"----------------------------------------------------------------------------" << endl;
void printTSP(shared_ptr< XML > xml)
Print TSP result on screen.
Reporter()
Default Constructor.
static void main()
Main function.
void printPacker(shared_ptr< XML > xml)
Print Packer result on screen.
A boundary class interacting with a Chief system.
A reporter printing optimization result on screen.