Annex60.Controls.SetPoints.OccupancySchedule

# .Annex60.Controls.SetPoints.OccupancySchedule

Occupancy schedule with look-ahead

## Information

This model outputs whether the building is currently occupied, and how long it will take until the next time when the building will be occupied or non-occupied. The latter may be used, for example, to start a ventilation system half an hour before occupancy starts in order to ventilate the room.

The occupancy is defined by a time schedule of the form

      occupancy = 3600*{7, 12, 14, 19}

This indicates that the occupancy is from 7:00 until 12:00 and from 14:00 to 19:00. This will be repeated periodically. The parameter `periodicity` defines the periodicity. The period always starts at t=0 seconds.

## Revisions

- September 11, 2012, by Michael Wetter:
  Added `pre` operator in `when` clause and relaxed tolerance in `assert` statement.
- July 26, 2012, by Michael Wetter:
  Fixed a bug that caused an error in the schedule if the simulation start time was negative or equal to the first entry in the schedule.
- February 16, 2012, by Michael Wetter:
  Removed parameter `startTime`. It was removed because `startTime=0` would imply that the schedule should not start for one day if the simulation were to be started at t=-8760 seconds. Fixed bug that prevented schedule to start when the simulation was started at a time that is higher than `endTime`. Renamed parameter `endTime` to `period`.
- April 2, 2009, by Michael Wetter:
  First implementation.

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos