Buildings.Controls.OBC.CDL.Conversions
Package with blocks for type conversion
Information
Package with blocks for type conversions.
Package Content
Name | Description |
---|---|
BooleanToInteger | Convert Boolean to Integer signal |
BooleanToReal | Convert Boolean to Real signal |
IntegerToReal | Convert Integer to Real signals |
IsHoliday | Block that outputs true if the input is a holiday |
IsNonWorkingDay | Block that outputs true if the input is a non-working day |
IsWorkingDay | Block that outputs true if the input is a working day |
RealToInteger | Convert Real to Integer signal |
Validation | Collection of models that validate the conversion blocks of the CDL |
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger
Convert Boolean to Integer signal
Information
Block that outputs the Integer
equivalent of the Boolean
input.
y = if u then integerTrue else integerFalse;
where u
is of Boolean
and y
of Integer
type,
and integerTrue
and integerFalse
are parameters.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | integerTrue | 1 | Output signal for true Boolean input |
Integer | integerFalse | 0 | Output signal for false Boolean input |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u | Connector of Boolean input signal |
output IntegerOutput | y | Connector of Integer output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal
Convert Boolean to Real signal
Information
Block that outputs the Real
equivalent of the Boolean
input.
y = if u then realTrue else realFalse;
where u
is of Boolean
and y
of Real
type,
and realTrue
and realFalse
are parameters.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | realTrue | 1 | Output signal for true Boolean input |
Real | realFalse | 0 | Output signal for false Boolean input |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u | Connector of Boolean input signal |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Conversions.IntegerToReal
Convert Integer to Real signals
Information
Block that outputs the Real
equivalent of the Integer
input.
y = u;
where u
is of Integer
and
y
of Real
type.
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | u | Connector of Integer input signal |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Conversions.IsHoliday
Block that outputs true if the input is a holiday
Information
Block that outputs true
if the input signal is
of type holiday.
Connectors
Type | Name | Description |
---|---|---|
input DayTypeInput | u | Connector of DayType input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Conversions.IsNonWorkingDay
Block that outputs true if the input is a non-working day
Information
Block that outputs true
if the input signal is
of type non-working day.
Connectors
Type | Name | Description |
---|---|---|
input DayTypeInput | u | Connector of DayType input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Conversions.IsWorkingDay
Block that outputs true if the input is a working day
Information
Block that outputs true
if the input signal is
of type working day.
Connectors
Type | Name | Description |
---|---|---|
input DayTypeInput | u | Connector of DayType input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Conversions.RealToInteger
Convert Real to Integer signal
Information
Block that outputs y
as the nearest integer value of the input u
.
The block outputs
y = integer( floor( u + 0.5 ) ) for u > 0, y = integer( ceil ( u - 0.5 ) ) for u < 0.
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output IntegerOutput | y | Connector of Integer output signal |