Tutorial 3 - An advanced pipeline with multichannel signals.
We can use different channels for the receiver to handle specifically each channel name. This can be useful for example in splitting train and test channels in machine learning Then, the user will need to implement specific handling of each channel in the receiving agent.
In this example, the MultiGeneratorAgent is used to send two different types of data - Sine and Cosine generator. This is done via specifying send_output (channel="sine")
and send_output(channel="cosine")
.
Then on the receiving end, the on_received_message()
function checks for message['channel']
to handle it separately.
Note that by default, MonitorAgent is only subscribed to the "default"
channel. Hence, it will not respond to the "cosine"
and "sine"
channel.
[2]:
# %load tutorial_3_multi_channel.py
from agentMET4FOF.agents import AgentMET4FOF, AgentNetwork, MonitorAgent
from agentMET4FOF.streams import SineGenerator, CosineGenerator
class MultiGeneratorAgent(AgentMET4FOF):
_sine_stream: SineGenerator
_cos_stream: CosineGenerator
def init_parameters(self):
self._sine_stream = SineGenerator()
self._cos_stream = CosineGenerator()
def agent_loop(self):
if self.current_state == "Running":
sine_data = self._sine_stream.next_sample() # dictionary
cosine_data = self._cos_stream.next_sample() # dictionary
self.send_output(sine_data["quantities"], channel="sine")
self.send_output(cosine_data["quantities"], channel="cosine")
class MultiOutputMathAgent(AgentMET4FOF):
_minus_param: float
_plus_param: float
def init_parameters(self, minus_param=0.5, plus_param=0.5):
self._minus_param = minus_param
self._plus_param = plus_param
def on_received_message(self, message):
"""
Checks for message['channel'] and handles them separately
Acceptable channels are "cosine" and "sine"
"""
if message["channel"] == "cosine":
minus_data = self.minus(message["data"], self._minus_param)
self.send_output({"cosine_minus": minus_data})
elif message["channel"] == "sine":
plus_data = self.plus(message["data"], self._plus_param)
self.send_output({"sine_plus": plus_data})
@staticmethod
def minus(data, minus_val):
return data - minus_val
@staticmethod
def plus(data, plus_val):
return data + plus_val
def main():
# start agent network server
agentNetwork = AgentNetwork()
# init agents
gen_agent = agentNetwork.add_agent(agentType=MultiGeneratorAgent)
multi_math_agent = agentNetwork.add_agent(agentType=MultiOutputMathAgent)
monitor_agent = agentNetwork.add_agent(agentType=MonitorAgent)
# connect agents : We can connect multiple agents to any particular agent
# However the agent needs to implement handling multiple inputs
agentNetwork.bind_agents(gen_agent, multi_math_agent, channel=["sine", "cosine"])
agentNetwork.bind_agents(multi_math_agent, monitor_agent)
# set all agents states to "Running"
agentNetwork.set_running_state()
# allow for shutting down the network after execution
return agentNetwork
if __name__ == "__main__":
main()
Starting NameServer...
Broadcast server running on 0.0.0.0:9091
NS running on 127.0.0.1:3333 (127.0.0.1)
URI = PYRO:Pyro.NameServer@127.0.0.1:3333
INFO [2021-07-01 15:01:52.175496] (MultiGeneratorAgent_1): INITIALIZED
INFO [2021-07-01 15:01:52.210891] (MultiOutputMathAgent_1): INITIALIZED
INFO [2021-07-01 15:01:52.249834] (MonitorAgent_1): INITIALIZED
[2021-07-01 15:01:52.267296] (MultiGeneratorAgent_1): Connected output module: MultiOutputMathAgent_1
[2021-07-01 15:01:52.281811] (MultiOutputMathAgent_1): Connected output module: MonitorAgent_1
--------------------------------------------------------------
| |
| Your agent network is starting up. Open your browser and |
| visit the agentMET4FOF dashboard on http://127.0.0.1:8050/ |
| |
--------------------------------------------------------------
SET STATE: Running
[2021-07-01 15:01:53.182613] (MultiGeneratorAgent_1): Pack time: 0.001315
[2021-07-01 15:01:53.185913] (MultiGeneratorAgent_1): Sending: [0.]
[2021-07-01 15:01:53.188089] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:53.198228] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([0.5])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:53.187680] (MultiGeneratorAgent_1): Pack time: 0.000927
[2021-07-01 15:01:53.190148] (MultiOutputMathAgent_1): Pack time: 0.001023
[2021-07-01 15:01:53.201389] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5])}}
[2021-07-01 15:01:53.191978] (MultiGeneratorAgent_1): Sending: [1.]
[2021-07-01 15:01:53.202160] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([0.5])}
[2021-07-01 15:01:53.205550] (MonitorAgent_1): Tproc: 0.006233
[2021-07-01 15:01:53.222512] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.5])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:53.203843] (MultiOutputMathAgent_1): Tproc: 0.014867
[2021-07-01 15:01:53.225894] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5]), 'cosine_minus': array([0.5])}}
[2021-07-01 15:01:53.206881] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([1.]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:53.226755] (MonitorAgent_1): Tproc: 0.003277
[2021-07-01 15:01:53.214200] (MultiOutputMathAgent_1): Pack time: 0.006701
[2021-07-01 15:01:53.216159] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.5])}
[2021-07-01 15:01:53.216622] (MultiOutputMathAgent_1): Tproc: 0.009249
[2021-07-01 15:01:54.184818] (MultiGeneratorAgent_1): Pack time: 0.000496
[2021-07-01 15:01:54.186555] (MultiGeneratorAgent_1): Sending: [0.58778525]
[2021-07-01 15:01:54.187543] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.58778525]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:54.191606] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([1.08778525])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:54.188158] (MultiGeneratorAgent_1): Pack time: 0.001101
[2021-07-01 15:01:54.188642] (MultiOutputMathAgent_1): Pack time: 0.000556
[2021-07-01 15:01:54.198646] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525]), 'cosine_minus': array([0.5])}}
[2021-07-01 15:01:54.192076] (MultiGeneratorAgent_1): Sending: [0.99802673]
[2021-07-01 15:01:54.193649] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([1.08778525])}
[2021-07-01 15:01:54.199203] (MonitorAgent_1): Tproc: 0.007071
[2021-07-01 15:01:54.206693] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.49802673])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:54.194338] (MultiOutputMathAgent_1): Tproc: 0.00634
[2021-07-01 15:01:54.211962] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525]), 'cosine_minus': array([0.5 , 0.49802673])}}
[2021-07-01 15:01:54.198345] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.99802673]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:54.212776] (MonitorAgent_1): Tproc: 0.004846
[2021-07-01 15:01:54.201066] (MultiOutputMathAgent_1): Pack time: 0.001228
[2021-07-01 15:01:54.203439] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.49802673])}
[2021-07-01 15:01:54.204268] (MultiOutputMathAgent_1): Tproc: 0.004457
[2021-07-01 15:01:55.178989] (MultiGeneratorAgent_1): Pack time: 0.000235
[2021-07-01 15:01:55.179521] (MultiGeneratorAgent_1): Sending: [0.95105652]
[2021-07-01 15:01:55.179758] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.95105652]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:55.180977] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([1.45105652])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:55.179716] (MultiGeneratorAgent_1): Pack time: 8.7e-05
[2021-07-01 15:01:55.179960] (MultiOutputMathAgent_1): Pack time: 9e-05
[2021-07-01 15:01:55.181787] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652]), 'cosine_minus': array([0.5 , 0.49802673])}}
[2021-07-01 15:01:55.179963] (MultiGeneratorAgent_1): Sending: [0.9921147]
[2021-07-01 15:01:55.180249] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([1.45105652])}
[2021-07-01 15:01:55.181918] (MonitorAgent_1): Tproc: 0.000833
[2021-07-01 15:01:55.183711] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.4921147])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:55.180316] (MultiOutputMathAgent_1): Tproc: 0.000466
[2021-07-01 15:01:55.184531] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 ])}}
[2021-07-01 15:01:55.181834] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.9921147]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:55.184744] (MonitorAgent_1): Tproc: 0.000897
[2021-07-01 15:01:55.182130] (MultiOutputMathAgent_1): Pack time: 0.000143
[2021-07-01 15:01:55.182865] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.4921147])}
[2021-07-01 15:01:55.183034] (MultiOutputMathAgent_1): Tproc: 0.001075
NS shut down.
[2021-07-01 15:01:56.180795] (MultiGeneratorAgent_1): Pack time: 0.000474
[2021-07-01 15:01:56.182502] (MultiGeneratorAgent_1): Sending: [0.95105652]
[2021-07-01 15:01:56.184165] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.95105652]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:56.188323] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([1.45105652])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:56.183937] (MultiGeneratorAgent_1): Pack time: 0.000939
[2021-07-01 15:01:56.186133] (MultiOutputMathAgent_1): Pack time: 0.001328
[2021-07-01 15:01:56.193199] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652, 1.45105652]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 ])}}
[2021-07-01 15:01:56.186587] (MultiGeneratorAgent_1): Sending: [0.98228725]
[2021-07-01 15:01:56.188313] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([1.45105652])}
[2021-07-01 15:01:56.194104] (MonitorAgent_1): Tproc: 0.005235
[2021-07-01 15:01:56.197336] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.48228725])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:56.189350] (MultiOutputMathAgent_1): Tproc: 0.00465
[2021-07-01 15:01:56.202432] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652, 1.45105652]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725])}}
[2021-07-01 15:01:56.192299] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.98228725]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:56.203192] (MonitorAgent_1): Tproc: 0.005025
[2021-07-01 15:01:56.194134] (MultiOutputMathAgent_1): Pack time: 0.001021
[2021-07-01 15:01:56.196129] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.48228725])}
[2021-07-01 15:01:56.196786] (MultiOutputMathAgent_1): Tproc: 0.003774
[2021-07-01 15:01:57.181941] (MultiGeneratorAgent_1): Pack time: 0.001002
[2021-07-01 15:01:57.187711] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.58778525]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:57.201793] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([1.08778525])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:57.184197] (MultiGeneratorAgent_1): Sending: [0.58778525]
[2021-07-01 15:01:57.193170] (MultiOutputMathAgent_1): Pack time: 0.004933
[2021-07-01 15:01:57.207510] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725])}}
[2021-07-01 15:01:57.193366] (MultiGeneratorAgent_1): Pack time: 0.008673
[2021-07-01 15:01:57.194990] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([1.08778525])}
[2021-07-01 15:01:57.208243] (MonitorAgent_1): Tproc: 0.005928
[2021-07-01 15:01:57.194990] (MultiGeneratorAgent_1): Sending: [0.96858316]
[2021-07-01 15:01:57.195499] (MultiOutputMathAgent_1): Tproc: 0.007365
[2021-07-01 15:01:57.213668] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.46858316])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:57.219609] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316])}}
[2021-07-01 15:01:57.199423] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.96858316]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:57.220649] (MonitorAgent_1): Tproc: 0.006413
[2021-07-01 15:01:57.202937] (MultiOutputMathAgent_1): Pack time: 0.002508
[2021-07-01 15:01:57.205253] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.46858316])}
[2021-07-01 15:01:57.206416] (MultiOutputMathAgent_1): Tproc: 0.006076
[2021-07-01 15:01:58.181290] (MultiGeneratorAgent_1): Pack time: 0.000689
[2021-07-01 15:01:58.183351] (MultiGeneratorAgent_1): Sending: [1.2246468e-16]
[2021-07-01 15:01:58.184399] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([1.2246468e-16]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:58.191755] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([0.5])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:58.187102] (MultiGeneratorAgent_1): Pack time: 0.002899
[2021-07-01 15:01:58.197160] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525,
0.5 ]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316])}}
[2021-07-01 15:01:58.188956] (MultiOutputMathAgent_1): Pack time: 0.000701
[2021-07-01 15:01:58.192717] (MultiGeneratorAgent_1): Sending: [0.95105652]
[2021-07-01 15:01:58.190516] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([0.5])}
[2021-07-01 15:01:58.197707] (MonitorAgent_1): Tproc: 0.004917
[2021-07-01 15:01:58.200727] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.45105652])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:58.190927] (MultiOutputMathAgent_1): Tproc: 0.002815
[2021-07-01 15:01:58.207440] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525,
0.5 ]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316,
0.45105652])}}
[2021-07-01 15:01:58.194263] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.95105652]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:58.208510] (MonitorAgent_1): Tproc: 0.007011
[2021-07-01 15:01:58.196419] (MultiOutputMathAgent_1): Pack time: 0.001563
[2021-07-01 15:01:58.198945] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.45105652])}
[2021-07-01 15:01:58.201557] (MultiOutputMathAgent_1): Tproc: 0.006677
[2021-07-01 15:01:59.180793] (MultiGeneratorAgent_1): Pack time: 0.000552
[2021-07-01 15:01:59.182349] (MultiGeneratorAgent_1): Sending: [-0.58778525]
[2021-07-01 15:01:59.183520] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([-0.58778525]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:01:59.190572] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([-0.08778525])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:59.183271] (MultiGeneratorAgent_1): Pack time: 0.000478
[2021-07-01 15:01:59.184681] (MultiOutputMathAgent_1): Pack time: 0.000554
[2021-07-01 15:01:59.197807] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([ 0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525,
0.5 , -0.08778525]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316,
0.45105652])}}
[2021-07-01 15:01:59.185007] (MultiGeneratorAgent_1): Sending: [0.92977649]
[2021-07-01 15:01:59.186423] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([-0.08778525])}
[2021-07-01 15:01:59.198320] (MonitorAgent_1): Tproc: 0.007246
[2021-07-01 15:01:59.201333] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.42977649])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:01:59.186874] (MultiOutputMathAgent_1): Tproc: 0.002855
[2021-07-01 15:01:59.207784] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([ 0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525,
0.5 , -0.08778525]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316,
0.45105652, 0.42977649])}}
[2021-07-01 15:01:59.189887] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.92977649]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:01:59.208882] (MonitorAgent_1): Tproc: 0.006219
[2021-07-01 15:01:59.192005] (MultiOutputMathAgent_1): Pack time: 0.001011
[2021-07-01 15:01:59.193943] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.42977649])}
[2021-07-01 15:01:59.194633] (MultiOutputMathAgent_1): Tproc: 0.003875
[2021-07-01 15:02:00.181478] (MultiGeneratorAgent_1): Pack time: 0.000776
[2021-07-01 15:02:00.184191] (MultiGeneratorAgent_1): Sending: [-0.95105652]
[2021-07-01 15:02:00.197991] (MultiGeneratorAgent_1): Pack time: 0.013129
[2021-07-01 15:02:00.187946] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([-0.95105652]), 'senderType': 'MultiGeneratorAgent', 'channel': 'sine'}
[2021-07-01 15:02:00.207903] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'sine_plus': array([-0.45105652])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:02:00.205156] (MultiGeneratorAgent_1): Sending: [0.90482705]
[2021-07-01 15:02:00.190476] (MultiOutputMathAgent_1): Pack time: 0.000718
[2021-07-01 15:02:00.229208] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([ 0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525,
0.5 , -0.08778525, -0.45105652]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316,
0.45105652, 0.42977649])}}
[2021-07-01 15:02:00.229840] (MonitorAgent_1): Tproc: 0.021469
[2021-07-01 15:02:00.196944] (MultiOutputMathAgent_1): Sending: {'sine_plus': array([-0.45105652])}
[2021-07-01 15:02:00.232820] (MonitorAgent_1): Received: {'from': 'MultiOutputMathAgent_1', 'data': {'cosine_minus': array([0.40482705])}, 'senderType': 'MultiOutputMathAgent', 'channel': 'default'}
[2021-07-01 15:02:00.201511] (MultiOutputMathAgent_1): Tproc: 0.011616
[2021-07-01 15:02:00.241196] (MonitorAgent_1): Buffer: {'MultiOutputMathAgent_1': {'sine_plus': array([ 0.5 , 1.08778525, 1.45105652, 1.45105652, 1.08778525,
0.5 , -0.08778525, -0.45105652]), 'cosine_minus': array([0.5 , 0.49802673, 0.4921147 , 0.48228725, 0.46858316,
0.45105652, 0.42977649, 0.40482705])}}
[2021-07-01 15:02:00.221224] (MultiOutputMathAgent_1): Received: {'from': 'MultiGeneratorAgent_1', 'data': array([0.90482705]), 'senderType': 'MultiGeneratorAgent', 'channel': 'cosine'}
[2021-07-01 15:02:00.241435] (MonitorAgent_1): Tproc: 0.007897
[2021-07-01 15:02:00.223049] (MultiOutputMathAgent_1): Pack time: 0.000661
[2021-07-01 15:02:00.224864] (MultiOutputMathAgent_1): Sending: {'cosine_minus': array([0.40482705])}
[2021-07-01 15:02:00.225436] (MultiOutputMathAgent_1): Tproc: 0.003688