modelDayType
Information
This block outputs a signal that indicates the type of the day. It can for example be used to generate a signal that indicates whether the current time is a work day or a non-working day. The output signal is of type Buildings.Obsolete.Controls.OBC.CDL.Types.Day.
The parameter nout determines how many days should be
sent to the output. For applications in which only the current day
is of interest, set nout=1.
For applications in which the load is predicted for the next 24 hours,
set nout=2 in order to output the type of day for today and for
tomorrow.
The transition from one day type to another always happens when the simulation time is a multiple of 1 day. Hence, if the simulation starts for example at t=-3600 seconds, then the first transition to another day will be at t=0.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nout | 2 | Number of days to output. Set to two for one day predictions |
| Buildings.Obsolete.Controls.OBC.CDL.Types.Day | days | {Buildings.Obsolete.Controls.OBC.CDL.Types.Day.WorkingDay, Buildings.Obsolete.Controls.OBC.CDL.Types.Day.WorkingDay, Buildings.Obsolete.Controls.OBC.CDL.Types.Day.WorkingDay, Buildings.Obsolete.Controls.OBC.CDL.Types.Day.WorkingDay, Buildings.Obsolete.Controls.OBC.CDL.Types.Day.WorkingDay, Buildings.Obsolete.Controls.OBC.CDL.Types.Day.NonWorkingDay, Buildings.Obsolete.Controls.OBC.CDL.Types.Day.NonWorkingDay} | Array where each element is a day indicator |
| Integer | iStart | 1 | Index of element in days at simulation start |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Obsolete.Controls.OBC.CDL.Interfaces.DayTypeOutput[nout] | y | Type of the day for the current and the next (nout-1) days |
Revisions
-
January 13, 2022, by Michael Wetter:
Moved toObsoletepackage.
This is for issue 2839. -
October 21, 2021, by Michael Wetter:
Setminattribute fornoutand removed writing output value in icon (as it is an array of values). -
November 12, 2020, by Michael Wetter:
Reformulated to remove dependency toModelica.Units.SI.
This is for issue 2243. -
March 2, 2020, by Michael Wetter:
Changed icon to display dynamically the output value. -
January 11, 2016, by Milica Grahovac:
First CDL implementation. -
March 20, 2014 by Michael Wetter:
First implementation.