VICUS Library
Documentation of Vicus library
|
#include <VICUS_SubNetwork.h>
Public Member Functions | |
VICUS_READWRITE_OVERRIDE VICUS_COMPARE_WITH_ID bool | isValid (const Database< NetworkComponent > &compDB, const Database< NetworkController > &ctrlDB, const Database< Schedule > &scheduleDB) const |
ComparisonResult | equal (const AbstractDBElement *other) const override |
const NetworkComponent * | heatExchangeComponent (const Database< NetworkComponent > &compDB) 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 |
Public Attributes | |
std::vector< NetworkElement > | m_elements |
unsigned int | m_idHeatExchangeElement = INVALID_ID |
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 |
Static Public Attributes | |
static const unsigned int | INLET_ID = 333333 |
static const unsigned int | OUTLET_ID = 666666 |
Additional Inherited Members | |
Public Types inherited from VICUS::AbstractDBElement | |
enum | ComparisonResult { Equal , OnlyMetaDataDiffers , Different } |
Defines the structure of a sub-network (e.g. building heat exchanger with control value) that can be instantiated several times in different nodes. SubNetwork objects are referenced by Node objects.
A sub-network is a template for a structure/network of individual flow elements that is used many times in the global network. Individual instances of a sub-network only differ in the heat exchange parametrization, e.g. energy loss/gain in buildings.
There can be only one element in a sub-network with heat exchange.
|
overridevirtual |
Comparison operator
Implements VICUS::AbstractDBElement.
const NetworkComponent * VICUS::SubNetwork::heatExchangeComponent | ( | const Database< NetworkComponent > & | compDB | ) | const |
Access function to the component of the heat exchanging element. Returns pointer to database network component. Returns nullptr if there is no such element or the reference is invalid.
bool VICUS::SubNetwork::isValid | ( | const Database< NetworkComponent > & | compDB, |
const Database< NetworkController > & | ctrlDB, | ||
const Database< Schedule > & | scheduleDB | ||
) | const |
Checks if all referenced materials exist and if their parameters are valid.
|
static |
std::vector<NetworkElement> VICUS::SubNetwork::m_elements |
Defines sub-network through elements, connected by implicitely numbered internal nodes. Nodes with INLET_ID and OUTLET_ID represent inlet and outlet nodes of the sub network respectively There must be only one inlet and one outlet node! NOTE: the heat exchange property of the elements are not used, instead, we assign the heat exchange property of the correspoinding node (the parent of this SubNetwork) using the heatExchangeElementId
unsigned int VICUS::SubNetwork::m_idHeatExchangeElement = INVALID_ID |
Stores id of element with heat exchange parameterization. INVALID_ID means no heat exchange.
|
static |