modelPartialAgent

Information

Overview

  • This model implements the communication system of the agent library as a partial model
  • It is based on communication via UDP
  • It is used by all implemented agents

Concept

The communication takes place via UDP network communication and is implemented with the help of elements from the DeviceDriver library. The inbox is refreshed based on a sample time, the outbox is triggered by an external boolean input.

Since sampling creates time events, the simulation performance will be bad for models with a high number of equations. For this reason, an alternative refresh mechanism can be used with "usePoke=true". In order to use this mechanism the component "MessageNotification" needs to be added to the system.

The partial agent implements the message parameters performative, sender, receiver, reply to, content, ontology and message ID. The parameters are described in the reference.

References

  • Roozbeh Sangi, Felix Bünning, Johannes Fütterer, Dirk Müller. A Platform for the Agent-based Control of HVAC Systems. Modelica Conference, 2017, Prague, Czech Republic.
  • Felix Bünning, Roozbeh Sangi, Dirk Müller. A Modelica library for agent-based control of building HVAC systems. Applied Energy, 193:52-59, 2017.

Example Results

Parameters

TypeNameDefaultDescription
IntegernameName of the agent (five-digit number, eg. 10001)
BooleanusePokefalseUse Modelica internal communication for inbox update
RealsampleRate5Sample time for inbox update (used if usePoke=false)

Components

TypeNameDefaultDescription
HVACAgentBasedControl.Agents.MessageNotificationmessageNotification
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.Packagerpackager
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddRealcontent
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetRealget_content
Modelica_DeviceDrivers.Blocks.Communication.UDPReceiveuDPReceive_adapted
UDPSend_adapteduDPSend_adapted
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegersender
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegerreceiver
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegerreply_to
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddRealontology
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetperformative
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetsender
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetreceiver
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetreply_to
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetRealgetontology
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegerperformative
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetMessageID
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegermessageID
Modelica.StateGraph.StateGraphRootstateGraphRoot
SendSamplesendSample
Modelica.Blocks.Interfaces.BooleanOutputsendOutTurns true when the sending unit of the agent is active

Revisions

  • July 2017, by Roozbeh Sangi: Documentation revised
  • December 2016, by Felix Bünning: Changed some variables to Integer type in order to avoid warnings caused by using the "==" operator
  • November 2016, by Felix Bünning: Added feature to use internal inbox refresh (better performance), updated Info window
  • October 2015, by Felix Bünning: Developed and implemented