VICUS Library
Documentation of Vicus library
Loading...
Searching...
No Matches
VICUS::NetworkController Class Reference

#include <VICUS_NetworkController.h>

Inheritance diagram for VICUS::NetworkController:
[legend]

Public Types

enum  ModelType { MT_Constant , MT_Scheduled , NUM_MT }
 
enum  ControlledProperty {
  CP_TemperatureDifference , CP_TemperatureDifferenceOfFollowingElement , CP_ThermostatValue , CP_MassFlux ,
  CP_PumpOperation , CP_PressureDifferenceWorstpoint , NUM_CP
}
 
enum  ControllerType {
  CT_PController , CT_PIController , CT_PIDController , CT_OnOffController ,
  NUM_CT
}
 
enum  para_t {
  P_Kp , P_Ki , P_Kd , P_TemperatureDifferenceSetpoint ,
  P_MassFluxSetpoint , P_HeatLossOfFollowingElementThreshold , P_RelControllerErrorForIntegratorReset , P_PressureDifferenceSetpoint ,
  NUM_P
}
 
enum  References { ID_ThermostatZone , ID_Schedule , NUM_ID }
 
- Public Types inherited from VICUS::AbstractDBElement
enum  ComparisonResult { Equal , OnlyMetaDataDiffers , Different }
 

Public Member Functions

 NetworkController ()
 
VICUS_READWRITE_OVERRIDE VICUS_COMPARE_WITH_ID bool isValid (const Database< Schedule > &scheduleDB) const
 
ComparisonResult equal (const AbstractDBElement *other) const override
 
void checkParameters () const
 
- Public Member Functions inherited from VICUS::AbstractDBElement
 AbstractDBElement ()=default
 
 AbstractDBElement (unsigned int id, const IBK::MultiLanguageString &name)
 
virtual ~AbstractDBElement ()
 
virtual void readXML (const TiXmlElement *element)=0
 
virtual TiXmlElement * writeXML (TiXmlElement *parent) const =0
 
void collectChildren (std::set< const AbstractDBElement * > &allChildrenRefs) const
 
void collectLocalChildren (std::set< AbstractDBElement * > &localChildrenRefs) const
 
const QString sourceName () const
 

Static Public Member Functions

static para_t setPointType (ControlledProperty controlledProperty)
 

Public Attributes

ModelType m_modelType = NUM_MT
 
ControllerType m_controllerType = NUM_CT
 
ControlledProperty m_controlledProperty = NUM_CP
 
IDType m_idReferences [NUM_ID]
 
double m_maximumControllerResultValue = 0
 
IBK::Parameter m_para [NUM_P]
 
- Public Attributes inherited from VICUS::AbstractDBElement
unsigned int m_id = INVALID_ID
 
IBK::MultiLanguageString m_displayName
 
QColor m_color
 
bool m_builtIn = false
 
bool m_local = true
 
std::set< AbstractDBElement * > m_childrenRefs
 
bool m_isReferenced = false
 
std::string m_errorMsg
 

Detailed Description

This class is a copy of NANDRAD::HydraulicNetworkControlElement with some added members, methods to make it usable as a class for the VICUS Database.

NOTE: Other options like deriving it from the base class doesnt really bring a benefit since we need all the declarations for the code generator anyway. Also making a child element of type NANDRAD::HydraulicNetworkControlElement does not work, since we want to have uniform member names like 'm_id' and 'm_displayName' for the DB read/write process with template functions This this should be the best solution ...

Member Enumeration Documentation

◆ ControlledProperty

Controlled property used as signal input for the controller.

Enumerator
CP_TemperatureDifference 

Temperature difference is computed from pre-defined heat loss and compared against target temperature difference.

CP_TemperatureDifferenceOfFollowingElement 

Temperature difference of the following flow element is computed from outlet temperature of this element and outlet temperature of the following element. This temperature difference is compared against target temperature difference.

CP_ThermostatValue 

Thermostat heating/cooling control values determine whether valve is open or closed.

CP_MassFlux 

Try to achieve target mass flow in current element.

CP_PumpOperation 

Switch pump on or off depending on heat flux of following element

CP_PressureDifferenceWorstpoint 

Controlles pressure difference at point (element group / subnetwork) with lowest pressure difference, considering m_observedPressureDiffElementIds

NUM_CP 

◆ ControllerType

Different model variants.

Enumerator
CT_PController 
CT_PIController 
CT_PIDController 
CT_OnOffController 
NUM_CT 

◆ ModelType

Defines variability options for set point values.

Enumerator
MT_Constant 
MT_Scheduled 

Generates 'TemperatureDifferenceSetpointSchedule' or 'MassFluxSetpointSchedule' depending on controlled property for each network element that uses this controller. InputRef-Typ: NetworkElement, id = id of network element that uses the component with this controller

NUM_MT 

◆ para_t

Model parameters.

Enumerator
P_Kp 
P_Ki 
P_Kd 
P_TemperatureDifferenceSetpoint 
P_MassFluxSetpoint 
P_HeatLossOfFollowingElementThreshold 
P_RelControllerErrorForIntegratorReset 
P_PressureDifferenceSetpoint 
NUM_P 

◆ References

Integer/whole number parameters.

Enumerator
ID_ThermostatZone 

Id of zone whose thermostat is used for control: only for controlled property 'ThermostatValue'.

ID_Schedule 

Id of schedule with control value.

NUM_ID 

Constructor & Destructor Documentation

◆ NetworkController()

VICUS::NetworkController::NetworkController ( )

Member Function Documentation

◆ checkParameters()

void VICUS::NetworkController::checkParameters ( ) const

A copy of NANDRAD::HydraulicNetworkControlElement::checkParameters

◆ equal()

AbstractDBElement::ComparisonResult VICUS::NetworkController::equal ( const AbstractDBElement other) const
overridevirtual

Comparison operator

Implements VICUS::AbstractDBElement.

◆ isValid()

bool VICUS::NetworkController::isValid ( const Database< Schedule > &  scheduleDB) const

Checks if all parameters are valid.

◆ setPointType()

NetworkController::para_t VICUS::NetworkController::setPointType ( ControlledProperty  controlledProperty)
static

Returns the parameter / type of set point for the given type of controlled property

Member Data Documentation

◆ m_controlledProperty

ControlledProperty VICUS::NetworkController::m_controlledProperty = NUM_CP

property which shall be controlled (temperature difference, ...)

◆ m_controllerType

ControllerType VICUS::NetworkController::m_controllerType = NUM_CT

Controller type (P, PI, ...)

◆ m_idReferences

IDType VICUS::NetworkController::m_idReferences[NUM_ID]

Integer/ID reference parameters.

◆ m_maximumControllerResultValue

double VICUS::NetworkController::m_maximumControllerResultValue = 0

Used to cut the system input, if this is zero, it will not be considered

◆ m_modelType

ModelType VICUS::NetworkController::m_modelType = NUM_MT

Determines variability of setpoint parameters.

◆ m_para

IBK::Parameter VICUS::NetworkController::m_para[NUM_P]

Controller parameters.


The documentation for this class was generated from the following files: