modelBuildingHeating

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Overview

  • This model is a an example to show agent-based control with the provided library for a simple heating system
  • The system consists of two thermal zones and two heat sources
  • The agents used are two RoomAgents, two HeatProducerAgents, one Broker and one MessageNotification

Concept

The two thermal zones are connected to a weather model, which results in different thermal loads depending on the boundary conditions. Each zone is equipped with a thermostatic valve, which allows to control the temperature in the zones to a limited degree. When the temperature in the zones goes above 20.5 or below 19.5 degC (and the valves are fully closed or opened) the RoomAgents become active and order an increase or decrease in heat supply from the broker. The broker calls for proposals from both heat suplliers. The suppliers use cost functions to determine the cost for the adjustments. The cheaper supplier is selcted by the broker and increases or decreases its heat supply.

The trading procedure can be followed in the command line window of the dymosim.exe or found in the dslog.txt file after simulation. For one negotiation round it looks as follows.

  • RoomAgent 10002 requests 25.1956 W of heat from Broker 10003.
  • Broker 10003 collected the request of 25.1956 W of heat from Consumer 10002.
  • Broker 10003 calls for proposal of 25.1956 W of heat from Producer 30001.
  • HeatProducerAgent 30001 proposes adjustment of 25.1956 W for a price of 7.55868.
  • Broker 10003 collects proposal of 25.1956 W of heat for the price of 7.55868 from Producer 30001.
  • Broker 10003 calls for proposal of 25.1956 W of heat from Producer 30002.
  • HeatProducerAgent 30002 proposes adjustment of 25.1956 W for a price of 15.1174.
  • Broker 10003 collects proposal of 25.1956 W of heat for the price of 15.1174 from Producer 30002.
  • Broker 10003 calculates an average price of 0.3 per W of heat.
  • Broker 10003 asks for a confirmation of 25.1956 W of heat for the total price of 7.55868 from Consumer 10002.
  • RoomAgent 10002 confirms the request of 25.1956 W of heat for a price of 7.55868.
  • 25.1956 W of heat were confirmed by consumers at broker 10003. Go on to final requests to producers.
  • Broker 10003 accepts the proposal of 30001 and orders 25.1956 W of heat.
  • HeatProducerAgent 30001 confirms the adjustment of 25.1956 W of heat. The setpoint is now 2251.37W.
  • Broker 10003 rejects the proposal of 30002.
  • July 2017, by Roozbeh Sangi: Documentation and modified
  • November 2016, by Felix Bünning: Developed and implemented

Parameters

TypeNameDefaultDescription
AixLib.DataBase.Weather.TRYWeatherBaseDataDefinitionweatherDataDayAixLib.DataBase.Weather.TRYWinterDay()

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealOutputT_roomTemperature in room
Modelica.Blocks.Interfaces.RealOutputT_room1Temperature in room
Modelica.Blocks.Interfaces.RealOutputCap_deviceCapacity of heating device
Modelica.Blocks.Interfaces.RealOutputCap_device1Capacity of heating device

Components

TypeNameDefaultDescription
ThermalZones.ReducedOrder.ThermalZone.ThermalZonethermalZone
ThermalZones.ReducedOrder.ThermalZone.ThermalZonethermalZone1
AixLib.Fluid.Movers.FlowControlled_m_flowfan
AixLib.Fluid.HeatExchangers.HeaterCooler_uhea
AixLib.Fluid.HeatExchangers.HeaterCooler_uhea1
Fluid.Sources.Boundary_pTbou
Agents.RoomAgentroomAgent
Agents.RoomAgentroomAgent1
Modelica.Blocks.Sources.ConstantroomSetPoint
Agents.MessageNotificationmessageNotification
Agents.HeatProducerAgentheatProducerAgent
Agents.HeatProducerAgentheatProducerAgent1
CostFunctions.Economic.Constant_Economic_CostconstantFactor
CostFunctions.Economic.Constant_Economic_CostconstantFactor1
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression
Modelica.Blocks.Sources.ConstantmassFlowRate
Agents.Brokerbroker
Modelica.Fluid.Vessels.ClosedVolumevolume
Modelica.Fluid.Vessels.ClosedVolumevolume1
Modelica.Thermal.HeatTransfer.Components.ThermalConductorthermalConductor
Modelica.Thermal.HeatTransfer.Components.ThermalConductorthermalConductor1
AixLib.Fluid.Actuators.Valves.TwoWayLinearval1
Modelica.Blocks.Continuous.LimPIDPID1
AixLib.Fluid.Actuators.Valves.TwoWayLinearval
Modelica.Blocks.Continuous.LimPIDPID2
Modelica.Blocks.Sources.Constant[3]internalGains
BoundaryConditions.WeatherData.ReaderTMY3weaDatWeather data reader
Modelica.Fluid.Systemsystem
Modelica.Blocks.Sources.CombiTimeTableInternalHeatGain
Modelica.Blocks.Math.Gain[3]gain
Fluid.FixedResistances.HydraulicResistancehydraulicResistance