modelHeatProducerAgent
Extends from BaseClasses.PartialAgent.
Information
Overview
- This model is a producer agent which controls a heat 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 consumer or room agent.
- It requires a CostFunction component to compute a proposal.
Concept
The heat 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.
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 | maxCapacity | 100000 | maximum capacity for heatgeneration |
| Real | minCapacity | 0 | minimum capacity for heatgeneration |
| Boolean | maxCapacityExternal | false | Real variable to define maxCapacityExternal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | costCurrent | Real variable to define costCurrent | |
| Real | costNew | Real variable to define costNew | |
| Real | setCapacity | Real variable to define setCapacity | |
| Real | costDifference | Real variable to define costDifference | |
| Real | totalRequest | Real variable to define totalRequest | |
| Real | currentCapacityDiscrete | Real variable to define currentCapacityDiscrete | |
| Real | maxCapacityInternal | Real variable to define maxCapacityInternal | |
| Real | calcCapacityInternal | Real variable to define calcCapacityInternal | |
| Modelica.StateGraph.InitialStep | waiting | ||
| Modelica.StateGraph.TransitionWithSignal | newMessage | ||
| Modelica.StateGraph.Step | message | ||
| Modelica.StateGraph.Step | adjustHeat | ||
| Modelica.StateGraph.TransitionWithSignal | transition2 | ||
| Modelica.StateGraph.Step | computeProposal | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal1 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression1 | ||
| Modelica.StateGraph.Transition | transition1 | ||
| Modelica.StateGraph.StepWithSignal | sendProposal | ||
| Modelica.Blocks.Math.IntegerChange | integerChange | ||
| Modelica.StateGraph.TransitionWithSignal | transitionWithSignal2 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression2 | ||
| 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.Blocks.Logical.Or | or1 | ||
| Modelica.Blocks.Interfaces.RealInput | currentCapacity | Input for current capacity of device | |
| Modelica.Blocks.Interfaces.RealOutput | setCapacityOut | Output for set capacity of device | |
| Modelica.StateGraph.StepWithSignal | sendConfirmation | ||
| Modelica.StateGraph.Transition | transition5 | ||
| Modelica.Blocks.Logical.Or | or2 | ||
| Modelica.StateGraph.Step | confirm | ||
| Modelica.StateGraph.Transition | transition6 | ||
| 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.BooleanInput | OnOff_external | External on/off switch | |
| Modelica.StateGraph.Step | shutDown | ||
| Modelica.StateGraph.TransitionWithSignal | Off | ||
| Modelica.Blocks.Logical.Not | not2 | ||
| Modelica.StateGraph.Transition | transition7 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression4 | ||
| Modelica.Blocks.Logical.And | and1 | ||
| Modelica.StateGraph.Transition | reset | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression5 | ||
| Modelica.Blocks.Interfaces.RealInput | maxCapacityInput | Input for external maximum capacity | |
| Modelica.Blocks.Discrete.ZeroOrderHold | zeroOrderHold | ||
| Modelica.Blocks.Sources.RealExpression | realExpression |
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 maximum load
- October 2015, by Felix Bünning: Developed and implemented