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);
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;
virtual auto toXML() const -> shared_ptr< XML > override
Get an XML object represents the Entity.
TSPSlave(const string &ip)
Construct from ip address of the master.
virtual void start() override
Start interaction.
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.
auto optimize() -> shared_ptr< Travel >
Derive optimized schedule.
static void main()
Main function.
Top level namespace of products built from samchon.