renhao
2023-10-13 462215553c754d26acde8edab81b4a73f774e21e
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
Quintiq file version 2.0
#parent: #root
StaticMethod AutomaticallyGenerateCapacityAllocationResults (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = "ProSports Spider D2.6 M" );
    
    period_MPS := null( Period_MPs );
    traverse ( macroPlan, PeriodSpecification_MP, psmp, psmp.ID() = "Planning periods" ) {
      period_MPS := selectsortedset( psmp, PeriodSpecificationPeriod.Period_MP, pmp, not pmp.IsHistorical(), pmp.StartDate() );
    }
    
    traverse ( targetProduct_MP, ProductInStockingPoint_MP, pisp ) {
      traverse ( period_MPS, Elements, pmp, pmp.StartDate() = Date::Construct( 2020, 4, 1 ) ) { 
        info( pmp.StartDate().Format( "Y-M2-D2" ), "    outputPISP:", pisp.Name() );
        CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, pisp, pisp, pmp.StartDate() );
        info( "-------------------------------------------------------------------------------------------------------" );
      }
    }
  *]
}