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.
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
| Type | Name | Default | Description |
|---|---|---|---|
| Real | startTable | [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
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | proposalsComplete | Boolean variable to describe whether all proposals have been collected | |
| Boolean | requestComplete | Boolean variable to describe whether all requests are served by the current constellation | |
| Boolean | rejectsComplete | ||
| Real | heatSupplierTable | ||
| Integer | proposalCounter | Integer variable to describe proposalCounter | |
| Integer | counterReject | Integer variable to describe counterReject | |
| Real | lowestPrice | Real variable to define lowestPrice | |
| Integer | counter | Integer variable to describe counter | |
| Boolean | requestsExceedSupply | Boolean variable to describe whteher requests exceed supply | |
| Real[10,1] | requestTable | Real variable to define requestTable | |
| Real[10,1] | requestAddresses | Real variable to define requestAddresses | |
| Real | heatingRequestSum | Real variable to define the sum of heating requests | |
| Integer | requestCounter | Real variable to define requestCounter | |
| Real | totalPrice | Real variable to define totalPrice | |
| Real | totalHeat | Real variable to define totalHeat | |
| Real | averagePrice | Real variable to define averagePrice | |
| Real | heatingCalculationSum | Real variable to define the sum of heatingCalculation | |
| Integer | cheapest | Integer variable to define the cheapest offer | |
| Real | heatingPriceSum | Real variable to define the sum of heatingPrice | |
| Real | totalaveragePrice | Real variable to define totalaveragePrice | |
| Real | restHeat | Real variable to define restHeat | |
| Boolean | calculationDone | Boolean variable to annonce calculationDone | |
| Integer | informationCounter | Integer variable to define informationCounter | |
| Boolean | informationDone | Boolean variable to announce informationDone | |
| Boolean | finalRequestDone | Boolean variable to announce finalRequestDone | |
| Modelica.StateGraph.InitialStep | waiting | ||
| Modelica.StateGraph.TransitionWithSignal | newMessage | ||
| Modelica.StateGraph.Step | message | ||
| Modelica.Blocks.Math.IntegerChange | integerChange | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal | ||
| Modelica.StateGraph.Step | requests | ||
| Modelica.StateGraph.Transition | waitforRequests | ||
| Modelica.StateGraph.TransitionWithSignal | newRequests | ||
| Modelica.StateGraph.Step | callForProposal | ||
| Modelica.StateGraph.TransitionWithSignal | newProposal | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression1 | ||
| Modelica.StateGraph.Step | collectProposal | ||
| Modelica.StateGraph.TransitionWithSignal | allProposalsCollected | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression2 | ||
| Modelica.StateGraph.Step | sendOutRequest | ||
| Modelica.StateGraph.TransitionWithSignal | notFinished | ||
| Modelica.Blocks.Logical.Not | not2 | ||
| Modelica.StateGraph.StepWithSignal | sendCall | ||
| Modelica.StateGraph.Transition | transition | ||
| Modelica.StateGraph.StepWithSignal | sendRequest | ||
| Modelica.StateGraph.Transition | transition1 | ||
| Modelica.StateGraph.Step | check | ||
| Modelica.StateGraph.TransitionWithSignal | correctPerformative | ||
| Modelica.StateGraph.Step | check1 | ||
| Modelica.StateGraph.TransitionWithSignal | correctPerformative1 | ||
| Modelica.StateGraph.Transition | requestNoted | ||
| Modelica.StateGraph.StepWithSignal | sendConfirmation | ||
| Modelica.StateGraph.TransitionWithSignal | actionConfirmed | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression5 | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal3 | ||
| Modelica.StateGraph.Step | composeNotUnderstood | ||
| Modelica.StateGraph.Transition | transition2 | ||
| Modelica.StateGraph.StepWithSignal | sendNotUnderstood | ||
| Modelica.StateGraph.Transition | transition4 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression6 | ||
| Modelica.StateGraph.Step | composeInformation | ||
| Modelica.StateGraph.TransitionWithSignal | newConfirm | ||
| Modelica.StateGraph.Step | check2 | ||
| Modelica.StateGraph.TransitionWithSignal | correctPerformative2 | ||
| Modelica.StateGraph.Step | collectConfirm | ||
| Modelica.StateGraph.Step | computePrice | ||
| Modelica.StateGraph.TransitionWithSignal | transition5 | ||
| Modelica.StateGraph.Transition | transition6 | ||
| Modelica.StateGraph.StepWithSignal | sendInformation | ||
| Modelica.StateGraph.TransitionWithSignal | confirmComplete | ||
| Modelica.StateGraph.Step | computeFinalConstellation | ||
| Modelica.StateGraph.Transition | transition7 | ||
| Modelica.StateGraph.Step | checkRequestComplete | ||
| Modelica.StateGraph.TransitionWithSignal | requestsComplete | ||
| Modelica.StateGraph.TransitionWithSignal | requestsNotComplete | ||
| Modelica.StateGraph.TransitionWithSignal | confirmNotComplete | ||
| Modelica.Blocks.Logical.Or | or1 | ||
| Modelica.Blocks.Logical.Or | or2 | ||
| Modelica.Blocks.Logical.Or | or3 | ||
| Modelica.Blocks.Logical.Or | or4 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression3 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression4 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression7 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression8 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression9 | ||
| Modelica.StateGraph.Transition | abort | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression11 | ||
| Modelica.StateGraph.Step | prepareTableforRejections | ||
| Modelica.StateGraph.Transition | transition3 | ||
| Modelica.StateGraph.Transition | reset | ||
| Modelica.StateGraph.Transition | reset1 | ||
| Modelica.StateGraph.Transition | reset2 | ||
| Modelica.StateGraph.Transition | reset3 | ||
| Modelica.StateGraph.Step | checkAvailability | ||
| Modelica.StateGraph.TransitionWithSignal | enoughSupply | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression10 | ||
| Modelica.StateGraph.Step | limitedSupplyAbort | ||
| Modelica.StateGraph.TransitionWithSignal | enoughSupply1 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression12 | ||
| Modelica.StateGraph.Transition | reset4 |
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