renhao
2023-09-21 1aa9f2bb83dd9e4b7517f1cbf06b0db53979bb31
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
Quintiq file version 2.0
#parent: #root
Method ResetDependentDemandInputGroupOptimizerFulfillment
{
  Description: 'Reset the optimizer fulfillment of dependent deamand in group for this period task, also the optimizer fulfillment of downstream dependent demands of all its new supplies'
  TextBody:
  [*
    // soh yee Feb-14-2015 (created)
    
    // Example we have the following operations and we're going to set the supply qty for C to 0 (also means PT1 qty = 0).
    // A & B -> PT1 -> C
    // C & D -> PT2 -> E
    
    // Step 1: Reset the fulfilled qty of A & B. Since supply of C = 0, DD A & B qty will be 0, optimizer fulfilled qty shoud also be reset.
    traverse( this, DependentDemandInputGroup, ddig )
    {
      ddig.OptimizerFulfilledQuantity( 0.0 );
    }
    
    traverse( this, NewSupply.ProductInStockingPointInPeriodPlanningLeaf, pispip )
    {
      // Step 2 & 3: Optimizer fulfillment and Optimizer reserved qty is reset to 0 for greedy dependent demand fulfillment.
      pispip.ResetQuantitySetByOptimizer();
    }
  *]
}