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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | name | Name of the agent (five-digit number, eg. 10001) | |
| Boolean | usePoke | false | Use Modelica internal communication for inbox update |
| Real | sampleRate | 5 | Sample time for inbox update (used if usePoke=false) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| HVACAgentBasedControl.Agents.MessageNotification | messageNotification | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.Packager | packager | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddReal | content | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetReal | get_content | ||
| Modelica_DeviceDrivers.Blocks.Communication.UDPReceive | uDPReceive_adapted | ||
| UDPSend_adapted | uDPSend_adapted | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddInteger | sender | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddInteger | receiver | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddInteger | reply_to | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddReal | ontology | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetInteger | getperformative | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetInteger | getsender | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetInteger | getreceiver | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetInteger | getreply_to | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetReal | getontology | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddInteger | performative | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetInteger | getMessageID | ||
| Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddInteger | messageID | ||
| Modelica.StateGraph.StateGraphRoot | stateGraphRoot | ||
| SendSample | sendSample | ||
| Modelica.Blocks.Interfaces.BooleanOutput | sendOut | Turns 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