modelColdProducerAgent

Extends from BaseClasses.PartialAgent.

Information

Overview

  • This model is a producer agent which controls a cold producing device.
  • It is based on communication via UDP and logic implemented with the help of the StateGraph Modelica library.
  • It is used together with a broker-agent and at least one producer-agent.
  • It requires a CostFunction component to compute a proposal.

Concept

The cold producer agent recives a call for proposal from the broker with a requested capacity adjustment. It makes a proposal with the help of a Cost function for the adjustment and sends it back to the broker. If the proposal is accepted, the agent confirms the adjustment and adjusts the capacity of the controlled device accordingly. The logic is implemented with the help of the StateGraph library. Communication is realized with the help of the DeviceDriver library and follows the language standards for multi-agent-systems set by the FIPA to the highest possible extend for Modelica models. The following figure shows the behaviour of the consumer agent. For further information please refer to the first reference.

Producer agent

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.
  • FIPA ACL Message Structure Specification
  • FIPA Communicative Act Library Specification
  • 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
Integername (from PartialAgent)Name of the agent (five-digit number, eg. 10001)
BooleanusePoke (from PartialAgent)falseUse Modelica internal communication for inbox update
RealsampleRate (from PartialAgent)5Sample time for inbox update (used if usePoke=false)
RealmaxCapacity0Maximum capacity for heat/cold generation (heat positive, cold negative)
RealminCapacity-10000Minimum capacity for heat/cold generation (heat positive, cold negative)
BooleanmaxCapacityExternalfalseUse external input for minimal capacity

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanOutputsendOut (from PartialAgent)Turns true when the sending unit of the agent is active
Modelica.Blocks.Interfaces.RealInputcurrentCapacityInput for current capacity of device
Modelica.Blocks.Interfaces.RealOutputsetCapacityOutOutput for set capacity of device
Modelica.Blocks.Interfaces.RealOutputcalcCapacityOutput to connect with cost function
Modelica.Blocks.Interfaces.RealInputcalcCostInput to connect with cost function
Modelica.Blocks.Interfaces.BooleanInputOnOff_externalExternal on/off switch
Modelica.Blocks.Interfaces.RealInputminCapacityInputInput for external minimum capacity

Components

TypeNameDefaultDescription
HVACAgentBasedControl.Agents.MessageNotificationmessageNotification (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.Packagerpackager (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddRealcontent (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetRealget_content (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Communication.UDPReceiveuDPReceive_adapted (from PartialAgent)
UDPSend_adapteduDPSend_adapted (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegersender (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegerreceiver (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegerreply_to (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddRealontology (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetperformative (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetsender (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetreceiver (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetreply_to (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetRealgetontology (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegerperformative (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetMessageID (from PartialAgent)
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegermessageID (from PartialAgent)
Modelica.StateGraph.StateGraphRootstateGraphRoot (from PartialAgent)
SendSamplesendSample (from PartialAgent)
RealminCapacityInternalReal variable to define minCapacityInternal
RealcostCurrentReal variable to define costCurrent
RealcostNewReal variable to define costNew
RealsetCapacityReal variable to define setCapacity
RealcostDifferenceReal variable to define costDifference
RealtotalRequestReal variable to define totalRequest
RealcurrentCapacityDiscreteReal variable to define currentCapacityDiscrete
Modelica.StateGraph.InitialStepwaiting
Modelica.StateGraph.TransitionWithSignalnewMessage
Modelica.StateGraph.Stepmessage
Modelica.StateGraph.StepadjustHeat
Modelica.StateGraph.Transitiontransition2
Modelica.StateGraph.StepcomputeProposal
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal1
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression1
Modelica.StateGraph.Transitiontransition1
Modelica.StateGraph.StepWithSignalsendProposal
Modelica.Blocks.Math.IntegerChangeintegerChange
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal2
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression2
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal3
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression3
Modelica.Blocks.Logical.Notnot1
Modelica.StateGraph.StepcomposeNotUnderstood
Modelica.StateGraph.Transitiontransition3
Modelica.StateGraph.StepWithSignalsendNotUnderstood
Modelica.StateGraph.Transitiontransition4
Modelica.Blocks.Logical.Oror1
Modelica.StateGraph.StepWithSignalsendConfirmation
Modelica.StateGraph.Transitiontransition5
Modelica.Blocks.Logical.Oror2
Modelica.StateGraph.Stepconfirm
Modelica.StateGraph.Transitiontransition6
Modelica.StateGraph.TransitionWithSignalOff
Modelica.StateGraph.StepshutDown
Modelica.StateGraph.Transitiontransition7
Modelica.Blocks.Logical.Notnot2
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression4
Modelica.Blocks.Logical.Andand1
Modelica.StateGraph.Transitionreset
Modelica.Blocks.Discrete.ZeroOrderHoldzeroOrderHold

Revisions

  • December 2016, by Roozbeh Sangi:
    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: Implemented variable minimum load
  • October 2015, by Felix Bünning: Developed and implemented