| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod GetCandidates ( | 
|   LibOpt_Scope scope | 
| ) as owning ProductInStockingPointInPeriodPlannings | 
| { | 
|   TextBody: | 
|   [* | 
|     mp := scope.Run().Optimization().astype( Optimization ).MacroPlan();  | 
|     periods := scope.GetPeriodInOptimizerRun();  | 
|     earlieststart := min( periods, Elements, p, true, p.Start() );  | 
|     lateststart := max(  periods, Elements, p, true, p.Start() );  | 
|     pispips := selectset(  mp, ProductInStockingPointInPeriodPlanningLeafNonZeroEIS, pispip, true, pispip.Start() >= earlieststart and pispip.Start() <= lateststart );  | 
|      | 
|     /* for debugging fix an anchor | 
|     pispips := selectset(  mp, StockingPoint_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning.astype(  ProductInStockingPointInPeriodPlanningLeaf ), p,  | 
|                            p.ProductInStockingPoint_MP().Product_MP().Name() = 'FG-2-24-110-4614-12-0'  | 
|                            and p.ProductInStockingPoint_MP().StockingPoint_MP().Name() = '624790' | 
|                            and p.Start().Date() = Date::Construct( 2020, 7, 1 ) );  | 
|     */ | 
|      | 
|     return &pispips; | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |