Buildings.Controls.Predictors.Validation.BaseClasses

Package with base classes for Buildings.Controls.Predictors.Examples

Information

This package contains base classes that are used to construct the models in Buildings.Controls.Predictors.Validation.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase PartialSimpleTestCase Partial base class for simple test case of base load prediction

Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase

Partial base class for simple test case of base load prediction

Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase

Information

Partial base class to build test for the load prediction.

This model has been added to the library to verify and demonstrate the correct implementation of the load prediction model based on a simple input scenario.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

partial model PartialSimpleTestCase "Partial base class for simple test case of base load prediction" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Time tPeriod=24*3600 "Period"; parameter Modelica.Units.SI.Time tSample=3600 "Sampling period"; parameter Integer nPre(min=1) = 12 "Number of time steps to predict"; ElectricalLoad baseLoad( final nPre=nPre, use_dayOfAdj=false, predictionModel=Buildings.Controls.Predictors.Types.PredictionModel.Average) "Baseload prediction"; Modelica.Blocks.Sources.BooleanPulse tri( width=4/24*100/7, period=7*tPeriod, startTime=1.5*tPeriod) "Sample trigger"; Sources.DayType dayType(nout=2) "Outputs the type of the day for each hour where load is to be predicted"; Modelica.Blocks.Logical.Not notEventDay "Output true if it is not an event day"; // The Sampler is reimplemented to avoid in Dymola 2016 the translation warning // for the models in the parent package: // The initial conditions for variables of type Boolean are not fully specified. // Dymola has selected default initial conditions. // Assuming fixed default start value for the discrete non-states: // ...firstTrigger(start = false) // ... protected block Sampler extends Modelica.Blocks.Discrete.Sampler( firstTrigger(start=false, fixed=true)); end Sampler; equation connect(tri.y, notEventDay.u); connect(notEventDay.y, baseLoad.storeHistory); connect(dayType.y, baseLoad.typeOfDay); end PartialSimpleTestCase;

Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase.Sampler Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase.Sampler


Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase.Sampler

Information

Extends from Modelica.Blocks.Discrete.Sampler (Ideal sampling of continuous signals).

Parameters

TypeNameDefaultDescription
TimesamplePeriod Sample period of component [s]
TimestartTime0First sample time instant [s]

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal

Modelica definition

block Sampler extends Modelica.Blocks.Discrete.Sampler( firstTrigger(start=false, fixed=true)); end Sampler;