Пример #1
0
 def __init__(self, node_name, network):
     """ inits the coordinator. """
     self.node_name = node_name
     self.network = network
     self.cm = ComputationalModel()
     self.all_vectors = {}
     self.incoming_messages = []
     # initialize the balancing process with the coordinatorProcess
     self.bp = BalancingProcess(self)
     # a list containing messages with results from balancing process
     self.balancing_msgs = []
     self.weight = 0 # weight for coord, too
     self.mf = MonitoredFunctionImpl()
     self.NodeList = []