modelBroker

Extends from BaseClasses.PartialAgent.

Information

Overview

  • This model is a broker agent which collects requests from room-agent and buys heat for the lowest price from producer agents.
  • It is based on communication via UDP and logic implemented with the help of the StateGraph Modelica library.
  • It is used together with at least one room or consumer agent and at least one producer agent.

Concept

The broker agent gets cooling- or heating requests from one or more room-agents and collects them to one big request. The broker then calls for proposals from all producer agents and afterwards collects the proposals. The best-suited price and capcity is chosen and confirmed to the related producer agent. The other agents are rejected. 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 broker agent. For further information please refer to the first reference.

Broker

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
RealstartTable[30001, 0, 0, 0, 0, 0, 0; 30002, 0, 0, 0, 0, 0, 0]Initialization table for the negotiation process. Fill first column with ProducerAgents

Components

TypeNameDefaultDescription
BooleanproposalsCompleteBoolean variable to describe whether all proposals have been collected
BooleanrequestCompleteBoolean variable to describe whether all requests are served by the current constellation
BooleanrejectsComplete
RealheatSupplierTable
IntegerproposalCounterInteger variable to describe proposalCounter
IntegercounterRejectInteger variable to describe counterReject
ReallowestPriceReal variable to define lowestPrice
IntegercounterInteger variable to describe counter
BooleanrequestsExceedSupplyBoolean variable to describe whteher requests exceed supply
Real[10,1]requestTableReal variable to define requestTable
Real[10,1]requestAddressesReal variable to define requestAddresses
RealheatingRequestSumReal variable to define the sum of heating requests
IntegerrequestCounterReal variable to define requestCounter
RealtotalPriceReal variable to define totalPrice
RealtotalHeatReal variable to define totalHeat
RealaveragePriceReal variable to define averagePrice
RealheatingCalculationSumReal variable to define the sum of heatingCalculation
IntegercheapestInteger variable to define the cheapest offer
RealheatingPriceSumReal variable to define the sum of heatingPrice
RealtotalaveragePriceReal variable to define totalaveragePrice
RealrestHeatReal variable to define restHeat
BooleancalculationDoneBoolean variable to annonce calculationDone
IntegerinformationCounterInteger variable to define informationCounter
BooleaninformationDoneBoolean variable to announce informationDone
BooleanfinalRequestDoneBoolean variable to announce finalRequestDone
Modelica.StateGraph.InitialStepwaiting
Modelica.StateGraph.TransitionWithSignalnewMessage
Modelica.StateGraph.Stepmessage
Modelica.Blocks.Math.IntegerChangeintegerChange
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal
Modelica.StateGraph.Steprequests
Modelica.StateGraph.TransitionwaitforRequests
Modelica.StateGraph.TransitionWithSignalnewRequests
Modelica.StateGraph.StepcallForProposal
Modelica.StateGraph.TransitionWithSignalnewProposal
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression1
Modelica.StateGraph.StepcollectProposal
Modelica.StateGraph.TransitionWithSignalallProposalsCollected
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression2
Modelica.StateGraph.StepsendOutRequest
Modelica.StateGraph.TransitionWithSignalnotFinished
Modelica.Blocks.Logical.Notnot2
Modelica.StateGraph.StepWithSignalsendCall
Modelica.StateGraph.Transitiontransition
Modelica.StateGraph.StepWithSignalsendRequest
Modelica.StateGraph.Transitiontransition1
Modelica.StateGraph.Stepcheck
Modelica.StateGraph.TransitionWithSignalcorrectPerformative
Modelica.StateGraph.Stepcheck1
Modelica.StateGraph.TransitionWithSignalcorrectPerformative1
Modelica.StateGraph.TransitionrequestNoted
Modelica.StateGraph.StepWithSignalsendConfirmation
Modelica.StateGraph.TransitionWithSignalactionConfirmed
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression5
Modelica.StateGraph.TransitionWithSignaltransitionWithSignal3
Modelica.StateGraph.StepcomposeNotUnderstood
Modelica.StateGraph.Transitiontransition2
Modelica.StateGraph.StepWithSignalsendNotUnderstood
Modelica.StateGraph.Transitiontransition4
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression6
Modelica.StateGraph.StepcomposeInformation
Modelica.StateGraph.TransitionWithSignalnewConfirm
Modelica.StateGraph.Stepcheck2
Modelica.StateGraph.TransitionWithSignalcorrectPerformative2
Modelica.StateGraph.StepcollectConfirm
Modelica.StateGraph.StepcomputePrice
Modelica.StateGraph.TransitionWithSignaltransition5
Modelica.StateGraph.Transitiontransition6
Modelica.StateGraph.StepWithSignalsendInformation
Modelica.StateGraph.TransitionWithSignalconfirmComplete
Modelica.StateGraph.StepcomputeFinalConstellation
Modelica.StateGraph.Transitiontransition7
Modelica.StateGraph.StepcheckRequestComplete
Modelica.StateGraph.TransitionWithSignalrequestsComplete
Modelica.StateGraph.TransitionWithSignalrequestsNotComplete
Modelica.StateGraph.TransitionWithSignalconfirmNotComplete
Modelica.Blocks.Logical.Oror1
Modelica.Blocks.Logical.Oror2
Modelica.Blocks.Logical.Oror3
Modelica.Blocks.Logical.Oror4
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression3
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression4
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression7
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression8
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression9
Modelica.StateGraph.Transitionabort
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression11
Modelica.StateGraph.StepprepareTableforRejections
Modelica.StateGraph.Transitiontransition3
Modelica.StateGraph.Transitionreset
Modelica.StateGraph.Transitionreset1
Modelica.StateGraph.Transitionreset2
Modelica.StateGraph.Transitionreset3
Modelica.StateGraph.StepcheckAvailability
Modelica.StateGraph.TransitionWithSignalenoughSupply
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression10
Modelica.StateGraph.SteplimitedSupplyAbort
Modelica.StateGraph.TransitionWithSignalenoughSupply1
Modelica.Blocks.Sources.BooleanExpressionbooleanExpression12
Modelica.StateGraph.Transitionreset4

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: Added handling of proposals in case demand exceeds supply
  • October 2015, by Felix Bünning: Developed and implemented