Calendars

Calendars are used to define the Capacity of Resources in time.

They are formalized as an array of non-overlapping time ranges.

Each time range is an array with three required values and one optional description:

  • start time of the range in minutes
  • stop time of the range in minutes, has to be strictly superior to start time.
  • Capacity of the range (in resource Capacity units)
  • optional textual description

Ranges with a zero capacity do not need to be specified (a Capacity of zero is assumed), but ranges with a capacity of zero can be used to specify descriptions, for instance to explicit why a Resource is closed.

Time ranges are defined as ranges with boundaries of size zero.
This means that the Calendar [[0,1,1], [1,2,2]] describes two blocks of time that last 1 minute, the first with a capacity of one that goes from time 0 to time 1, and the second with a capacity of two that goes from time 1 to time 2.

Example

[
   [-1200, -240, 1, "Day 1"],
   [-240, 240, 0, "Night 1"],
   [240, 1200, 1, "Day 2"],
   [1200, 1680, 0, "Night 2"],
   [1680, 2640, 1, "Day 3"],
   [2640, 3120, 0, "Night 3"]
]