modelMessageNotification

Information

Overview

  • This model is necessary to enable the agents to communicate with each other
  • It needs to be placed in every system that uses agent-based control, similar to the "System" model in the Modelica.Fluid package
  • It supports two different types of agent communication
  • If you used an earlier version of this library and have problems running your agent system, add this component and the system should run again

Concept

Every agent system needs a MessageNotification model in order to function, similar to the "System" model of the Modelica.Fluid library. The MessageNotification is responsible for ensuring that the agents receive their messages and update their inbox.

There are two different possibilities to notify the agents when they receive a message. The standard one corresponds to earlier versions of the library and is set by setting usePoke=false in the MessageNotification models and all other agents in the system. When this setting is made, the UDP inbox of all agents gets updated every n seconds (n set by user). This is straight forward but also leads to time event generation (weak simulation performance). If usePoke is set to true, the Boolean sendOut connectors of every agent in the system needs to be connected to the Boolean receive[n] input of the MessageNotification model. With this method, the agents only update their inbox in case one agent has sent out a message. This reduces event generation during idle times of the agents and thus may increase simulation perfomance in systems with long idle times of the agents. Example images for both methods are provided below. For further information you can also refer to the example results.

System with usePoke=false

Example system

System with usePoke=true

Example system poke

Example Results

Parameters

TypeNameDefaultDescription
Integern1Number of Boolean inputs (number of other agents in the system)
BooleanusePokefalseMode for different type of communication (standard is false)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanInput[n]receiveInput to connect with other agents
Modelica.Blocks.Interfaces.BooleanOutputyNotification for other agents (not connected to anything)

Components

TypeNameDefaultDescription
Modelica.Blocks.MathBoolean.OrreceiverCollector

Revisions

  • November 2016, by Felix Bünning: Developed and implemented