Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method ApplyNoiseThreshold ( 
 | 
  LibOpt_Task task 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // mjn3 Jan-29-2020 (created) 
 | 
     
 | 
    //  pispip.OptimizerFulfilledTargetInventoryQuantity( this.GetOptimalValue( program.TargetInvQtyVariables().Get( pispip ) ) );  
 | 
     
 | 
    //pt.SetOptimizerQuantity( quantity );   
 | 
     
 | 
    //ptct.Quantity( this.GetOptimalValue( program.PTCampaignQtyVariables().Get( ptct.OperationInCampaign(), period ) ) ); 
 | 
     
 | 
    /* 
 | 
    traverse( periodtaskoperation,  
 | 
              DependentDemandInputGroup,  
 | 
              dd,  
 | 
              dd.HasRegularProductForOptimizer() or dd.OperationInput().GetIsProductInOptimizerRun( runcontext.IsPostProcessing() ) ) 
 | 
    { 
 | 
      fulfilledqty := this.GetOptimalValue( program.OperationDemandQtyVariables().Get( dd.OperationInput(), ptperiod ) ); 
 | 
     
 | 
      if( operation.HasLeadTime() )     // Get the dependent demands that is located at different period from the period of period task. 
 | 
      { 
 | 
        pispipperiods := construct( Period_MPs);  
 | 
        CapacityPlanningSuboptimizer::GetOperationDependentDemandPeriods( ptperiod, operation, pispipperiods ); 
 | 
     
 | 
        fulfilledqty := sum( pispipperiods, Elements, pispipperiod, 
 | 
                             this.GetOptimalValue( program.PartialOperationDemandQtyVariables().Get( dd.OperationInput(), pispipperiod, ptperiod ) ) ); 
 | 
      } 
 | 
     
 | 
      dd.OptimizerFulfilledQuantity( fulfilledqty ); 
 | 
    */ 
 | 
     
 | 
    /* 
 | 
    traverse( scope.GetLeafSalesDemandInPeriodInRun(), Elements, sd, isnull( sd.OriginalSalesDemand() ) ) 
 | 
    { 
 | 
      qty := this.GetOptimalValue( program.SalesDemandQtyVariables().Get( sd ) ); 
 | 
      sd.UpdateOptimizerFulfillment( true, qty ); 
 | 
       
 | 
      this.HandleFeasibleDelayedSalesDemand( sd, program, runcontext, scope ); 
 | 
    } 
 | 
    */ 
 | 
     
 | 
     
 | 
    /* 
 | 
    traverse( scope.GetAggregatedSalesDemandInPeriodInRun(), Elements, asdip ) // Aggregated does not have pisp asdip.ProductInStockingPoint_MP().GetIsInOptimizerRun() 
 | 
    {  
 | 
      // No optimizer variables for AggregatedSalesDemandInPeriod 
 | 
      // Traverse the children ( Disaggregated Sales demands ) 
 | 
      // skip postponed sales demand. Instead of using IsPostponed which requires a transaction propagate, we will just check for null OriginalSalesDemand 
 | 
      traverse ( asdip, DisaggregatedSalesDemandInPeriod, dasdip,  
 | 
                 isnull( dasdip.OriginalSalesDemand() ) 
 | 
                 and scope.Contains( dasdip.AsPlanningBaseSalesDemandInPeriod().PISPIPInOptimizerRun() ) )  
 | 
      { 
 | 
        // Type    : DisaggregatedSalesDemandInPeriod 
 | 
        // Variable: 'DisaggregatedSalesDemandQty' UoM: PISP 
 | 
        var := this.GetOptimalValue( program.DisaggregatedSalesDemandQtyVariables().Get( dasdip ) ); 
 | 
        dasdip.UpdateOptimizerFulfillment( true, var );*/ 
 | 
     
 | 
     
 | 
    //postponed sales demand -- see handle feasible sales demand 
 | 
     
 | 
     
 | 
    // product in trips 
 | 
  *] 
 | 
  InterfaceProperties { Accessibility: 'Module' } 
 | 
} 
 |