diff --git a/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo b/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo index bd5e08c89f6..72b8ad01a28 100644 --- a/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo +++ b/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo @@ -200,7 +200,7 @@ model ControllerChillerDXHeatingEconomizer final reverseActing=false) "Cooling coil valve controller" annotation (Placement(transformation(extent={{0,-30},{20,-10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch the outdoor air fraction to 0 when in unoccupied mode" annotation (Placement(transformation(extent={{0,20},{20,40}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc @@ -210,7 +210,7 @@ model ControllerChillerDXHeatingEconomizer Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(k=0) "Zero outside air fraction" annotation (Placement(transformation(extent={{-60,-30},{-40,-10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swiFan "Switch fan on" + Buildings.Controls.OBC.CDL.Continuous.Switch swiFan "Switch fan on" annotation (Placement(transformation(extent={{70,120},{90,140}}))); Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysHea( final uLow=0.01, diff --git a/Buildings/Applications/DataCenters/DXCooled/Controls/AirsideEconomizer.mo b/Buildings/Applications/DataCenters/DXCooled/Controls/AirsideEconomizer.mo index c3f58220bf3..19612823b33 100644 --- a/Buildings/Applications/DataCenters/DXCooled/Controls/AirsideEconomizer.mo +++ b/Buildings/Applications/DataCenters/DXCooled/Controls/AirsideEconomizer.mo @@ -49,7 +49,7 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ecoOff "Determine if airside economizer is off" annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); - Buildings.Controls.OBC.CDL.Logical.Switch switch1 + Buildings.Controls.OBC.CDL.Continuous.Switch switch1 "Switch to select control output" annotation (Placement(transformation(extent={{40,-10},{60,10}}))); diff --git a/Buildings/Applications/DataCenters/DXCooled/Controls/Compressor.mo b/Buildings/Applications/DataCenters/DXCooled/Controls/Compressor.mo index 5186c6452b1..8b95246c391 100644 --- a/Buildings/Applications/DataCenters/DXCooled/Controls/Compressor.mo +++ b/Buildings/Applications/DataCenters/DXCooled/Controls/Compressor.mo @@ -49,7 +49,7 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal freCoo "Determine if free cooling is on" annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch switch1 + Buildings.Controls.OBC.CDL.Continuous.Switch switch1 "Switch to select control output" annotation (Placement(transformation(extent={{60,-10},{80,10}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant const(final k=0) diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Enable.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Enable.mo index c68b17b87f2..b3c23ee9f2e 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Enable.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Enable.mo @@ -159,15 +159,15 @@ protected final uHigh=hOutHigLimCutHig) if use_enthalpy "Outdoor air enthalpy hysteresis for both fixed and differential enthalpy cutoff conditions" annotation (Placement(transformation(extent={{-100,160},{-80,180}}))); - Buildings.Controls.OBC.CDL.Logical.Switch outDamSwitch + Buildings.Controls.OBC.CDL.Continuous.Switch outDamSwitch "Set maximum OA damper position to minimum at disable (after a given time delay)" annotation (Placement(transformation(extent={{62,-60},{82,-40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch retDamSwitch "Set minimum RA damper position to maximum at disable" + Buildings.Controls.OBC.CDL.Continuous.Switch retDamSwitch "Set minimum RA damper position to maximum at disable" annotation (Placement(transformation(extent={{-40,-162},{-20,-142}}))); - Buildings.Controls.OBC.CDL.Logical.Switch maxRetDamSwitch + Buildings.Controls.OBC.CDL.Continuous.Switch maxRetDamSwitch "Keep maximum RA damper position at physical maximum for a short time period after disable signal" annotation (Placement(transformation(extent={{40,-120},{60,-100}}))); - Buildings.Controls.OBC.CDL.Logical.Switch minRetDamSwitch + Buildings.Controls.OBC.CDL.Continuous.Switch minRetDamSwitch "Keep minimum RA damper position at physical maximum for a short time period after disable" annotation (Placement(transformation(extent={{40,-160},{60,-140}}))); Buildings.Controls.OBC.CDL.Logical.Nor nor1 "Logical nor" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Limits.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Limits.mo index 10cc4cefdac..770de24fdb0 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Limits.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Limits.mo @@ -163,10 +163,10 @@ protected final limitAbove=true) "Linear mapping of the return air damper position to the control signal" annotation (Placement(transformation(extent={{120,100},{140,120}}))); - Buildings.Controls.OBC.CDL.Logical.Switch retDamPosMinSwitch + Buildings.Controls.OBC.CDL.Continuous.Switch retDamPosMinSwitch "A switch to deactivate the return air damper minimal outdoor airflow control" annotation (Placement(transformation(extent={{40,-30},{60,-10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch outDamPosMaxSwitch + Buildings.Controls.OBC.CDL.Continuous.Switch outDamPosMaxSwitch "A switch to deactivate the outdoor air damper minimal outdoor airflow control" annotation (Placement(transformation(extent={{40,10},{60,30}}))); Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not block" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ExhaustDamper.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ExhaustDamper.mo index e3a967b82bd..05c494eaff0 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ExhaustDamper.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ExhaustDamper.mo @@ -44,7 +44,7 @@ block ExhaustDamper final r=dpBuiSet) "Building static pressure controller" annotation (Placement(transformation(extent={{20,50},{40,70}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Check if exhaust damper should be activated" annotation (Placement(transformation(extent={{40,-40},{60,-20}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/AHU.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/AHU.mo index 3d837f11a28..ac1f7227a2d 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/AHU.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/AHU.mo @@ -183,7 +183,7 @@ protected Buildings.Controls.OBC.CDL.Logical.And and1 "Logical and" annotation (Placement(transformation(extent={{120,-150},{140,-130}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "Ensuring the system efficiency will not be negative" annotation (Placement(transformation(extent={{60,-70},{80,-50}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/Zone.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/Zone.mo index e94f0701ee9..2ac232d9bbf 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/Zone.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/OutdoorAirFlow/Zone.mo @@ -169,11 +169,11 @@ protected "Outdoor air per person" annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "If there is occupancy sensor, then using the real time occupancy; otherwise, using the default occupancy" annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch between cooling or heating distribution effectiveness" annotation (Placement(transformation(extent={{-20,-160},{0,-140}}))); @@ -248,11 +248,11 @@ protected "Closed window status when there is no window sensor" annotation (Placement(transformation(extent={{-100,-80},{-80,-60}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "If window is open, the required outdoor airflow rate should be zero" annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi5 + Buildings.Controls.OBC.CDL.Continuous.Switch swi5 "If supply fan is off or it is not in occupied mode, then outdoor airflow rate should be zero" annotation (Placement(transformation(extent={{120,-100},{140,-80}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ReturnFanDirectPressure.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ReturnFanDirectPressure.mo index c96d9e33334..ecb3cbe51e3 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ReturnFanDirectPressure.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/ReturnFanDirectPressure.mo @@ -64,10 +64,10 @@ block ReturnFanDirectPressure Buildings.Controls.OBC.CDL.Continuous.Line linRetFanStaPre "Return fan static pressure setpoint" annotation (Placement(transformation(extent={{60,-50},{80,-30}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Exhaust air damper position" annotation (Placement(transformation(extent={{80,10},{100,30}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Return fan discharge static pressure setpoint" annotation (Placement(transformation(extent={{80,-100},{100,-80}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo index 4a3dd328ddd..b3ab282a3bd 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo @@ -131,7 +131,7 @@ protected Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zerSpe(k=0) "Zero fan speed when it becomes OFF" annotation (Placement(transformation(extent={{20,-90},{40,-70}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "If fan is OFF, fan speed outputs to zero" annotation (Placement(transformation(extent={{80,-90},{100,-110}}))); Buildings.Controls.OBC.CDL.Logical.Or or1 diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplySignals.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplySignals.mo index 45a93499643..189dea12b03 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplySignals.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplySignals.mo @@ -82,7 +82,7 @@ protected final reverseActing=false) "Controller for supply air temperature control signal (to be used by heating coil, cooling coil and economizer)" annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch to select supply temperature control signal based on status of supply fan" annotation (Placement(transformation(extent={{0,50},{20,70}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant uHeaMaxCon( diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyTemperature.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyTemperature.mo index 85417a3a0f6..00b9e783740 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/SetPoints/SupplyTemperature.mo @@ -160,10 +160,10 @@ protected TSupWarUpSetBac) "Supply temperature setpoint under warm-up and setback mode" annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "If operation mode is setup or cool-down, setpoint shall be 35 degC" annotation (Placement(transformation(extent={{80,-60},{100,-40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "If operation mode is setup or cool-down, setpoint shall be TSupSetMin" annotation (Placement(transformation(extent={{20,-60},{40,-40}}))); Buildings.Controls.OBC.CDL.Continuous.Limiter TDea( @@ -171,7 +171,7 @@ protected uMin=294.15) "Limiter that outputs the dead band value for the supply air temperature" annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "Check output regarding supply fan status" annotation (Placement(transformation(extent={{80,-10},{100,10}}))); Buildings.Controls.OBC.CDL.Integers.LessThreshold intLesThr(t=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.warmUp) diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/CoolingCoil.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/CoolingCoil.mo index d02147ab10f..94c601aacce 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/CoolingCoil.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/CoolingCoil.mo @@ -55,7 +55,7 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.ZoneStates.cooling) "Cooling state value" annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch switch "Switch to assign cooling coil control signal" + Buildings.Controls.OBC.CDL.Continuous.Switch switch "Switch to assign cooling coil control signal" annotation (Placement(transformation(extent={{72,-10},{92,10}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant const(k=0) "Cooling off mode" annotation (Placement(transformation(extent={{40,-30},{60,-10}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo index a8c1377b5a2..9ee95acb3b9 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo @@ -165,9 +165,9 @@ protected Buildings.Controls.OBC.CDL.Continuous.Add add1(final k2=-1) "Add block that determines difference the between TOut and TOutCut" annotation (Placement(transformation(extent={{-140,244},{-120,264}}))); - Buildings.Controls.OBC.CDL.Logical.Switch outDamSwitch "Set maximum OA damper position to minimum at disable (after time delay)" + Buildings.Controls.OBC.CDL.Continuous.Switch outDamSwitch "Set maximum OA damper position to minimum at disable (after time delay)" annotation (Placement(transformation(extent={{40,-150},{60,-130}}))); - Buildings.Controls.OBC.CDL.Logical.Switch minRetDamSwitch + Buildings.Controls.OBC.CDL.Continuous.Switch minRetDamSwitch "Keep minimum RA damper position at physical maximum for a short time period after disable" annotation (Placement(transformation(extent={{40,-250},{60,-230}}))); Buildings.Controls.OBC.CDL.Logical.Nor nor1 "Logical nor" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo index c63b72062b6..72e6cc7ebc3 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo @@ -152,12 +152,12 @@ protected final limitAbove=true) "Calculates OA damper position required to supply minimum outdoor airflow setpoint at current fan speed" annotation (Placement(transformation(extent={{100,110},{120,130}}))); - Buildings.Controls.OBC.CDL.Logical.Switch enaDis + Buildings.Controls.OBC.CDL.Continuous.Switch enaDis "Logical switch to enable damper position limit calculation or disable it (set min limit to physical minimum)" annotation (Placement(transformation(extent={{82,-120},{102,-100}}))); Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not block" annotation (Placement(transformation(extent={{-20,-80},{0,-60}}))); - Buildings.Controls.OBC.CDL.Logical.Switch enaDis1 + Buildings.Controls.OBC.CDL.Continuous.Switch enaDis1 "Logical switch to enable damper position limit calculation or disable it (set max limit to physical minimum)" annotation (Placement(transformation(extent={{80,-80},{100,-60}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Modulation.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Modulation.mo index 5c62ebb7dd6..e56de976313 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Modulation.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Modulation.mo @@ -137,7 +137,7 @@ protected Buildings.Controls.OBC.CDL.Continuous.Sources.Constant uMaxHeaCoi(final k=1) "Maximal control loop signal for the heating coil" annotation (Placement(transformation(extent={{-60,90},{-40,110}}))); - Buildings.Controls.OBC.CDL.Logical.Switch enaDis "Enable or disable the heating coil" + Buildings.Controls.OBC.CDL.Continuous.Switch enaDis "Enable or disable the heating coil" annotation (Placement(transformation(extent={{76,30},{96,50}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant Off( final k=0) "Off signal for heating coil" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/ExhaustDamper.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/ExhaustDamper.mo index 3b6409fa1ff..f0c0c73f385 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/ExhaustDamper.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/ExhaustDamper.mo @@ -45,7 +45,7 @@ block ExhaustDamper Buildings.Controls.OBC.CDL.Continuous.Line exhDamPos "Linearly map exhaust damper position to the outdoor air damper position" annotation (Placement(transformation(extent={{20,-10},{40,10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Check if exhaust damper should be open" annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); Buildings.Controls.OBC.CDL.Continuous.Hysteresis greThr( diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/OutsideAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/OutsideAirFlow.mo index f1fef63c331..092343a7e27 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/OutsideAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/OutsideAirFlow.mo @@ -83,20 +83,20 @@ protected have_occSen "Outdoor airflow rate per person" annotation (Placement(transformation(extent={{-160,150},{-140,170}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch for enabling occupancy sensor input" annotation (Placement(transformation(extent={{-60,38},{-40,58}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch between cooling or heating distribution effectiveness" annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); Buildings.Controls.OBC.CDL.Continuous.Division zonOutAirRate "Required zone outdoor airflow rate" annotation (Placement(transformation(extent={{20,20},{40,40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "If window is open or it is not in occupied mode, the required outdoor airflow rate should be zero" annotation (Placement(transformation(extent={{80,20},{100,0}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "If supply fan is off, then outdoor airflow rate should be zero." annotation (Placement(transformation(extent={{140,0},{160,20}}))); Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/Supply.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/Supply.mo index 07139ca52ce..af693718903 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/Supply.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/SetPoints/Supply.mo @@ -69,7 +69,7 @@ block Supply "Supply air set point for single zone VAV system" CDL.Interfaces.BooleanInput uFan "Supply fan status" annotation (Placement(transformation(extent={{-140,-160},{-100,-120}}), iconTransformation(extent={{-140,-120},{-100,-80}}))); - CDL.Logical.Switch switch "Switch to assign control signal" + CDL.Continuous.Switch switch "Switch to assign control signal" annotation (Placement(transformation(extent={{120,-70},{140,-50}}))); CDL.Continuous.Sources.Constant fanOff(k=0) "Fan off status" annotation (Placement(transformation(extent={{40,10},{60,30}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/OperationMode.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/OperationMode.mo index 3fe76b8f6c1..ce7b0ac6003 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/OperationMode.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/OperationMode.mo @@ -101,9 +101,9 @@ protected final k=0) "Index to indicate unoccupied period" annotation (Placement(transformation(extent={{0,340},{20,360}}))); - Buildings.Controls.OBC.CDL.Logical.Switch corCooDowTim "Corrected cool down period" + Buildings.Controls.OBC.CDL.Continuous.Switch corCooDowTim "Corrected cool down period" annotation (Placement(transformation(extent={{-220,240},{-200,260}}))); - Buildings.Controls.OBC.CDL.Logical.Switch corWarUpTim "Corrected warm-up period" + Buildings.Controls.OBC.CDL.Continuous.Switch corWarUpTim "Corrected warm-up period" annotation (Placement(transformation(extent={{-200,140},{-180,160}}))); Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr( final t=4) "Check if the number of cold zones is not less than than 5" @@ -256,16 +256,16 @@ protected Buildings.Controls.OBC.CDL.Logical.Or or6 "Check if it is in any of the 6 modes except unoccupied mode" annotation (Placement(transformation(extent={{40,-370},{60,-350}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch between occupied mode index and unoccupied period index" annotation (Placement(transformation(extent={{160,310},{180,330}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "If the Cool-down, warm-up, or Occupied mode is on, then setback mode should not be activated." annotation (Placement(transformation(extent={{60,20},{80,40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "If the Cool-down, warm-up, or Occupied mode is on, then freeze protection setback mode should not be activated." annotation (Placement(transformation(extent={{60,-100},{80,-80}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi5 + Buildings.Controls.OBC.CDL.Continuous.Switch swi5 "If the Cool-down, warm-up, or Occupied mode is on, then setup mode should not be activated." annotation (Placement(transformation(extent={{60,-200},{80,-180}}))); Buildings.Controls.OBC.CDL.Logical.Not not5 "Logical not" @@ -283,13 +283,13 @@ protected final message="Level 4 alarm: window open during modes other than occupied mode") "Generate alarm message when window open during modes other than occupied mode" annotation (Placement(transformation(extent={{240,80},{260,100}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "If occupied mode is on, then cool down mode should not be activated" annotation (Placement(transformation(extent={{140,270},{160,290}}))); Buildings.Controls.OBC.CDL.Conversions.RealToInteger setBacMod1 "Convert Real number to Integer number" annotation (Placement(transformation(extent={{180,270},{200,290}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "If occupied mode is on, then warm-up mode should not be activated." annotation (Placement(transformation(extent={{140,180},{160,200}}))); Buildings.Controls.OBC.CDL.Conversions.RealToInteger setBacMod2 diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/TrimAndRespond.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/TrimAndRespond.mo index 2d2f868dac3..1f3f34d1b3a 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/TrimAndRespond.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/TrimAndRespond.mo @@ -39,7 +39,7 @@ block TrimAndRespond "Block to inplement trim and respond logic" Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr "Check if the real requests is more than ignored requests setting" annotation (Placement(transformation(extent={{20,-60},{40,-40}}))); - Buildings.Controls.OBC.CDL.Logical.Switch netRes "Net setpoint reset value" + Buildings.Controls.OBC.CDL.Continuous.Switch netRes "Net setpoint reset value" annotation (Placement(transformation(extent={{160,-20},{180,-40}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant resAmoCon( final k=resAmo) @@ -57,16 +57,16 @@ block TrimAndRespond "Block to inplement trim and respond logic" final y_start=iniSet) "Output the input signal with a unit delay" annotation (Placement(transformation(extent={{-100,96},{-80,116}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch between initial setpoint and reseted setpoint" annotation (Placement(transformation(extent={{160,180},{180,160}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Before instant (device ON + delTim + samplePeriod), the setpoint should not be trimmed" annotation (Placement(transformation(extent={{120,0},{140,20}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Reinitialize setpoint to initial setting when device become OFF" annotation (Placement(transformation(extent={{100,130},{120,150}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 "Logical switch" + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "Logical switch" annotation (Placement(transformation(extent={{120,-160},{140,-140}}))); Buildings.Controls.OBC.CDL.Discrete.Sampler sampler( final samplePeriod=samplePeriod) diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/TrimAndRespond.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/TrimAndRespond.mo index 424fbd6aa51..7557e82eb22 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/TrimAndRespond.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/TrimAndRespond.mo @@ -56,7 +56,7 @@ model TrimAndRespond "Model validates the trim and respond block" annotation (Placement(transformation(extent={{-88,-20},{-68,0}}))); Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not" annotation (Placement(transformation(extent={{20,-20},{40,0}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi "Switch between two Real signals" + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch between two Real signals" annotation (Placement(transformation(extent={{-48,-50},{-28,-30}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(final k=0) "Zero request when device is OFF" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo index 86265bbaa64..d8003d04797 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo @@ -230,17 +230,17 @@ block DamperValves final y_reset=0) if not have_pressureIndependentDamper "Damper position controller" annotation (Placement(transformation(extent={{280,220},{300,240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Output active cooling airflow according to cooling control signal" annotation (Placement(transformation(extent={{140,260},{160,280}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 "Output active airflow when it is in deadband state" + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Output active airflow when it is in deadband state" annotation (Placement(transformation(extent={{132,40},{152,60}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 "Acitive heating airflow rate" + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Acitive heating airflow rate" annotation (Placement(transformation(extent={{80,-260},{100,-240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "Output active heating airflow according to heating control signal" annotation (Placement(transformation(extent={{140,-260},{160,-240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi5 "Output active cooling airflow " + Buildings.Controls.OBC.CDL.Continuous.Switch swi5 "Output active cooling airflow " annotation (Placement(transformation(extent={{60,200},{80,220}}))); protected @@ -327,9 +327,9 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Constant signal for unoccupied mode" annotation (Placement(transformation(extent={{170,-322},{190,-302}}))); - Buildings.Controls.OBC.CDL.Logical.Switch watValPosUno "Output hot water valve position" + Buildings.Controls.OBC.CDL.Continuous.Switch watValPosUno "Output hot water valve position" annotation (Placement(transformation(extent={{280,-30},{300,-10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch damPosUno "Output damper position" + Buildings.Controls.OBC.CDL.Continuous.Switch damPosUno "Output damper position" annotation (Placement(transformation(extent={{280,60},{300,80}}))); Buildings.Controls.OBC.CDL.Logical.Not not5 "Negation of input signal" annotation (Placement(transformation(extent={{200,-260},{220,-240}}))); @@ -337,14 +337,14 @@ protected final k=TDisMin) "Lowest allowed discharge air temperature" annotation (Placement(transformation(extent={{-68,-108},{-48,-88}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi6 + Buildings.Controls.OBC.CDL.Continuous.Switch swi6 "Output hot water valve position in case of low discharge air temperature" annotation (Placement(transformation(extent={{-30,-90},{-10,-70}}))); Buildings.Controls.OBC.CDL.Logical.Or or2 "Logical not" annotation (Placement(transformation(extent={{-68,-64},{-48,-44}}))); Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not" annotation (Placement(transformation(extent={{-120,120},{-100,140}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "Output hot water valve position in case of low discharge air temperature" annotation (Placement(transformation(extent={{104,-82},{124,-62}}))); Buildings.Controls.OBC.CDL.Logical.Not not6 "Negation of input signal" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SetPoints/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SetPoints/ActiveAirFlow.mo index 20fe13cc72f..b0de585f22e 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SetPoints/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SetPoints/ActiveAirFlow.mo @@ -119,16 +119,16 @@ block ActiveAirFlow Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr1 "Check if zone minimum airflow setpoint VDisSetMin_flow is non-zero" annotation (Placement(transformation(extent={{-80,-410},{-60,-390}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Reset occupied minimum airflow according to occupancy" annotation (Placement(transformation(extent={{80,-290},{100,-270}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Reset occupied minimum airflow according to window status" annotation (Placement(transformation(extent={{200,-510},{220,-490}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Reset occupied minimum airflow setpoint according to minimum controllable airflow" annotation (Placement(transformation(extent={{140,-410},{160,-390}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 if have_CO2Sen + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 if have_CO2Sen "Switch between zero signal and CO2 control loop signal depending on the operation mode" annotation (Placement(transformation(extent={{-80,-100},{-60,-120}}))); Buildings.Controls.OBC.CDL.Logical.And and1 "Logical and" @@ -248,40 +248,40 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal intEqu4 "Check if current operation mode is setback mode" annotation (Placement(transformation(extent={{40,220},{60,240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "Select cooling maximum based on operation mode" annotation (Placement(transformation(extent={{-100,290},{-80,310}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi8 + Buildings.Controls.OBC.CDL.Continuous.Switch swi8 "Select heating maximum based on operation mode" annotation (Placement(transformation(extent={{-100,260},{-80,280}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi9 + Buildings.Controls.OBC.CDL.Continuous.Switch swi9 "Select cooling maximum based on operation mode" annotation (Placement(transformation(extent={{-100,220},{-80,240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi17 + Buildings.Controls.OBC.CDL.Continuous.Switch swi17 "Select heating minimum based on operation mode" annotation (Placement(transformation(extent={{120,290},{140,310}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi18 + Buildings.Controls.OBC.CDL.Continuous.Switch swi18 "Select heating maximum based on operation mode" annotation (Placement(transformation(extent={{120,260},{140,280}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi22 + Buildings.Controls.OBC.CDL.Continuous.Switch swi22 "Select heating minimum based on operation mode" annotation (Placement(transformation(extent={{120,220},{140,240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi23 + Buildings.Controls.OBC.CDL.Continuous.Switch swi23 "Select heating maximum based on operation mode" annotation (Placement(transformation(extent={{120,190},{140,210}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi24 + Buildings.Controls.OBC.CDL.Continuous.Switch swi24 "Select cooling maximum based on operation mode" annotation (Placement(transformation(extent={{-100,150},{-80,170}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi25 + Buildings.Controls.OBC.CDL.Continuous.Switch swi25 "Select cooling minimum based on operation mode" annotation (Placement(transformation(extent={{-100,120},{-80,140}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi26 + Buildings.Controls.OBC.CDL.Continuous.Switch swi26 "Select minimum based on operation mode" annotation (Placement(transformation(extent={{-100,90},{-80,110}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi27 + Buildings.Controls.OBC.CDL.Continuous.Switch swi27 "Select heating minimum based on operation mode" annotation (Placement(transformation(extent={{-100,60},{-80,80}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi28 + Buildings.Controls.OBC.CDL.Continuous.Switch swi28 "Select heating maximum based on operation mode" annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); Buildings.Controls.OBC.CDL.Continuous.Max maxInp "Find greater input" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo index ab8607d5409..213169d526d 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo @@ -319,38 +319,38 @@ protected annotation (Placement(transformation(extent={{-80,240},{-60,260}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant con5(k=true) "Constant true" annotation (Placement(transformation(extent={{60,290},{80,310}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Use setpoint different value when half sample period time has passed" annotation (Placement(transformation(extent={{40,400},{60,420}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 "Output 3 or other request " + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Output 3 or other request " annotation (Placement(transformation(extent={{100,190},{120,210}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 "Output 2 or other request " + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Output 2 or other request " annotation (Placement(transformation(extent={{100,130},{120,150}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 "Output 0 or 1 request " + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "Output 0 or 1 request " annotation (Placement(transformation(extent={{100,80},{120,100}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 "Output 3 or other request " + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "Output 3 or other request " annotation (Placement(transformation(extent={{100,-50},{120,-30}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi5 "Output 2 or other request " + Buildings.Controls.OBC.CDL.Continuous.Switch swi5 "Output 2 or other request " annotation (Placement(transformation(extent={{100,-110},{120,-90}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi6 "Output 0 or 1 request " + Buildings.Controls.OBC.CDL.Continuous.Switch swi6 "Output 0 or 1 request " annotation (Placement(transformation(extent={{100,-160},{120,-140}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi7 if have_heaWatCoi + Buildings.Controls.OBC.CDL.Continuous.Switch swi7 if have_heaWatCoi "Output 3 or other request " annotation (Placement(transformation(extent={{100,-250},{120,-230}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi8 if have_heaWatCoi + Buildings.Controls.OBC.CDL.Continuous.Switch swi8 if have_heaWatCoi "Output 2 or other request " annotation (Placement(transformation(extent={{100,-310},{120,-290}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi9 if have_heaWatCoi + Buildings.Controls.OBC.CDL.Continuous.Switch swi9 if have_heaWatCoi "Output 0 or 1 request " annotation (Placement(transformation(extent={{100,-360},{120,-340}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi10 if (have_heaWatCoi and + Buildings.Controls.OBC.CDL.Continuous.Switch swi10 if (have_heaWatCoi and have_heaPla) "Output 0 or 1 request " annotation (Placement(transformation(extent={{100,-440},{120,-420}}))); Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol(duration=samplePeriod) "Hold true signal for sample period of time" annotation (Placement(transformation(extent={{120,330},{140,350}}))); - Buildings.Controls.OBC.CDL.Logical.LogicalSwitch logSwi "Logical switch" + Buildings.Controls.OBC.CDL.Logical.Switch logSwi "Logical switch" annotation (Placement(transformation(extent={{120,300},{140,280}}))); Buildings.Controls.OBC.CDL.Logical.TrueDelay tim1(delayTime=durTimTem) "Check if it is more than durTimTem" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/Validation/ZoneTemperatures.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/Validation/ZoneTemperatures.mo index cb6df4f6d5c..9727758015c 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/Validation/ZoneTemperatures.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/Validation/ZoneTemperatures.mo @@ -71,10 +71,10 @@ model ZoneTemperatures "Validate block for zone set point" final k=0) "Zero adjustment" annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch to zero adjustment when window is open" annotation (Placement(transformation(extent={{-20,-30},{0,-10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Switch to zero adjustment when window is open" annotation (Placement(transformation(extent={{-20,10},{0,30}}))); diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/ZoneTemperatures.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/ZoneTemperatures.mo index 289b00e66da..e6de73c79dc 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/ZoneTemperatures.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/SetPoints/ZoneTemperatures.mo @@ -384,73 +384,73 @@ protected Buildings.Controls.OBC.CDL.Continuous.Greater gre2 "Check whether heating setpoint exceeds cooling setpoint minus 0.56 degC" annotation (Placement(transformation(extent={{220,-590},{240,-570}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch between occupied and unoccupied cooling setpoint" annotation (Placement(transformation(extent={{-300,520},{-280,540}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch between occupied and unoccupied heating setpoint" annotation (Placement(transformation(extent={{-300,440},{-280,460}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Setpoint can only be adjusted in occupied mode" annotation (Placement(transformation(extent={{-120,360},{-100,340}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi3 + Buildings.Controls.OBC.CDL.Continuous.Switch swi3 "Setpoint can only be adjusted in occupied mode" annotation (Placement(transformation(extent={{220,260},{240,240}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi4 + Buildings.Controls.OBC.CDL.Continuous.Switch swi4 "If there is no cooling adjustment, zero adjust" annotation (Placement(transformation(extent={{-280,320},{-260,340}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi5 + Buildings.Controls.OBC.CDL.Continuous.Switch swi5 "If there is no heating adjustment, zero adjust" annotation (Placement(transformation(extent={{0,240},{20,260}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi6 + Buildings.Controls.OBC.CDL.Continuous.Switch swi6 "If there is only one common adjust for both heating and cooling, use the adjust value from cooling one" annotation (Placement(transformation(extent={{80,240},{100,260}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi7 + Buildings.Controls.OBC.CDL.Continuous.Switch swi7 "Ensure heating setpoint being not higher than cooling setpoint minus 0.56 degC" annotation (Placement(transformation(extent={{280,-590},{300,-570}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi8 + Buildings.Controls.OBC.CDL.Continuous.Switch swi8 "Ensure unoccupied heating setppint being lower than occupied one" annotation (Placement(transformation(extent={{100,-610},{120,-590}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi9 + Buildings.Controls.OBC.CDL.Continuous.Switch swi9 "Ensure unoccupied cooling setppint being higher than occupied one" annotation (Placement(transformation(extent={{100,-550},{120,-530}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi10 + Buildings.Controls.OBC.CDL.Continuous.Switch swi10 "Switch between occupied and unoccupied cooling setpoint" annotation (Placement(transformation(extent={{220,80},{240,100}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi11 + Buildings.Controls.OBC.CDL.Continuous.Switch swi11 "Switch between occupied and unoccupied cooling setpoint" annotation (Placement(transformation(extent={{220,-140},{240,-120}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi12 + Buildings.Controls.OBC.CDL.Continuous.Switch swi12 "Increase cooling setpoint when the zone is unpopulated by more than 5 minutes" annotation (Placement(transformation(extent={{160,-280},{180,-260}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi13 + Buildings.Controls.OBC.CDL.Continuous.Switch swi13 "Decrease heating setpoint when the zone is unpopulated by more than 5 minutes" annotation (Placement(transformation(extent={{160,-320},{180,-300}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi14 + Buildings.Controls.OBC.CDL.Continuous.Switch swi14 "Switch to TZonCooSetWinOpe when window is open" annotation (Placement(transformation(extent={{-180,-460},{-160,-440}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi15 + Buildings.Controls.OBC.CDL.Continuous.Switch swi15 "Switch to TZonHeaSetWinOpe when window is open" annotation (Placement(transformation(extent={{-60,-460},{-40,-440}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi16 + Buildings.Controls.OBC.CDL.Continuous.Switch swi16 "Generate level 4 alarm when window is open during modes other than occupied" annotation (Placement(transformation(extent={{-100,-420},{-80,-400}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi17 + Buildings.Controls.OBC.CDL.Continuous.Switch swi17 "If it is occupied mode, cooling setpoint should be limited" annotation (Placement(transformation(extent={{-180,-550},{-160,-530}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi18 + Buildings.Controls.OBC.CDL.Continuous.Switch swi18 "If it is occupied mode, heating setpoint should be limited" annotation (Placement(transformation(extent={{-180,-610},{-160,-590}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi19 + Buildings.Controls.OBC.CDL.Continuous.Switch swi19 "If there is occupancy sensor, update heating setpoint according to the occupancy" annotation (Placement(transformation(extent={{220,-320},{240,-300}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi20 + Buildings.Controls.OBC.CDL.Continuous.Switch swi20 "If there is occupancy sensor, update cooling setpoint according to the occupancy" annotation (Placement(transformation(extent={{220,-280},{240,-260}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi21 + Buildings.Controls.OBC.CDL.Continuous.Switch swi21 "If there is window status sensor, update heating setpoint according to the window status" annotation (Placement(transformation(extent={{160,-480},{180,-460}}))); - Buildings.Controls.OBC.CDL.Logical.Switch swi22 + Buildings.Controls.OBC.CDL.Continuous.Switch swi22 "If there is window status sensor, update cooling setpoint according to the window status" annotation (Placement(transformation(extent={{100,-460},{120,-440}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu7 diff --git a/Buildings/Controls/OBC/CDL/Logical/LogicalSwitch.mo b/Buildings/Controls/OBC/CDL/Continuous/Switch.mo similarity index 55% rename from Buildings/Controls/OBC/CDL/Logical/LogicalSwitch.mo rename to Buildings/Controls/OBC/CDL/Continuous/Switch.mo index 8b6c66d50aa..04f1953b2c4 100644 --- a/Buildings/Controls/OBC/CDL/Logical/LogicalSwitch.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Switch.mo @@ -1,17 +1,17 @@ -within Buildings.Controls.OBC.CDL.Logical; -block LogicalSwitch - "Switch between two boolean signals" - Interfaces.BooleanInput u1 - "Boolean input signal" +within Buildings.Controls.OBC.CDL.Continuous; +block Switch + "Switch between two Real signals" + Interfaces.RealInput u1 + "Real input signal" annotation (Placement(transformation(extent={{-140,60},{-100,100}}))); Interfaces.BooleanInput u2 "Boolean switch input signal, if true, y=u1, else y=u3" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Interfaces.BooleanInput u3 - "Boolean input signal" + Interfaces.RealInput u3 + "Real input signal" annotation (Placement(transformation(extent={{-140,-100},{-100,-60}}))); - Interfaces.BooleanOutput y - "Booelan output signal" + Interfaces.RealOutput y + "Real output signal" annotation (Placement(transformation(extent={{100,-20},{140,20}}))); equation @@ -21,11 +21,11 @@ equation else u3; annotation ( - defaultComponentName="logSwi", + defaultComponentName="swi", Documentation( info="

-Block that outputs one of two boolean input signals based on a boolean input signal. +Block that outputs one of two real input signals based on a boolean input signal.

If the input signal u2 is true, @@ -60,33 +60,33 @@ Modelica Standard Library. fillPattern=FillPattern.Solid, borderPattern=BorderPattern.Raised), Line( - points={{12,0},{100,0}}, - color={255,0,255}), + points={{12.0,0.0},{100.0,0.0}}, + color={0,0,127}), Line( - points={{-100,0},{-40,0}}, + points={{-100.0,0.0},{-40.0,0.0}}, color={255,0,255}), Line( - points={{-100,-80},{-40,-80},{-40,-80}}, - color={255,0,255}), + points={{-100.0,-80.0},{-40.0,-80.0},{-40.0,-80.0}}, + color={0,0,127}), Line( - points={{-40,12},{-40,-10}}, + points={{-40.0,12.0},{-40.0,-12.0}}, color={255,0,255}), Line( - points={{-100,80},{-40,80}}, - color={255,0,255}), + points={{-100.0,80.0},{-40.0,80.0}}, + color={0,0,127}), Line( - points=DynamicSelect({{8,2},{-40,80}},{{8,2}, + points=DynamicSelect({{10,0},{-40,80}},{{10,0}, if u2 then {-40,80} else {-40,-80}}), - color={255,0,255}, - thickness=1), + color={0,0,127}, + thickness=1.0), Ellipse( - lineColor={0,0,127}, + lineColor={0,0,255}, pattern=LinePattern.None, fillPattern=FillPattern.Solid, - extent={{2.0,-6.0},{18.0,8.0}}), + extent={{2.0,-8.0},{18.0,8.0}}), Ellipse( extent={{-71,7},{-85,-7}}, lineColor=DynamicSelect({235,235,235}, @@ -100,47 +100,8 @@ Modelica Standard Library. else {235,235,235}), fillPattern=FillPattern.Solid), - Ellipse( - extent={{-71,74},{-85,88}}, - lineColor=DynamicSelect({235,235,235}, - if u1 then - {0,255,0} - else - {235,235,235}), - fillColor=DynamicSelect({235,235,235}, - if u1 then - {0,255,0} - else - {235,235,235}), - fillPattern=FillPattern.Solid), - Ellipse( - extent={{-71,-74},{-85,-88}}, - lineColor=DynamicSelect({235,235,235}, - if u3 then - {0,255,0} - else - {235,235,235}), - fillColor=DynamicSelect({235,235,235}, - if u3 then - {0,255,0} - else - {235,235,235}), - fillPattern=FillPattern.Solid), - Ellipse( - extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, - if y then - {0,255,0} - else - {235,235,235}), - fillColor=DynamicSelect({235,235,235}, - if y then - {0,255,0} - else - {235,235,235}), - fillPattern=FillPattern.Solid), Text( - extent={{-90,76},{-46,50}}, + extent={{-90,80},{-46,54}}, lineColor=DynamicSelect({0,0,0}, if u2 then {0,0,0} @@ -148,7 +109,7 @@ Modelica Standard Library. {235,235,235}), textString="true"), Text( - extent={{-90,-42},{-38,-72}}, + extent={{-90,-46},{-38,-76}}, lineColor=DynamicSelect({0,0,0}, if u2 then {235,235,235} @@ -159,4 +120,4 @@ Modelica Standard Library. extent={{-150,150},{150,110}}, lineColor={0,0,255}, textString="%name")})); -end LogicalSwitch; +end Switch; diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/Switch.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/Switch.mo new file mode 100644 index 00000000000..bfaa032c1d8 --- /dev/null +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/Switch.mo @@ -0,0 +1,66 @@ +within Buildings.Controls.OBC.CDL.Continuous.Validation; +model Switch "Validation model for the Switch block" + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( + duration=5, + offset=-1, + height=6) + "Block that generates ramp signal" + annotation (Placement(transformation(extent={{-26,22},{-6,42}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( + duration=5, + offset=-1, + height=2) + "Block that generates ramp signal" + annotation (Placement(transformation(extent={{-26,-42},{-6,-22}}))); + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( + width=0.5, + period=2) + "Block that outputs cyclic on and off" + annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); + Buildings.Controls.OBC.CDL.Continuous.Switch switch1 + "Switch between two real inputs" + annotation (Placement(transformation(extent={{26,-10},{46,10}}))); + +equation + connect(booPul.y,switch1.u2) + annotation (Line(points={{-4,0},{-4,0},{24,0}},color={255,0,255})); + connect(ramp2.y,switch1.u3) + annotation (Line(points={{-4,-32},{8,-32},{8,-8},{24,-8}},color={0,0,127})); + connect(ramp1.y,switch1.u1) + annotation (Line(points={{-4,32},{8,32},{8,8},{24,8}},color={0,0,127})); + annotation ( + experiment( + StopTime=5.0, + Tolerance=1e-06), + __Dymola_Commands( + file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Continuous/Validation/Switch.mos" "Simulate and plot"), + Documentation( + info=" +

+Validation test for the block + +Buildings.Controls.OBC.CDL.Continuous.Switch. +

+", + revisions=" + +"), + Icon( + graphics={ + Ellipse( + lineColor={75,138,73}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + extent={{-100,-100},{100,100}}), + Polygon( + lineColor={0,0,255}, + fillColor={75,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-36,60},{64,0},{-36,-60},{-36,60}})})); +end Switch; diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/package.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/package.mo index 41207206335..e1c64175451 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/package.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/package.mo @@ -1,6 +1,5 @@ within Buildings.Controls.OBC.CDL.Continuous; -package Validation - "Collection of models that validate the continuous blocks of the CDL" +package Validation "Collection of models that validate the continuous blocks of the CDL" annotation ( preferredView="info", Documentation( diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/package.order b/Buildings/Controls/OBC/CDL/Continuous/Validation/package.order index 3b1ba466789..4d1707750eb 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/package.order +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/package.order @@ -42,4 +42,5 @@ Sin SlewRateLimiter Sort Sqrt +Switch Tan diff --git a/Buildings/Controls/OBC/CDL/Continuous/package.order b/Buildings/Controls/OBC/CDL/Continuous/package.order index d1a4d630e22..305500e5bc7 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/package.order +++ b/Buildings/Controls/OBC/CDL/Continuous/package.order @@ -37,6 +37,7 @@ Sin SlewRateLimiter Sort Sqrt +Switch Tan Sources Validation diff --git a/Buildings/Controls/OBC/CDL/Logical/IntegerSwitch.mo b/Buildings/Controls/OBC/CDL/Integers/Switch.mo similarity index 97% rename from Buildings/Controls/OBC/CDL/Logical/IntegerSwitch.mo rename to Buildings/Controls/OBC/CDL/Integers/Switch.mo index 741b23bae48..0a1ae1a1612 100644 --- a/Buildings/Controls/OBC/CDL/Logical/IntegerSwitch.mo +++ b/Buildings/Controls/OBC/CDL/Integers/Switch.mo @@ -1,5 +1,5 @@ -within Buildings.Controls.OBC.CDL.Logical; -block IntegerSwitch +within Buildings.Controls.OBC.CDL.Integers; +block Switch "Switch between two integer signals" Interfaces.IntegerInput u1 "Integer input signal" @@ -119,4 +119,4 @@ First implementation. extent={{-150,150},{150,110}}, lineColor={0,0,255}, textString="%name")})); -end IntegerSwitch; +end Switch; diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/IntegerSwitch.mo b/Buildings/Controls/OBC/CDL/Integers/Validation/Switch.mo similarity index 75% rename from Buildings/Controls/OBC/CDL/Logical/Validation/IntegerSwitch.mo rename to Buildings/Controls/OBC/CDL/Integers/Validation/Switch.mo index 169879b3d04..1e2b424f0df 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/IntegerSwitch.mo +++ b/Buildings/Controls/OBC/CDL/Integers/Validation/Switch.mo @@ -1,7 +1,6 @@ -within Buildings.Controls.OBC.CDL.Logical.Validation; -model IntegerSwitch - "Validation model for the IntegerSwitch block" - Buildings.Controls.OBC.CDL.Logical.IntegerSwitch integerSwitch +within Buildings.Controls.OBC.CDL.Integers.Validation; +model Switch "Validation model for the Switch block" + Buildings.Controls.OBC.CDL.Integers.Switch integerSwitch "Integer switch" annotation (Placement(transformation(extent={{60,-10},{80,10}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( @@ -44,35 +43,35 @@ protected equation connect(booPul2.y,integerSwitch.u2) - annotation (Line(points={{-5,0},{58,0}},color={255,0,255})); + annotation (Line(points={{-4,0},{58,0}},color={255,0,255})); connect(booPul1.y,booToInt.u) - annotation (Line(points={{-59,30},{-42,30}},color={255,0,255})); + annotation (Line(points={{-58,30},{-42,30}},color={255,0,255})); connect(booPul3.y,booToInt1.u) - annotation (Line(points={{-59,-70},{-42,-70}},color={255,0,255})); + annotation (Line(points={{-58,-70},{-42,-70}},color={255,0,255})); connect(conInt.y,proInt.u1) - annotation (Line(points={{-59,70},{-20,70},{-20,56},{-2,56}},color={255,127,0})); + annotation (Line(points={{-58,70},{-20,70},{-20,56},{-2,56}},color={255,127,0})); connect(booToInt.y,proInt.u2) - annotation (Line(points={{-19,30},{-10,30},{-10,44},{-2,44}},color={255,127,0})); + annotation (Line(points={{-18,30},{-10,30},{-10,44},{-2,44}},color={255,127,0})); connect(conInt1.y,proInt1.u1) - annotation (Line(points={{-59,-30},{-10,-30},{-10,-44},{-2,-44}},color={255,127,0})); + annotation (Line(points={{-58,-30},{-10,-30},{-10,-44},{-2,-44}},color={255,127,0})); connect(booToInt1.y,proInt1.u2) - annotation (Line(points={{-19,-70},{-10,-70},{-10,-56},{-2,-56}},color={255,127,0})); + annotation (Line(points={{-18,-70},{-10,-70},{-10,-56},{-2,-56}},color={255,127,0})); connect(proInt.y,integerSwitch.u1) - annotation (Line(points={{21,50},{40,50},{40,8},{58,8}},color={255,127,0})); + annotation (Line(points={{22,50},{40,50},{40,8},{58,8}},color={255,127,0})); connect(proInt1.y,integerSwitch.u3) - annotation (Line(points={{21,-50},{40,-50},{40,-8},{58,-8}},color={255,127,0})); + annotation (Line(points={{22,-50},{40,-50},{40,-8},{58,-8}},color={255,127,0})); annotation ( experiment( StopTime=5.0, Tolerance=1e-06), __Dymola_Commands( - file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/IntegerSwitch.mos" "Simulate and plot"), + file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Integers/Validation/Switch.mos" "Simulate and plot"), Documentation( info="

Validation test for the block - -Buildings.Controls.OBC.CDL.Logical.IntegerSwitch. + +Buildings.Controls.OBC.CDL.Integers.Switch.

The input u2 is the switch input: If u2 = true, @@ -102,4 +101,4 @@ First implementation. pattern=LinePattern.None, fillPattern=FillPattern.Solid, points={{-36,60},{64,0},{-36,-60},{-36,60}})})); -end IntegerSwitch; +end Switch; diff --git a/Buildings/Controls/OBC/CDL/Integers/Validation/package.mo b/Buildings/Controls/OBC/CDL/Integers/Validation/package.mo index 2143735fe84..3f91b2094e2 100644 --- a/Buildings/Controls/OBC/CDL/Integers/Validation/package.mo +++ b/Buildings/Controls/OBC/CDL/Integers/Validation/package.mo @@ -1,6 +1,5 @@ within Buildings.Controls.OBC.CDL.Integers; -package Validation - "Collection of models that validate the integer blocks of the CDL" +package Validation "Collection of models that validate the integer blocks of the CDL" annotation ( preferredView="info", Documentation( diff --git a/Buildings/Controls/OBC/CDL/Integers/Validation/package.order b/Buildings/Controls/OBC/CDL/Integers/Validation/package.order index 7b07a382abf..a9001555138 100644 --- a/Buildings/Controls/OBC/CDL/Integers/Validation/package.order +++ b/Buildings/Controls/OBC/CDL/Integers/Validation/package.order @@ -15,3 +15,4 @@ Min MultiSum OnCounter Product +Switch diff --git a/Buildings/Controls/OBC/CDL/Integers/package.order b/Buildings/Controls/OBC/CDL/Integers/package.order index a8133fc19c3..f422ad41a41 100644 --- a/Buildings/Controls/OBC/CDL/Integers/package.order +++ b/Buildings/Controls/OBC/CDL/Integers/package.order @@ -15,5 +15,6 @@ Min MultiSum OnCounter Product +Switch Sources Validation diff --git a/Buildings/Controls/OBC/CDL/Logical/Switch.mo b/Buildings/Controls/OBC/CDL/Logical/Switch.mo index 90bc98e874c..d0fcbf2221c 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Switch.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Switch.mo @@ -1,17 +1,17 @@ within Buildings.Controls.OBC.CDL.Logical; block Switch - "Switch between two Real signals" - Interfaces.RealInput u1 - "Real input signal" + "Switch between two boolean signals" + Interfaces.BooleanInput u1 + "Boolean input signal" annotation (Placement(transformation(extent={{-140,60},{-100,100}}))); Interfaces.BooleanInput u2 "Boolean switch input signal, if true, y=u1, else y=u3" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - Interfaces.RealInput u3 - "Real input signal" + Interfaces.BooleanInput u3 + "Boolean input signal" annotation (Placement(transformation(extent={{-140,-100},{-100,-60}}))); - Interfaces.RealOutput y - "Real output signal" + Interfaces.BooleanOutput y + "Booelan output signal" annotation (Placement(transformation(extent={{100,-20},{140,20}}))); equation @@ -21,11 +21,11 @@ equation else u3; annotation ( - defaultComponentName="swi", + defaultComponentName="logSwi", Documentation( info="

-Block that outputs one of two real input signals based on a boolean input signal. +Block that outputs one of two boolean input signals based on a boolean input signal.

If the input signal u2 is true, @@ -60,33 +60,33 @@ Modelica Standard Library. fillPattern=FillPattern.Solid, borderPattern=BorderPattern.Raised), Line( - points={{12.0,0.0},{100.0,0.0}}, - color={0,0,127}), + points={{12,0},{100,0}}, + color={255,0,255}), Line( - points={{-100.0,0.0},{-40.0,0.0}}, + points={{-100,0},{-40,0}}, color={255,0,255}), Line( - points={{-100.0,-80.0},{-40.0,-80.0},{-40.0,-80.0}}, - color={0,0,127}), + points={{-100,-80},{-40,-80},{-40,-80}}, + color={255,0,255}), Line( - points={{-40.0,12.0},{-40.0,-12.0}}, + points={{-40,12},{-40,-10}}, color={255,0,255}), Line( - points={{-100.0,80.0},{-40.0,80.0}}, - color={0,0,127}), + points={{-100,80},{-40,80}}, + color={255,0,255}), Line( - points=DynamicSelect({{10,0},{-40,80}},{{10,0}, + points=DynamicSelect({{8,2},{-40,80}},{{8,2}, if u2 then {-40,80} else {-40,-80}}), - color={0,0,127}, - thickness=1.0), + color={255,0,255}, + thickness=1), Ellipse( - lineColor={0,0,255}, + lineColor={0,0,127}, pattern=LinePattern.None, fillPattern=FillPattern.Solid, - extent={{2.0,-8.0},{18.0,8.0}}), + extent={{2.0,-6.0},{18.0,8.0}}), Ellipse( extent={{-71,7},{-85,-7}}, lineColor=DynamicSelect({235,235,235}, @@ -100,8 +100,47 @@ Modelica Standard Library. else {235,235,235}), fillPattern=FillPattern.Solid), + Ellipse( + extent={{-71,74},{-85,88}}, + lineColor=DynamicSelect({235,235,235}, + if u1 then + {0,255,0} + else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, + if u1 then + {0,255,0} + else + {235,235,235}), + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-71,-74},{-85,-88}}, + lineColor=DynamicSelect({235,235,235}, + if u3 then + {0,255,0} + else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, + if u3 then + {0,255,0} + else + {235,235,235}), + fillPattern=FillPattern.Solid), + Ellipse( + extent={{71,7},{85,-7}}, + lineColor=DynamicSelect({235,235,235}, + if y then + {0,255,0} + else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, + if y then + {0,255,0} + else + {235,235,235}), + fillPattern=FillPattern.Solid), Text( - extent={{-90,80},{-46,54}}, + extent={{-90,76},{-46,50}}, lineColor=DynamicSelect({0,0,0}, if u2 then {0,0,0} @@ -109,7 +148,7 @@ Modelica Standard Library. {235,235,235}), textString="true"), Text( - extent={{-90,-46},{-38,-76}}, + extent={{-90,-42},{-38,-72}}, lineColor=DynamicSelect({0,0,0}, if u2 then {235,235,235} diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo deleted file mode 100644 index 57f04c0bd7c..00000000000 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo +++ /dev/null @@ -1,71 +0,0 @@ -within Buildings.Controls.OBC.CDL.Logical.Validation; -model LogicalSwitch - "Validation model for the LogicalSwitch block" - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( - width=0.7, - period=1.5) - "Block that outputs cyclic on and off" - annotation (Placement(transformation(extent={{-26,24},{-6,44}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2( - width=0.5, - period=3) - "Block that outputs cyclic on and off: switch between u1 and u3" - annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( - width=0.5, - period=5) - "Block that outputs cyclic on and off" - annotation (Placement(transformation(extent={{-26,-46},{-6,-26}}))); - Buildings.Controls.OBC.CDL.Logical.LogicalSwitch logicalSwitch - "Switch between two boolean inputs" - annotation (Placement(transformation(extent={{26,-10},{46,10}}))); - -equation - connect(booPul2.y,logicalSwitch.u2) - annotation (Line(points={{-4,0},{-4,0},{24,0}},color={255,0,255})); - connect(booPul1.y,logicalSwitch.u1) - annotation (Line(points={{-4,34},{10,34},{10,8},{24,8}},color={255,0,255})); - connect(booPul3.y,logicalSwitch.u3) - annotation (Line(points={{-4,-36},{10,-36},{10,-8},{24,-8}},color={255,0,255})); - annotation ( - experiment( - StopTime=5.0, - Tolerance=1e-06), - __Dymola_Commands( - file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mos" "Simulate and plot"), - Documentation( - info=" -

-Validation test for the block - -Buildings.Controls.OBC.CDL.Logical.LogicalSwitch. -

-

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

- -", - revisions=" - -"), - Icon( - graphics={ - Ellipse( - lineColor={75,138,73}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid, - extent={{-100,-100},{100,100}}), - Polygon( - lineColor={0,0,255}, - fillColor={75,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-36,60},{64,0},{-36,-60},{-36,60}})})); -end LogicalSwitch; diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo index 93bc68a9dcc..1d7cbd5910b 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo @@ -1,34 +1,31 @@ within Buildings.Controls.OBC.CDL.Logical.Validation; -model Switch - "Validation model for the Switch block" - Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( - duration=5, - offset=-1, - height=6) - "Block that generates ramp signal" - annotation (Placement(transformation(extent={{-26,22},{-6,42}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( - duration=5, - offset=-1, - height=2) - "Block that generates ramp signal" - annotation (Placement(transformation(extent={{-26,-42},{-6,-22}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( - width=0.5, - period=2) +model Switch "Validation model for the Switch block" + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( + width=0.7, + period=1.5) "Block that outputs cyclic on and off" + annotation (Placement(transformation(extent={{-26,24},{-6,44}}))); + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2( + width=0.5, + period=3) + "Block that outputs cyclic on and off: switch between u1 and u3" annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); - Buildings.Controls.OBC.CDL.Logical.Switch switch1 - "Switch between two real inputs" + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( + width=0.5, + period=5) + "Block that outputs cyclic on and off" + annotation (Placement(transformation(extent={{-26,-46},{-6,-26}}))); + Buildings.Controls.OBC.CDL.Logical.Switch logicalSwitch + "Switch between two boolean inputs" annotation (Placement(transformation(extent={{26,-10},{46,10}}))); equation - connect(booPul.y,switch1.u2) + connect(booPul2.y,logicalSwitch.u2) annotation (Line(points={{-4,0},{-4,0},{24,0}},color={255,0,255})); - connect(ramp2.y,switch1.u3) - annotation (Line(points={{-4,-32},{8,-32},{8,-8},{24,-8}},color={0,0,127})); - connect(ramp1.y,switch1.u1) - annotation (Line(points={{-4,32},{8,32},{8,8},{24,8}},color={0,0,127})); + connect(booPul1.y,logicalSwitch.u1) + annotation (Line(points={{-4,34},{10,34},{10,8},{24,8}},color={255,0,255})); + connect(booPul3.y,logicalSwitch.u3) + annotation (Line(points={{-4,-36},{10,-36},{10,-8},{24,-8}},color={255,0,255})); annotation ( experiment( StopTime=5.0, @@ -42,6 +39,12 @@ Validation test for the block Buildings.Controls.OBC.CDL.Logical.Switch.

+

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

+ ", revisions="