Buildings.Controls.OBC.CDL.Integers.Validation

Collection of models that validate the integer blocks of the CDL

Information

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

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.Integers.Validation.Abs Abs Validation model for the absolute block
Buildings.Controls.OBC.CDL.Integers.Validation.Add Add Validation model for the Add block
Buildings.Controls.OBC.CDL.Integers.Validation.Change Change Validation model for the Change block
Buildings.Controls.OBC.CDL.Integers.Validation.Equal Equal Validation model for the Equal block
Buildings.Controls.OBC.CDL.Integers.Validation.Greater Greater Validation model for the Greater block
Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqual GreaterEqual Validation model for the GreaterEqual block
Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqualThreshold GreaterEqualThreshold Validation model for the GreaterEqualThreshold block
Buildings.Controls.OBC.CDL.Integers.Validation.GreaterThreshold GreaterThreshold Validation model for the GreaterThreshold block
Buildings.Controls.OBC.CDL.Integers.Validation.Less Less Validation model for the Less block
Buildings.Controls.OBC.CDL.Integers.Validation.LessEqual LessEqual Validation model for the LessEqual block
Buildings.Controls.OBC.CDL.Integers.Validation.LessEqualThreshold LessEqualThreshold Validation model for the LessEqualThreshold block
Buildings.Controls.OBC.CDL.Integers.Validation.LessThreshold LessThreshold Validation model for the LessThreshold block
Buildings.Controls.OBC.CDL.Integers.Validation.Max Max Validation model for the Max block
Buildings.Controls.OBC.CDL.Integers.Validation.Min Min Validation model for the Min block
Buildings.Controls.OBC.CDL.Integers.Validation.MultiSum MultiSum Validation model for the block to find sum of multiple inputs
Buildings.Controls.OBC.CDL.Integers.Validation.OnCounter OnCounter Validation model for the OnCounter block
Buildings.Controls.OBC.CDL.Integers.Validation.Product Product Validation model for the Product block

Buildings.Controls.OBC.CDL.Integers.Validation.Abs Buildings.Controls.OBC.CDL.Integers.Validation.Abs

Validation model for the absolute block

Buildings.Controls.OBC.CDL.Integers.Validation.Abs

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Abs.

Modelica definition

model Abs "Validation model for the absolute block" Buildings.Controls.OBC.CDL.Integers.Abs abs1 "Block that outputs the absolute value of the input"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, abs1.u); end Abs;

Buildings.Controls.OBC.CDL.Integers.Validation.Add Buildings.Controls.OBC.CDL.Integers.Validation.Add

Validation model for the Add block

Buildings.Controls.OBC.CDL.Integers.Validation.Add

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Add.

Modelica definition

model Add "Validation model for the Add block" Buildings.Controls.OBC.CDL.Integers.Add add1 "Block that outputs the sum of the two inputs"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-0.5, height=7.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(ramp2.y, round2.u); connect(round2.y, reaToInt1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, add1.u1); connect(reaToInt1.y, add1.u2); end Add;

Buildings.Controls.OBC.CDL.Integers.Validation.Change Buildings.Controls.OBC.CDL.Integers.Validation.Change

Validation model for the Change block

Buildings.Controls.OBC.CDL.Integers.Validation.Change

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Change.

Modelica definition

model Change "Validation model for the Change block" Buildings.Controls.OBC.CDL.Integers.Change cha; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( offset=0, height=20, duration=1) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler changeSampler "Triggered sampler"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin( smoothness=Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,-1;0.3,0.5; 0.5,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler increaseSampler "Increase sampler"; Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler decreaseSampler "Decrease sampler"; equation connect(ramp2.y, changeSampler.u); connect(timTabLin.y[1], reaToInt.u); connect(reaToInt.y, cha.u); connect(ramp2.y, increaseSampler.u); connect(ramp2.y, decreaseSampler.u); connect(cha.up, increaseSampler.trigger); connect(cha.y, changeSampler.trigger); connect(cha.down, decreaseSampler.trigger); end Change;

Buildings.Controls.OBC.CDL.Integers.Validation.Equal Buildings.Controls.OBC.CDL.Integers.Validation.Equal

Validation model for the Equal block

Buildings.Controls.OBC.CDL.Integers.Validation.Equal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Equal.

Modelica definition

model Equal "Validation model for the Equal block" Buildings.Controls.OBC.CDL.Integers.Equal intEqu "Block output true if input 1 is equal to input 2"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,0; 0.3,1; 0.5,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin1(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,0; 0.35,1; 0.55,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; equation connect(reaToInt.y, intEqu.u1); connect(reaToInt1.y, intEqu.u2); connect(timTabLin.y[1], reaToInt.u); connect(timTabLin1.y[1], reaToInt1.u); end Equal;

Buildings.Controls.OBC.CDL.Integers.Validation.Greater Buildings.Controls.OBC.CDL.Integers.Validation.Greater

Validation model for the Greater block

Buildings.Controls.OBC.CDL.Integers.Validation.Greater

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Greater.

Modelica definition

model Greater "Validation model for the Greater block" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Integers.Greater intGre "Block output true if input 1 is greater than input 2"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(ramp2.y, round2.u); connect(round1.y, reaToInt.u); connect(round2.y, reaToInt1.u); connect(reaToInt.y, intGre.u1); connect(reaToInt1.y, intGre.u2); end Greater;

Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqual Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqual

Validation model for the GreaterEqual block

Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqual

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.GreaterEqual.

Modelica definition

model GreaterEqual "Validation model for the GreaterEqual block" Buildings.Controls.OBC.CDL.Integers.GreaterEqual intGreEqu "Block output true if input 1 is greater or equal to input 2"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,-1; 0.3,0.5; 0.5,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin1(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,0; 0.35,1; 0.55,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; equation connect(reaToInt.y, intGreEqu.u1); connect(reaToInt1.y, intGreEqu.u2); connect(timTabLin.y[1], reaToInt.u); connect(timTabLin1.y[1], reaToInt1.u); end GreaterEqual;

Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqualThreshold Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqualThreshold

Validation model for the GreaterEqualThreshold block

Buildings.Controls.OBC.CDL.Integers.Validation.GreaterEqualThreshold

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold.

Modelica definition

model GreaterEqualThreshold "Validation model for the GreaterEqualThreshold block" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold intGreEquThr( threshold=2) "Block output true if input is greater or equal to threshold value"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, intGreEquThr.u); end GreaterEqualThreshold;

Buildings.Controls.OBC.CDL.Integers.Validation.GreaterThreshold Buildings.Controls.OBC.CDL.Integers.Validation.GreaterThreshold

Validation model for the GreaterThreshold block

Buildings.Controls.OBC.CDL.Integers.Validation.GreaterThreshold

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.GreaterThreshold.

Modelica definition

model GreaterThreshold "Validation model for the GreaterThreshold block" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr( threshold=2) "Block output true if input is greater than threshold value"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, intGreThr.u); end GreaterThreshold;

Buildings.Controls.OBC.CDL.Integers.Validation.Less Buildings.Controls.OBC.CDL.Integers.Validation.Less

Validation model for the Less block

Buildings.Controls.OBC.CDL.Integers.Validation.Less

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Less.

Modelica definition

model Less "Validation model for the Less block" Buildings.Controls.OBC.CDL.Integers.Less intLes "Block output true if input 1 is less than input 2"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,-1; 0.3,0.5; 0.5,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin1(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,0; 0.35,1; 0.55,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; equation connect(reaToInt1.y, intLes.u2); connect(reaToInt.y, intLes.u1); connect(timTabLin.y[1], reaToInt.u); connect(timTabLin1.y[1], reaToInt1.u); end Less;

Buildings.Controls.OBC.CDL.Integers.Validation.LessEqual Buildings.Controls.OBC.CDL.Integers.Validation.LessEqual

Validation model for the LessEqual block

Buildings.Controls.OBC.CDL.Integers.Validation.LessEqual

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.LessEqual.

Modelica definition

model LessEqual "Validation model for the LessEqual block" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Integers.LessEqual intLesEqu "Block output true if input 1 is less or equal to input 2"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(ramp2.y, round2.u); connect(round1.y, reaToInt.u); connect(round2.y, reaToInt1.u); connect(reaToInt1.y, intLesEqu.u2); connect(reaToInt.y, intLesEqu.u1); end LessEqual;

Buildings.Controls.OBC.CDL.Integers.Validation.LessEqualThreshold Buildings.Controls.OBC.CDL.Integers.Validation.LessEqualThreshold

Validation model for the LessEqualThreshold block

Buildings.Controls.OBC.CDL.Integers.Validation.LessEqualThreshold

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold.

Modelica definition

model LessEqualThreshold "Validation model for the LessEqualThreshold block" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold intLesEquThr( threshold=2) "Block output true if input is less or equal to threshold value"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, intLesEquThr.u); end LessEqualThreshold;

Buildings.Controls.OBC.CDL.Integers.Validation.LessThreshold Buildings.Controls.OBC.CDL.Integers.Validation.LessThreshold

Validation model for the LessThreshold block

Buildings.Controls.OBC.CDL.Integers.Validation.LessThreshold

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.LessThreshold.

Modelica definition

model LessThreshold "Validation model for the LessThreshold block" Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Integers.LessThreshold intLesThr( threshold=2) "Block output true if input is less than threshold value"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, intLesThr.u); end LessThreshold;

Buildings.Controls.OBC.CDL.Integers.Validation.Max Buildings.Controls.OBC.CDL.Integers.Validation.Max

Validation model for the Max block

Buildings.Controls.OBC.CDL.Integers.Validation.Max

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Max.

Modelica definition

model Max "Validation model for the Max block" Buildings.Controls.OBC.CDL.Integers.Max max1 "Block that outputs the largest inputs"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(ramp2.y, round2.u); connect(round2.y, reaToInt1.u); connect(reaToInt1.y, max1.u2); connect(reaToInt.y, max1.u1); end Max;

Buildings.Controls.OBC.CDL.Integers.Validation.Min Buildings.Controls.OBC.CDL.Integers.Validation.Min

Validation model for the Min block

Buildings.Controls.OBC.CDL.Integers.Validation.Min

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Min.

Modelica definition

model Min "Validation model for the Min block" Buildings.Controls.OBC.CDL.Integers.Min min1 "Block that outputs the smallest inputs"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, min1.u1); connect(ramp2.y, round2.u); connect(round2.y, reaToInt1.u); connect(reaToInt1.y, min1.u2); end Min;

Buildings.Controls.OBC.CDL.Integers.Validation.MultiSum Buildings.Controls.OBC.CDL.Integers.Validation.MultiSum

Validation model for the block to find sum of multiple inputs

Buildings.Controls.OBC.CDL.Integers.Validation.MultiSum

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.MultiSum.

Modelica definition

model MultiSum "Validation model for the block to find sum of multiple inputs" Buildings.Controls.OBC.CDL.Integers.MultiSum add1(nin=3) "Block that outputs the sum of the inputs"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-0.5, height=7.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp3( duration=1, height=7.0, offset=-1.5) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Round round1(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Round round3(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2 "Convert real to integer"; equation connect(ramp1.y, round1.u); connect(ramp2.y, round2.u); connect(ramp3.y, round3.u); connect(round3.y, reaToInt2.u); connect(round2.y, reaToInt1.u); connect(round1.y, reaToInt.u); connect(reaToInt.y, add1.u[1]); connect(reaToInt1.y, add1.u[2]); connect(reaToInt2.y, add1.u[3]); end MultiSum;

Buildings.Controls.OBC.CDL.Integers.Validation.OnCounter Buildings.Controls.OBC.CDL.Integers.Validation.OnCounter

Validation model for the OnCounter block

Buildings.Controls.OBC.CDL.Integers.Validation.OnCounter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.OnCounter.

Modelica definition

model OnCounter "Validation model for the OnCounter block" Buildings.Controls.OBC.CDL.Integers.OnCounter onCounter "Block that outputs increment if the input switches to true"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( width=0.5, period=0.1) "Block that outputs cyclic on and off"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse reset( width=0.5, period=1.0) "Block that outputs cyclic on and off"; equation connect(reset.y, onCounter.reset); connect(booPul.y, onCounter.trigger); end OnCounter;

Buildings.Controls.OBC.CDL.Integers.Validation.Product Buildings.Controls.OBC.CDL.Integers.Validation.Product

Validation model for the Product block

Buildings.Controls.OBC.CDL.Integers.Validation.Product

Information

Validation test for the block Buildings.Controls.OBC.CDL.Integers.Product.

Modelica definition

model Product "Validation model for the Product block" Buildings.Controls.OBC.CDL.Integers.Product product "Block that outputs the sum of the two inputs"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2 "Convert real to integer"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,-1; 0.3,0.5; 0.5,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable timTabLin1(smoothness= Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments, table=[0,0; 0.35,1; 0.55,0; 0.7,1; 1,0]) "Time table with smoothness method of constant segments"; equation connect(reaToInt1.y, product.u1); connect(reaToInt2.y, product.u2); connect(timTabLin.y[1], reaToInt1.u); connect(timTabLin1.y[1], reaToInt2.u); end Product;