class MultiGeneratorAgent(AgentMET4FOF): 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.sine_stream.next_sample() #dictionary self.send_output(sine_data['x'], channel="sine") self.send_output(cosine_data['x'], channel="cosine")
class SineGeneratorAgent(AgentMET4FOF): def init_parameters(self): self.stream = SineGenerator() def agent_loop(self): if self.current_state == "Running": sine_data = self.stream.next_sample() #dictionary self.send_output(sine_data['x'])
def init_parameters(self): self.stream = SineGenerator()
def init_parameters(self): self.sine_stream = SineGenerator() self.cos_stream = CosineGenerator()