1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method VerifyMinMaxMonthlyCapacity ( 
 |    Unit unit, 
 |    DateTime start, 
 |    DateTime end, 
 |    Real expectedMin, 
 |    Real expectedMax 
 |  ) 
 |  { 
 |    Description: 'Verify planning unit periods min and max capacity based on monthly  capacity.' 
 |    TextBody: 
 |    [* 
 |      // Select all planning unit periods within range of dates 
 |      unitPeriods := selectset( unit, UnitPeriod.astype( UnitPeriodQuantity ), up, up.Start() >= start and up.End() <= end and up.Period_MP().IsPlanning() ); 
 |      traverse( unitPeriods, Elements, unitPeriod ) 
 |      { 
 |        // Verify min and max capacities 
 |        this.Run().AssertEqual( expectedMin, unitPeriod.TotalMinCapacity(), this.GetMinCapacityErrorMessage( unit, expectedMin, unitPeriod ) ); 
 |        this.Run().AssertEqual( expectedMax, unitPeriod.TotalMaxCapacity(), this.GetMaxCapacityErrorMessage( unit, expectedMax, unitPeriod ) ); 
 |      } 
 |    *] 
 |    InterfaceProperties { Accessibility: 'Module' } 
 |  } 
 |  
  |