Samchon Framework for CPP
1.0.0
|
A mediator of parallel system solving packaging problem. More...
#include <PackerMediator.hpp>
Public Member Functions | |
PackerMediator () | |
Default Constructor. More... | |
Static Public Member Functions | |
static void | main () |
Main functino. More... | |
Protected Member Functions | |
void | replyOptimization (std::shared_ptr< library::XML > xml) |
Handle (replied) optimized value from a slave system. More... | |
Protected Attributes | |
std::shared_ptr< packer::Packer > | packer |
A packer solver. More... | |
std::mutex | mtx |
A mutex for optimization. More... | |
size_t | optimized |
Number of slaves who'd completed an optimization. More... | |
A mediator of parallel system solving packaging problem.
PackerMediator is a class representing mediator class of tree-structured parallel processing system solving packaging problem.
Packer mediator system is placed on between master and slave systems. It can be a slave system for its master, and also can be a master system for its own slave systems. Mediator is a class representing mediator class of parallel processing system.
The PackerMediator is built for providing a guidance of building a mediator system in a tree-structured parallel processing system. You can also learn how to utilize master module in protocol by following the example.
Master is an abstract and example class, for providing guidance of realizing parallel processing system for users, within framework of master. The Master class represents a master of parallel processing system in the master side.
A master system (represented by Master and MasterDriver) is associated with a chief system (represented by Cheif and CheifDriver) and slave systems (Slave and SlaveDriver). The master system gets optimization order from chief system and shifts and distributes orders to its slave systems. When slave systems report optimization result, the master system aggregates those results and reports the aggregated results to chief system.
Definition at line 44 of file PackerMediator.hpp.
|
inline |
Default Constructor.
Definition at line 76 of file PackerMediator.hpp.
References replyOptimization().
|
inlineprotected |
Handle (replied) optimized value from a slave system.
When gets optimization result from Slave systems, Master aggregates them and derives the best solution between those results and reports the best solution to the Cheif system.
xml | XML object representing the optimized value. |
Definition at line 132 of file PackerMediator.hpp.
References packer.
Referenced by PackerMediator().
|
inlinestatic |
Main functino.
Definition at line 162 of file PackerMediator.hpp.
|
protected |
A packer solver.
Definition at line 54 of file PackerMediator.hpp.
Referenced by replyOptimization().
|
protected |
A mutex for optimization.
The mutex exists for ensuring concurrency of aggregation of optimization reported from slave systems.
Definition at line 62 of file PackerMediator.hpp.
|
protected |
Number of slaves who'd completed an optimization.
Definition at line 67 of file PackerMediator.hpp.