2 #include <samchon/example/interaction/Slave.hpp> 4 #include <samchon/example/tsp/Scheduler.hpp> 16 using namespace library;
17 using namespace protocol;
53 virtual void optimize(shared_ptr<XML> xml,
size_t index,
size_t size)
override 55 super::optimize(xml, index, size);
57 tsp::Scheduler scheduler;
58 scheduler.construct(xml);
61 cout << scheduler.toString() << endl << endl;
62 sendData( make_shared<Invoke>(
"replyOptimization", scheduler.toXML()) );
77 cout <<
"----------------------------------------------------------------------------" << endl;
78 cout <<
" TSP SOLVER SLAVE" << endl;
79 cout <<
"----------------------------------------------------------------------------" << endl;
80 cout <<
" ip: "; cin >> ip;
TSPSlave(const string &ip)
Construct from ip address of the master.
virtual void optimize(shared_ptr< XML > xml, size_t index, size_t size) override
Optimize something and report the result.
A slave system solving TSP.
A slave system for optimizing something.
static void main()
Main function.