admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Quintiq file version 2.0
#parent: #root
Method NeedsCapacitySmoothing () const declarative as Boolean
{
  Description:
  [*
    1. Owning unit and its children have operations
    2. Owning unit has capacity smoothing enabled
    3. Capacity smoothing length >= 2
    4. Is not in a frozen period
    5. Number of open units > 0
    6. Other things specified in subclasses
  *]
  TextBody:
  [*
    // Wayne Sep-5-2013 (created)
    // gan dickson Nov-9-2016 (modified)
    // FrozenPeriod moves to Unit level
    
    value := this.Unit().CanBePlanned()
             and this.Unit().HasCapacitySmoothing()
             and this.Unit().CapacitySmoothingLength() >= 2
             and not this.IsPeriodFrozen()
             and this.NrOfOpen() > 0
             and this.IsPlanning();
    
    return value;
  *]
}