2 #include <samchon/example/interaction/Slave.hpp> 4 #include <samchon/example/packer/Packer.hpp> 5 #include <samchon/protocol/Invoke.hpp> 15 using namespace library;
16 using namespace protocol;
60 virtual void optimize(shared_ptr<XML> xml,
size_t index,
size_t size)
override 62 super::optimize(xml, index, size);
64 packer::Packer packer;
65 packer.construct(xml);
66 packer.optimize(index, size);
68 cout << packer.toString() << endl << endl;
69 sendOptimization(packer.toXML());
84 cout <<
"----------------------------------------------------------------------------" << endl;
85 cout <<
" PACKER SLAVE" << endl;
86 cout <<
"----------------------------------------------------------------------------" << endl;
87 cout <<
" ip: "; cin >> ip;
88 cout <<
" port: "; cin >> port;
PackerSlave(const string &ip, int port)
Construct from ip and port of the master.
A slave system for solving Packer.
virtual void optimize(shared_ptr< XML > xml, size_t index, size_t size) override
Optimize TSP and report the result.
static void main()
Main function.
A slave system for optimizing something.