modelIntermediateAgent

Extends from BaseClasses.PartialAgent.

Information

Overview

  • This model is an intermediate agent which represents devices to connect thermal circuits (heat exchanger, mixing valve).
  • 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.

Concept

The intermediate agent acts as a producer in front of one broker (bottom) and consumer in front of another broker (top). When it gets a call for proposal from the bottom broker, it passes it on to the top broker as an request. This broker handels the request and responds with a price information. The intermediate agent adds its own costs and passes it on as a proposal to the bottom broker. The proposal gets either rejected or accepted. This is passed on a confirm/reject to the top broker. The intermediate agent also adjusts it capacity according to the requested adjustment. 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 roomagent. For further information please refer to the first reference.

Intermediate 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
Integerbroker10003Name of the corresponding broker-agent
RealmaxCapacity10000maximum capacity

Components

TypeNameDefaultDescription
IntegercurrentClientInteger variable to define currentClient
RealcurrentCostReal variable to define currentCost
RealsetCapacityReal variable to define setCapacity
RealnewCostReal variable to define newCost
RealownCostReal variable to define ownCost
Modelica.StateGraph.InitialStepwaiting
Modelica.StateGraph.TransitionWithSignalnewMessage
Modelica.StateGraph.Stepmessage
Modelica.StateGraph.SteppassOnCall
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal
Modelica.StateGraph.Transitiontransition1
Modelica.StateGraph.StepWithSignalsendCall
Modelica.Blocks.Math.IntegerChangeintegerChange
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal3
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression3
Modelica.Blocks.Logical.Notnot1
Modelica.StateGraph.StepcomposeNotUnderstood
Modelica.StateGraph.Transitiontransition3
Modelica.StateGraph.StepWithSignalsendNotUnderstood
Modelica.StateGraph.Transitiontransition4
Modelica.StateGraph.TransitionWithSignalfromTopBroker
Modelica.StateGraph.TransitionWithSignalnewMessage1
Modelica.StateGraph.Stepcheck
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression4
Modelica.StateGraph.SteppassOnInformation
Modelica.StateGraph.Transitiontransition7
Modelica.StateGraph.StepWithSignalsendInformation
Modelica.StateGraph.TransitionWithSignalnewMessage2
Modelica.StateGraph.Stepcheck1
Modelica.StateGraph.TransitionWithSignalfromBottomBroker
Modelica.StateGraph.SteppassOnConfirmation
Modelica.StateGraph.Transitiontransition8
Modelica.StateGraph.StepWithSignalsendConfirmation
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression1
Modelica.StateGraph.Transitiontransition2
Modelica.StateGraph.StepconfirmToBottom
Modelica.StateGraph.Transitiontransition5
Modelica.StateGraph.StepWithSignalsendConfirmation1
Modelica.StateGraph.Transitiontransition6
Modelica.Blocks.Logical.Oror1
Modelica.Blocks.Logical.Oror2
Modelica.Blocks.Logical.Oror3
Modelica.Blocks.Logical.Oror4
Modelica.Blocks.Interfaces.RealOutputcalcCapacityOutput to connect with cost function
Modelica.Blocks.Interfaces.RealInputcalcCostInput to connect with cost function
Modelica.Blocks.Interfaces.RealInputcurrentCapacityInput for current capacity of device
Modelica.Blocks.Interfaces.RealOutputsetCapacityOutOutput for set capacity of device
Modelica.StateGraph.Transitionreset
Modelica.StateGraph.Transitionreset1
Modelica.Blocks.Interfaces.BooleanInputOnOff_externalExternal on/off switch
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression2
Modelica.Blocks.Logical.Andand1
Modelica.StateGraph.StepshutDown
Modelica.StateGraph.Transitiontransition9
Modelica.StateGraph.TransitionWithSignalOff
Modelica.Blocks.Logical.Notnot2

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
  • October 2015, by Felix Bünning: Developed and implemented