CDL.Integers.Validation

Collection of models that validate the integer blocks of the CDL

Information

This package contains models that validate the blocks in 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
CDL.Integers.Validation.Abs Abs Validation model for the absolute block
CDL.Integers.Validation.Add Add Validation model for the Add block
CDL.Integers.Validation.AddParameter AddParameter Validation model for the AddParameter block
CDL.Integers.Validation.Change Change Validation model for the Change block
CDL.Integers.Validation.Equal Equal Validation model for the Equal block
CDL.Integers.Validation.Greater Greater Validation model for the Greater block
CDL.Integers.Validation.GreaterEqual GreaterEqual Validation model for the GreaterEqual block
CDL.Integers.Validation.GreaterEqualThreshold GreaterEqualThreshold Validation model for the GreaterEqualThreshold block
CDL.Integers.Validation.GreaterThreshold GreaterThreshold Validation model for the GreaterThreshold block
CDL.Integers.Validation.Less Less Validation model for the Less block
CDL.Integers.Validation.LessEqual LessEqual Validation model for the LessEqual block
CDL.Integers.Validation.LessEqualThreshold LessEqualThreshold Validation model for the LessEqualThreshold block
CDL.Integers.Validation.LessThreshold LessThreshold Validation model for the LessThreshold block
CDL.Integers.Validation.Max Max Validation model for the Max block
CDL.Integers.Validation.Min Min Validation model for the Min block
CDL.Integers.Validation.MultiSum MultiSum Validation model for the block to find sum of multiple inputs
CDL.Integers.Validation.Multiply Multiply Validation model for the Multiply block
CDL.Integers.Validation.OnCounter OnCounter Validation model for the OnCounter block
CDL.Integers.Validation.Stage Stage Validation model for the block to find the total number of enabled stages
CDL.Integers.Validation.Subtract Subtract Validation model for the Subtract block
CDL.Integers.Validation.Switch Switch Validation model for the Switch block

CDL.Integers.Validation.Abs CDL.Integers.Validation.Abs

Validation model for the absolute block

CDL.Integers.Validation.Abs

Information

Validation test for the block CDL.Integers.Abs.

Modelica definition

model Abs "Validation model for the absolute block" CDL.Integers.Abs abs1 "Block that outputs the absolute value of the input"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.Add CDL.Integers.Validation.Add

Validation model for the Add block

CDL.Integers.Validation.Add

Information

Validation test for the block CDL.Integers.Add.

Modelica definition

model Add "Validation model for the Add block" CDL.Integers.Add add1 "Block that outputs the sum of the two inputs"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-0.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.AddParameter CDL.Integers.Validation.AddParameter

Validation model for the AddParameter block

CDL.Integers.Validation.AddParameter

Information

Validation test for the block CDL.Integers.AddParameter.

Modelica definition

model AddParameter "Validation model for the AddParameter block" CDL.Integers.AddParameter addPar(p=5) "Block that outputs the sum of an input plus a parameter"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Round round1(n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; equation connect(ramp1.y,round1.u); connect(round1.y,reaToInt.u); connect(reaToInt.y, addPar.u); end AddParameter;

CDL.Integers.Validation.Change CDL.Integers.Validation.Change

Validation model for the Change block

CDL.Integers.Validation.Change

Information

Validation test for the block CDL.Integers.Change.

Modelica definition

model Change "Validation model for the Change block" CDL.Integers.Change cha "Check if the integer input changes value"; CDL.Continuous.Sources.Ramp ramp2( offset=0, height=20, duration=1) "Block that generates ramp signal"; CDL.Discrete.TriggeredSampler changeSampler "Triggered sampler"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Sources.TimeTable timTabLin( smoothness=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"; CDL.Discrete.TriggeredSampler increaseSampler "Increase sampler"; 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;

CDL.Integers.Validation.Equal CDL.Integers.Validation.Equal

Validation model for the Equal block

CDL.Integers.Validation.Equal

Information

Validation test for the block CDL.Integers.Equal.

Modelica definition

model Equal "Validation model for the Equal block" CDL.Integers.Equal intEqu "Block output true if input 1 is equal to input 2"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; CDL.Continuous.Sources.TimeTable timTabLin( smoothness=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"; CDL.Continuous.Sources.TimeTable timTabLin1( smoothness=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;

CDL.Integers.Validation.Greater CDL.Integers.Validation.Greater

Validation model for the Greater block

CDL.Integers.Validation.Greater

Information

Validation test for the block CDL.Integers.Greater.

Modelica definition

model Greater "Validation model for the Greater block" CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; CDL.Integers.Greater intGre "Block output true if input 1 is greater than input 2"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.GreaterEqual CDL.Integers.Validation.GreaterEqual

Validation model for the GreaterEqual block

CDL.Integers.Validation.GreaterEqual

Information

Validation test for the block CDL.Integers.GreaterEqual.

Modelica definition

model GreaterEqual "Validation model for the GreaterEqual block" CDL.Integers.GreaterEqual intGreEqu "Block output true if input 1 is greater or equal to input 2"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; CDL.Continuous.Sources.TimeTable timTabLin( smoothness=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"; CDL.Continuous.Sources.TimeTable timTabLin1( smoothness=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;

CDL.Integers.Validation.GreaterEqualThreshold CDL.Integers.Validation.GreaterEqualThreshold

Validation model for the GreaterEqualThreshold block

CDL.Integers.Validation.GreaterEqualThreshold

Information

Validation test for the block CDL.Integers.GreaterEqualThreshold.

Modelica definition

model GreaterEqualThreshold "Validation model for the GreaterEqualThreshold block" CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Integers.GreaterEqualThreshold intGreEquThr( t=2) "Block output true if input is greater or equal to threshold value"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.GreaterThreshold CDL.Integers.Validation.GreaterThreshold

Validation model for the GreaterThreshold block

CDL.Integers.Validation.GreaterThreshold

Information

Validation test for the block CDL.Integers.GreaterThreshold.

Modelica definition

model GreaterThreshold "Validation model for the GreaterThreshold block" CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Integers.GreaterThreshold intGreThr( t=2) "Block output true if input is greater than threshold value"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.Less CDL.Integers.Validation.Less

Validation model for the Less block

CDL.Integers.Validation.Less

Information

Validation test for the block CDL.Integers.Less.

Modelica definition

model Less "Validation model for the Less block" CDL.Integers.Less intLes "Block output true if input 1 is less than input 2"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; CDL.Continuous.Sources.TimeTable timTabLin( smoothness=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"; CDL.Continuous.Sources.TimeTable timTabLin1( smoothness=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;

CDL.Integers.Validation.LessEqual CDL.Integers.Validation.LessEqual

Validation model for the LessEqual block

CDL.Integers.Validation.LessEqual

Information

Validation test for the block CDL.Integers.LessEqual.

Modelica definition

model LessEqual "Validation model for the LessEqual block" CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; CDL.Integers.LessEqual intLesEqu "Block output true if input 1 is less or equal to input 2"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.LessEqualThreshold CDL.Integers.Validation.LessEqualThreshold

Validation model for the LessEqualThreshold block

CDL.Integers.Validation.LessEqualThreshold

Information

Validation test for the block CDL.Integers.LessEqualThreshold.

Modelica definition

model LessEqualThreshold "Validation model for the LessEqualThreshold block" CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Integers.LessEqualThreshold intLesEquThr( t=2) "Block output true if input is less or equal to threshold value"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.LessThreshold CDL.Integers.Validation.LessThreshold

Validation model for the LessThreshold block

CDL.Integers.Validation.LessThreshold

Information

Validation test for the block CDL.Integers.LessThreshold.

Modelica definition

model LessThreshold "Validation model for the LessThreshold block" CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Integers.LessThreshold intLesThr( t=2) "Block output true if input is less than threshold value"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.Max CDL.Integers.Validation.Max

Validation model for the Max block

CDL.Integers.Validation.Max

Information

Validation test for the block CDL.Integers.Max.

Modelica definition

model Max "Validation model for the Max block" CDL.Integers.Max max1 "Block that outputs the largest inputs"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.Min CDL.Integers.Validation.Min

Validation model for the Min block

CDL.Integers.Validation.Min

Information

Validation test for the block CDL.Integers.Min.

Modelica definition

model Min "Validation model for the Min block" CDL.Integers.Min min1 "Block that outputs the smallest inputs"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=10.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-1.5, height=5.0) "Block that generates ramp signal"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.MultiSum CDL.Integers.Validation.MultiSum

Validation model for the block to find sum of multiple inputs

CDL.Integers.Validation.MultiSum

Information

Validation test for the block CDL.Integers.MultiSum.

Modelica definition

model MultiSum "Validation model for the block to find sum of multiple inputs" CDL.Integers.MultiSum add1( nin=3) "Block that outputs the sum of the inputs"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-0.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp3( duration=1, height=7.0, offset=-1.5) "Block that generates ramp signal"; CDL.Continuous.Round round1( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; CDL.Continuous.Round round3( n=0) "Round real number to given digits"; 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;

CDL.Integers.Validation.Multiply CDL.Integers.Validation.Multiply

Validation model for the Multiply block

CDL.Integers.Validation.Multiply

Information

Validation test for the block CDL.Integers.Multiply.

Modelica definition

model Multiply "Validation model for the Multiply block" CDL.Integers.Multiply product "Block that outputs the product of the two inputs"; CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; CDL.Conversions.RealToInteger reaToInt2 "Convert real to integer"; CDL.Continuous.Sources.TimeTable timTabLin( smoothness=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"; CDL.Continuous.Sources.TimeTable timTabLin1( smoothness=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 Multiply;

CDL.Integers.Validation.OnCounter CDL.Integers.Validation.OnCounter

Validation model for the OnCounter block

CDL.Integers.Validation.OnCounter

Information

Validation test for the block CDL.Integers.OnCounter.

Modelica definition

model OnCounter "Validation model for the OnCounter block" CDL.Integers.OnCounter onCounter "Block that outputs increment if the input switches to true"; CDL.Logical.Sources.Pulse booPul( width=0.5, period=0.1) "Block that outputs cyclic on and off"; 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;

CDL.Integers.Validation.Stage CDL.Integers.Validation.Stage

Validation model for the block to find the total number of enabled stages

CDL.Integers.Validation.Stage

Information

Validation test for the block CDL.Integers.Stage.

The instances use different values for the duration time during which the output is held constant.

Modelica definition

model Stage "Validation model for the block to find the total number of enabled stages" CDL.Integers.Stage sta( final n=4, final holdDuration=5) "Total number of enabled stages, with a hold duration of 5 seconds"; CDL.Integers.Stage zerHolTim( final n=4, final holdDuration=0) "Total number of enabled stages, without any hold duration"; CDL.Integers.Stage sta1( final n=4, final holdDuration=2) "Total number of enabled stages, with a hold duration of 2 seconds"; CDL.Integers.Stage lesHolTim( final n=4, final holdDuration=1) "Total number of enabled stages, with a hold duration of 1 second"; CDL.Continuous.Sources.Ramp ramp1( final duration=10, final height=1, final startTime=1) "Block that generates ramp signal"; CDL.Continuous.Sources.Sin sin( final amplitude=0.5, final freqHz=1/5, final offset=0.5) "Block that generates sine signal"; equation connect(ramp1.y, sta.u); connect(ramp1.y,zerHolTim. u); connect(sin.y, sta1.u); connect(sin.y, lesHolTim.u); end Stage;

CDL.Integers.Validation.Subtract CDL.Integers.Validation.Subtract

Validation model for the Subtract block

CDL.Integers.Validation.Subtract

Information

Validation test for the block CDL.Integers.Subtract.

Modelica definition

model Subtract "Validation model for the Subtract block" CDL.Integers.Subtract sub "Block that outputs the difference of the two inputs"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Sources.Ramp ramp2( duration=1, offset=-0.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Round round1(n=0) "Round real number to given digits"; CDL.Conversions.RealToInteger reaToInt "Convert real to integer"; CDL.Continuous.Round round2(n=0) "Round real number to given digits"; 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, sub.u1); connect(reaToInt1.y, sub.u2); end Subtract;

CDL.Integers.Validation.Switch CDL.Integers.Validation.Switch

Validation model for the Switch block

CDL.Integers.Validation.Switch

Information

Validation test for the block CDL.Integers.Switch.

The input u2 is the switch input: If u2 = true, then output y = u1; else output y = u3.

Modelica definition

model Switch "Validation model for the Switch block" CDL.Integers.Switch integerSwitch "Integer switch"; CDL.Logical.Sources.Pulse booPul1( width=0.7, period=1.5) "Block that outputs cyclic on and off"; CDL.Logical.Sources.Pulse booPul2( width=0.5, period=3) "Block that outputs cyclic on and off: switch between u1 and u3"; CDL.Logical.Sources.Pulse booPul3( width=0.5, period=5) "Block that outputs cyclic on and off"; CDL.Integers.Sources.Constant conInt( k=5) "Integer constant"; CDL.Integers.Sources.Constant conInt1( k=2) "Integer constant"; protected CDL.Conversions.BooleanToInteger booToInt "Type converter"; CDL.Integers.Multiply proInt "Product"; CDL.Conversions.BooleanToInteger booToInt1 "Type converter"; CDL.Integers.Multiply proInt1 "Product"; equation connect(booPul2.y,integerSwitch.u2); connect(booPul1.y,booToInt.u); connect(booPul3.y,booToInt1.u); connect(conInt.y,proInt.u1); connect(booToInt.y,proInt.u2); connect(conInt1.y,proInt1.u1); connect(booToInt1.y,proInt1.u2); connect(proInt.y,integerSwitch.u1); connect(proInt1.y,integerSwitch.u3); end Switch;