Buildings.Controls.OBC.CDL.Routing.Validation

Collection of models that validate the routing blocks of the CDL

Information

This package contains models that validate the blocks in Buildings.Controls.OBC.CDL.Routing.

The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Package Content

Name Description
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractSignal BooleanExtractSignal Validation model for extracting boolean signals
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractor BooleanExtractor Validation model for the boolean extractor block
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator BooleanScalarReplicator Validation model for the BooleanScalarReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter BooleanVectorFilter Validation model for the BooleanVectorFilter block
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator BooleanVectorReplicator Validation model for the BooleanVectorReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractSignal IntegerExtractSignal Validation model for extracting integer signals
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractor IntegerExtractor Validation model for the integer extractor block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator IntegerScalarReplicator Validation model for the IntegerScalarReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter IntegerVectorFilter Validation model for the IntegerVectorFilter block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator IntegerVectorReplicator Validation model for the IntegerVectorReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal RealExtractSignal Validation model for the extract signal block
Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor RealExtractor Validation model for the extractor block
Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator RealScalarReplicator Validation model for the RealScalarReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter RealVectorFilter Validation model for the RealVectorFilter block
Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator RealVectorReplicator Validation model for the RealVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractSignal Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractSignal

Validation model for extracting boolean signals

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractSignal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignal.

The instance extBooSig has the input vector with dimension of 4 and the extracting vector is [3, 2, 4]. Thus the output vectors is [u[3], u[2], u[4]].

The instance extBooSig1 has the input vector with dimension of 4 and the extracting vector is [3, 2, 4, 1, 1]. Thus the output vectors is [u[3], u[2], u[4], u[1], u[1]].

Note that when the extracting vector extract has any element with the value that is out of range [1, nin], e.g. [1, 4] for instance in extBooSig. It will issue error and the model will not translate.

Modelica definition

model BooleanExtractSignal "Validation model for extracting boolean signals" Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignal extBooSig( final nin=4, final nout=3, final extract={3,2,4}) "Block that extracts signal from a boolean input signal vector"; Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignal extBooSig1( final nin=4, final nout=5, final extract={3,2,4,1,1}) "Block that extracts signal from a boolean input signal vector"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( final k=true) "Block that outputs true signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( final k=false) "Block that outputs false signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( final period=0.2) "Generate pulse signal of type boolean"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( final period=0.3) "Generate pulse signal of type boolean"; equation connect(con1.y, extBooSig.u[1]); connect(booPul.y, extBooSig.u[2]); connect(booPul1.y, extBooSig.u[3]); connect(con.y, extBooSig.u[4]); connect(con1.y, extBooSig1.u[1]); connect(booPul.y, extBooSig1.u[2]); connect(booPul1.y, extBooSig1.u[3]); connect(con.y, extBooSig1.u[4]); end BooleanExtractSignal;

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractor Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractor

Validation model for the boolean extractor block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractor

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanExtractor.

The instances extIndBoo, extIndBoo1, extIndBoo2, extIndBoo3, and extIndBoo4 have the same input vector with dimension of 4. However, they have different extract index and thus different output.

Modelica definition

model BooleanExtractor "Validation model for the boolean extractor block" Buildings.Controls.OBC.CDL.Routing.BooleanExtractor extIndBoo( final nin=4) "Extracts signal from an input signal vector"; Buildings.Controls.OBC.CDL.Routing.BooleanExtractor extIndBoo1( final nin=4) "Extracts signal from an input signal vector when the extract index is out of the upper range"; Buildings.Controls.OBC.CDL.Routing.BooleanExtractor extIndBoo2( final nin=4) "Extracts signal from an input signal vector when the extract index is out of the lower range"; Buildings.Controls.OBC.CDL.Routing.BooleanExtractor extIndBoo3( final nin=4) "Extracts signal from an input signal vector when the extract index changes from within range to out of range"; Buildings.Controls.OBC.CDL.Routing.BooleanExtractor extIndBoo4( final nin=4) "Extracts signal from an input signal vector when the extract index changes from out of range to within range"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( final k=true) "Block that outputs true signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( final k=false) "Block that outputs false signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( final period=0.2) "Generate pulse signal of type boolean"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( final period=0.3) "Generate pulse signal of type boolean"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=2) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1( k=6) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2( k=0) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul( final amplitude=3, final period=1, final offset=-1) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul1( final amplitude=-3, final period=1, final offset=3) "Generate pulse signal of type Integer"; equation connect(conInt.y, extIndBoo.index); connect(conInt1.y, extIndBoo1.index); connect(con1.y, extIndBoo.u[1]); connect(booPul.y, extIndBoo.u[2]); connect(booPul1.y, extIndBoo.u[3]); connect(con.y, extIndBoo.u[4]); connect(con1.y, extIndBoo1.u[1]); connect(booPul.y, extIndBoo1.u[2]); connect(booPul1.y, extIndBoo1.u[3]); connect(con.y, extIndBoo1.u[4]); connect(con1.y, extIndBoo2.u[1]); connect(booPul.y, extIndBoo2.u[2]); connect(booPul1.y, extIndBoo2.u[3]); connect(con.y, extIndBoo2.u[4]); connect(conInt2.y, extIndBoo2.index); connect(con1.y, extIndBoo3.u[1]); connect(booPul.y, extIndBoo3.u[2]); connect(booPul1.y, extIndBoo3.u[3]); connect(con.y, extIndBoo3.u[4]); connect(intPul.y, extIndBoo3.index); connect(intPul1.y, extIndBoo4.index); connect(con1.y, extIndBoo4.u[1]); connect(booPul.y, extIndBoo4.u[2]); connect(booPul1.y, extIndBoo4.u[3]); connect(con.y, extIndBoo4.u[4]); end BooleanExtractor;

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator

Validation model for the BooleanScalarReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator.

Modelica definition

model BooleanScalarReplicator "Validation model for the BooleanScalarReplicator block" Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep( nout=3) "Block that outputs the array replicating input value"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( period=0.2) "Block that outputs boolean pulse"; equation connect(booPul.y,booRep.u); end BooleanScalarReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter

Validation model for the BooleanVectorFilter block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanVectorFilter.

Modelica definition

model BooleanVectorFilter "Validation model for the BooleanVectorFilter block" Buildings.Controls.OBC.CDL.Routing.BooleanVectorFilter booFil(nin=3, nout=2, msk={true,false,true}) "Block that filter the input vector"; Logical.Sources.Constant booInp[3](k={true,true,false}) "Boolean inputs"; equation connect(booInp.y, booFil.u); end BooleanVectorFilter;

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator

Validation model for the BooleanVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator.

Modelica definition

model BooleanVectorReplicator "Validation model for the BooleanVectorReplicator block" Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator booRep(nin=2, nout=3) "Block that outputs the vector replicating input value"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul[2](period=fill(0.2,2)) "Block that outputs boolean pulse"; equation connect(booPul.y, booRep.u); end BooleanVectorReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractSignal Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractSignal

Validation model for extracting integer signals

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractSignal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerExtractSignal.

The instance extIntSig has the input vector with dimension of 4 and the extracting vector is [3, 2, 4]. Thus the output vectors is [u[3], u[2], u[4]].

The instance extIntSig1 has the input vector with dimension of 4 and the extracting vector is [3, 2, 4, 2, 3]. Thus the output vectors is [u[3], u[2], u[4], u[2], u[3]].

Note that when the extracting vector extract has any element with the value that is out of range [1, nin], e.g. [1, 4] for instance in extIntSig. It will issue error and the model will not translate.

Modelica definition

model IntegerExtractSignal "Validation model for extracting integer signals" Buildings.Controls.OBC.CDL.Routing.IntegerExtractSignal extIntSig( final nin=4, final nout=3, final extract={3,2,4}) "Block that extracts signal from an integer input signal vector"; Buildings.Controls.OBC.CDL.Routing.IntegerExtractSignal extIntSig1( final nin=4, final nout=5, final extract={3,2,4,2,3}) "Block that extracts signal from an integer input signal vector"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2( final k=1) "Block that outputs integer constant"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul( final amplitude=1, final period=0.2) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul1( final period=0.3, final amplitude=2, final offset=-1) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=4) "Block that outputs integer constant"; equation connect(conInt2.y,extIntSig. u[1]); connect(intPul.y,extIntSig. u[2]); connect(intPul1.y,extIntSig. u[3]); connect(conInt3.y,extIntSig. u[4]); connect(conInt2.y, extIntSig1.u[1]); connect(intPul.y, extIntSig1.u[2]); connect(intPul1.y, extIntSig1.u[3]); connect(conInt3.y, extIntSig1.u[4]); end IntegerExtractSignal;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractor Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractor

Validation model for the integer extractor block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractor

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerExtractor.

The instances extIndInt, extIndInt1, extIndInt2, extIndInt3, and extIndInt4 have the same input vector with dimension of 4. However, they have different extract index and thus different output.

Modelica definition

model IntegerExtractor "Validation model for the integer extractor block" Buildings.Controls.OBC.CDL.Routing.IntegerExtractor extIndInt( final nin=4) "Extracts signal from an input signal vector"; Buildings.Controls.OBC.CDL.Routing.IntegerExtractor extIndInt1( final nin=4) "Extracts signal from an input signal vector when the extract index is out of the upper range"; Buildings.Controls.OBC.CDL.Routing.IntegerExtractor extIndInt2( final nin=4) "Extracts signal from an input signal vector when the extract index is out of the lower range"; Buildings.Controls.OBC.CDL.Routing.IntegerExtractor extIndInt3( final nin=4) "Extracts signal from an input signal vector when the extract index changes from within range to out of range"; Buildings.Controls.OBC.CDL.Routing.IntegerExtractor extIndInt4( final nin=4) "Extracts signal from an input signal vector when the extract index changes from out of range to within range"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2( final k=0) "Block that outputs integer constant"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=4) "Block that outputs integer constant"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul( final amplitude=1, final period=0.2) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul1( final period=0.3, final amplitude=2, final offset=-1) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=2) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(k=6) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4(k=0) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul2( final period=1, final amplitude=3, final offset=-1) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul3( final period=1, final amplitude=-3, final offset=3) "Generate pulse signal of type Integer"; equation connect(conInt1.y, extIndInt1.index); connect(conInt2.y, extIndInt.u[1]); connect(intPul.y, extIndInt.u[2]); connect(intPul1.y, extIndInt.u[3]); connect(conInt3.y, extIndInt.u[4]); connect(conInt2.y, extIndInt1.u[1]); connect(intPul.y, extIndInt1.u[2]); connect(intPul1.y, extIndInt1.u[3]); connect(conInt3.y, extIndInt1.u[4]); connect(conInt.y, extIndInt.index); connect(conInt4.y, extIndInt2.index); connect(conInt2.y, extIndInt2.u[1]); connect(intPul.y, extIndInt2.u[2]); connect(intPul1.y, extIndInt2.u[3]); connect(conInt3.y, extIndInt2.u[4]); connect(conInt2.y, extIndInt3.u[1]); connect(intPul.y, extIndInt3.u[2]); connect(intPul1.y, extIndInt3.u[3]); connect(conInt3.y, extIndInt3.u[4]); connect(intPul2.y, extIndInt3.index); connect(intPul3.y, extIndInt4.index); connect(conInt2.y, extIndInt4.u[1]); connect(intPul.y, extIndInt4.u[2]); connect(intPul1.y, extIndInt4.u[3]); connect(conInt3.y, extIndInt4.u[4]); end IntegerExtractor;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator

Validation model for the IntegerScalarReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator.

Modelica definition

model IntegerScalarReplicator "Validation model for the IntegerScalarReplicator block" Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator intRep( nout=3) "Block that outputs the array replicating input value"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram( height=5, duration=1, offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert Real input to Integer output"; equation connect(ram.y,reaToInt.u); connect(reaToInt.y,intRep.u); end IntegerScalarReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter

Validation model for the IntegerVectorFilter block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerVectorFilter.

Modelica definition

model IntegerVectorFilter "Validation model for the IntegerVectorFilter block" Buildings.Controls.OBC.CDL.Routing.IntegerVectorFilter intFil(nin=3, nout=2, msk={true,false,true}) "Block that filter the input vector"; Integers.Sources.Constant IntInp[3](k={1,2,3}) "Integer inputs"; equation connect(IntInp.y, intFil.u); end IntegerVectorFilter;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator

Validation model for the IntegerVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator.

Modelica definition

model IntegerVectorReplicator "Validation model for the IntegerVectorReplicator block" Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator intRep(nin=2, nout=3) "Block that outputs the vector replicating input value"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram[2]( height=fill(5,2), duration=fill(1,2), offset=fill(-2,2)) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt[2] "Convert Real input to Integer output"; equation connect(ram.y,reaToInt.u); connect(reaToInt.y,intRep.u); end IntegerVectorReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal

Validation model for the extract signal block

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealExtractSignal.

The instance extSig has the input vector with dimension of 4 and the extracting vector is [1, 2, 5]. Thus the output vectors is [u[1], u[2], u[5]].

The instance extSig1 has the input vector with dimension of 4 and the extracting vector is [1, 2, 5, 3, 4, 2]. Thus the output vectors is [u[1], u[2], u[5], u[3], u[4], u[2]].

Note that when the extracting vector extract has any element with the value that is out of range [1, nin], e.g. [1, 4] for instance in extSig. It will issue error and the model will not translate.

Modelica definition

model RealExtractSignal "Validation model for the extract signal block" Buildings.Controls.OBC.CDL.Routing.RealExtractSignal extSig( final nin=5, final nout=3, final extract={1,2,5}) "Block that extracts signals from an input signal vector"; Buildings.Controls.OBC.CDL.Routing.RealExtractSignal extSig1( final nin=5, final nout=6, final extract={1,2,5,3,4,2}) "Block that extracts signals from an input signal vector"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram( final height=5, final duration=1, final offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram1( final duration=1, final height=4, final offset=-1) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram2( final duration=1, final height=3, final offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pul( final amplitude=0.5, final period=0.2) "Generate pulse signal of type Real"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pul1( final period=0.2, final amplitude=1.5, final offset=-0.2) "Generate pulse signal of type Real"; equation connect(ram.y,extSig.u[1]); connect(pul.y,extSig.u[2]); connect(pul1.y,extSig.u[3]); connect(ram1.y,extSig.u[4]); connect(ram2.y,extSig.u[5]); connect(ram.y, extSig1.u[1]); connect(pul.y, extSig1.u[2]); connect(pul1.y, extSig1.u[3]); connect(ram1.y, extSig1.u[4]); connect(ram2.y, extSig1.u[5]); end RealExtractSignal;

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor

Validation model for the extractor block

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealExtractor.

The instances extIndSig, extIndSig1, extIndSig2, extIndSig3, and extIndSig4 have the same input vector with dimension of 5. However, they have different extract index and thus different output.

Modelica definition

model RealExtractor "Validation model for the extractor block" Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig( final nin=5) "Extracts signal from an input signal vector"; Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig1( final nin=5) "Extracts signal from an input signal vector when the extract index is out of the upper range"; Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig2( final nin=5) "Extracts signal from an input signal vector when the extract index is out of the lower range"; Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig3( final nin=5) "Extracts signal from an input signal vector when the extract index changes from within range to out of range"; Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig4( final nin=5) "Extracts signal from an input signal vector when the extract index changes from out of range to within range"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram( final height=5, final duration=1, final offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram1( final duration=1, final height=4, final offset=-1) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram2( final duration=1, final height=3, final offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pul( final amplitude=0.5, final period=0.2) "Generate pulse signal of type Real"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pul1( final period=0.2, final amplitude=1.5, final offset=-0.2) "Generate pulse signal of type Real"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=2) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1(k=6) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(k=0) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul( final amplitude=3, final period=1, final offset=-1) "Generate pulse signal of type Integer"; Buildings.Controls.OBC.CDL.Integers.Sources.Pulse intPul1( final amplitude=-3, final period=1, final offset=3) "Generate pulse signal of type Integer"; equation connect(ram.y,extIndSig.u[1]); connect(pul.y,extIndSig.u[2]); connect(pul1.y,extIndSig.u[3]); connect(ram1.y,extIndSig.u[4]); connect(ram2.y,extIndSig.u[5]); connect(conInt.y,extIndSig.index); connect(conInt1.y,extIndSig1.index); connect(ram.y,extIndSig1.u[1]); connect(pul.y,extIndSig1.u[2]); connect(pul1.y,extIndSig1.u[3]); connect(ram1.y,extIndSig1.u[4]); connect(ram2.y,extIndSig1.u[5]); connect(conInt2.y, extIndSig2.index); connect(ram.y, extIndSig2.u[1]); connect(pul.y, extIndSig2.u[2]); connect(pul1.y, extIndSig2.u[3]); connect(ram1.y, extIndSig2.u[4]); connect(ram2.y, extIndSig2.u[5]); connect(ram.y, extIndSig3.u[1]); connect(pul.y, extIndSig3.u[2]); connect(pul1.y, extIndSig3.u[3]); connect(ram1.y, extIndSig3.u[4]); connect(ram2.y, extIndSig3.u[5]); connect(ram.y, extIndSig4.u[1]); connect(pul.y, extIndSig4.u[2]); connect(pul1.y, extIndSig4.u[3]); connect(ram1.y, extIndSig4.u[4]); connect(ram2.y, extIndSig4.u[5]); connect(intPul.y, extIndSig3.index); connect(intPul1.y, extIndSig4.index); end RealExtractor;

Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator

Validation model for the RealScalarReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator.

Modelica definition

model RealScalarReplicator "Validation model for the RealScalarReplicator block" Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep( nout=3) "Block that outputs the array replicating input value"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram( height=5, duration=1, offset=-2) "Block that outputs ramp signal"; equation connect(ram.y,reaRep.u); end RealScalarReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter

Validation model for the RealVectorFilter block

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealVectorFilter.

Modelica definition

model RealVectorFilter "Validation model for the RealVectorFilter block" Buildings.Controls.OBC.CDL.Routing.RealVectorFilter reaFil(nin=3, nout=2, msk={true,false,true}) "Block that filter the input vector"; Reals.Sources.Constant ReaInp[3](k={1,2,3}) "Real inputs"; equation connect(ReaInp.y, reaFil.u); end RealVectorFilter;

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator

Validation model for the RealVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealVectorReplicator.

Modelica definition

model RealVectorReplicator "Validation model for the RealVectorReplicator block" Buildings.Controls.OBC.CDL.Routing.RealVectorReplicator reaRep(nin=2, nout=3) "Block that outputs the vector replicating input value"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ram[2]( height=fill(5,2), duration=fill(1,2), offset=fill(-2,2)) "Block that outputs ramp signal"; equation connect(ram.y,reaRep.u); end RealVectorReplicator;