addItem

abstract fun addItem(capacity: Int, duration: Double, itemPriority: Int = eventPriority): CapacitySchedule.CapacityItem(source)

Adds an item to the schedule. Each item is added consecutively to the schedule in the order added. The start time of the 2nd capacity change is the ending time of the first capacity change and so on.

The total length of the schedule is the sum of all the durations added.

Return

the created CapacityItem

Parameters

duration

the duration of the item

capacity

the capacity for the duration