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.
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 |
|---|---|---|---|
| Integer | broker | 10003 | Name of the corresponding broker-agent |
| Real | maxCapacity | 10000 | maximum capacity |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | currentClient | Integer variable to define currentClient | |
| Real | currentCost | Real variable to define currentCost | |
| Real | setCapacity | Real variable to define setCapacity | |
| Real | newCost | Real variable to define newCost | |
| Real | ownCost | Real variable to define ownCost | |
| Modelica.StateGraph.InitialStep | waiting | ||
| Modelica.StateGraph.TransitionWithSignal | newMessage | ||
| Modelica.StateGraph.Step | message | ||
| Modelica.StateGraph.Step | passOnCall | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal | ||
| Modelica.StateGraph.Transition | transition1 | ||
| Modelica.StateGraph.StepWithSignal | sendCall | ||
| Modelica.Blocks.Math.IntegerChange | integerChange | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal3 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression3 | ||
| Modelica.Blocks.Logical.Not | not1 | ||
| Modelica.StateGraph.Step | composeNotUnderstood | ||
| Modelica.StateGraph.Transition | transition3 | ||
| Modelica.StateGraph.StepWithSignal | sendNotUnderstood | ||
| Modelica.StateGraph.Transition | transition4 | ||
| Modelica.StateGraph.TransitionWithSignal | fromTopBroker | ||
| Modelica.StateGraph.TransitionWithSignal | newMessage1 | ||
| Modelica.StateGraph.Step | check | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression4 | ||
| Modelica.StateGraph.Step | passOnInformation | ||
| Modelica.StateGraph.Transition | transition7 | ||
| Modelica.StateGraph.StepWithSignal | sendInformation | ||
| Modelica.StateGraph.TransitionWithSignal | newMessage2 | ||
| Modelica.StateGraph.Step | check1 | ||
| Modelica.StateGraph.TransitionWithSignal | fromBottomBroker | ||
| Modelica.StateGraph.Step | passOnConfirmation | ||
| Modelica.StateGraph.Transition | transition8 | ||
| Modelica.StateGraph.StepWithSignal | sendConfirmation | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression1 | ||
| Modelica.StateGraph.Transition | transition2 | ||
| Modelica.StateGraph.Step | confirmToBottom | ||
| Modelica.StateGraph.Transition | transition5 | ||
| Modelica.StateGraph.StepWithSignal | sendConfirmation1 | ||
| Modelica.StateGraph.Transition | transition6 | ||
| Modelica.Blocks.Logical.Or | or1 | ||
| Modelica.Blocks.Logical.Or | or2 | ||
| Modelica.Blocks.Logical.Or | or3 | ||
| Modelica.Blocks.Logical.Or | or4 | ||
| Modelica.Blocks.Interfaces.RealOutput | calcCapacity | Output to connect with cost function | |
| Modelica.Blocks.Interfaces.RealInput | calcCost | Input to connect with cost function | |
| Modelica.Blocks.Interfaces.RealInput | currentCapacity | Input for current capacity of device | |
| Modelica.Blocks.Interfaces.RealOutput | setCapacityOut | Output for set capacity of device | |
| Modelica.StateGraph.Transition | reset | ||
| Modelica.StateGraph.Transition | reset1 | ||
| Modelica.Blocks.Interfaces.BooleanInput | OnOff_external | External on/off switch | |
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression2 | ||
| Modelica.Blocks.Logical.And | and1 | ||
| Modelica.StateGraph.Step | shutDown | ||
| Modelica.StateGraph.Transition | transition9 | ||
| Modelica.StateGraph.TransitionWithSignal | Off | ||
| Modelica.Blocks.Logical.Not | not2 |
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