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
Quintiq file version 2.0
#parent: #root
Method GetDemands
{
  TextBody:
  [*
    // Construct of strings, each element correspond to one line in CSV string
    
    // Traverse through all PISPIPs which should be considered in MEIO
    // 1. Should have the correct planning period specification
    // 2. Should be active in MEIO
    // 3. Should not be collapsed ( not active in MEIO or zero upstream leadtime )
    traverse( this, 
              Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), 
              pispip, 
              pispip.MEIO_IsPlanningPeriodInMEIO()
              and pispip.ProductInStockingPoint_MP().IsActiveInMEIO() 
              and not pispip.ProductInStockingPoint_MP().MEIO_IsCollapsedPISP() )
    {
      // Calculate the expected value and standard deviation for the given pispip.                        
      expected_value := this.GetExpectedValue( pispip );
      pispip.MEIO_DemandExpectedValue( expected_value ); 
      std := this.GetSTD( pispip );
      pispip.MEIO_DemandStandardDeviation( std ); 
    }
  *]
}