chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
30
31
Quintiq file version 2.0
#parent: #root
Method SelectIterationAndInventorySpecifications
{
  Description: 'Sets the inventory specifications from this iteration as the default which will be used in the regular optimizer runs.'
  TextBody:
  [*
    // Martijn Dec-1-2016 (created)
    // Make sure all the other iterations are no longer selected
    traverse( this, DEPRECATED_InventoryOptimization.Iteration, iteration, iteration.IsSelected() )
    {
      iteration.IsSelected( false );
    }
    
    // Select this iteration
    this.IsSelected( true );
    
    // Set the iventory specifications as the default
    traverse( this, IterationInventorySpecification, iterationinvspec )
    {
      iterationinvspec.SetAsDefault();
    }
    
    // Update the expected KPIs based on the selected iteration
    traverse( this, IterationPISP, iterationpisp )
    {
      iterationpisp.ProductInStockingPoint_MP().ExpectedFulfillmentPercentage( iterationpisp.ExpectedFulfillmentPercentage() );
      iterationpisp.ProductInStockingPoint_MP().ExpectedInventoryHoldingCost( iterationpisp.ExpectedInventoryHoldingCost() );
    }
  *]
}