Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method PostProcessing2 ( 
 | 
  MacroPlan macroPlan 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // 产线整班 
 | 
    traverse ( macroPlan, Unit, unit, unit.IsToFill() and unit.HasCapacityTypeTime() ) { 
 | 
      unitName := unit.Name(); 
 | 
      debuginfo( "整班产线: ", unitName ); 
 | 
       
 | 
      // 按时间给UnitPeriodTimeBase排序 
 | 
      uptbs    := selectsortedset( unit, UnitPeriod.astype( UnitPeriodTimeBase ), tempUPTB, not tempUPTB.IsPeriodFrozen() and tempUPTB.IsPlanning(), tempUPTB.Start() ); 
 | 
           
 | 
      // 圆整或补零当前产线下所生产的产品 
 | 
      this.IsRoundingOrZeroFilling3( macroPlan, uptbs ); // 借还逻辑 
 | 
      Transaction::Transaction().Propagate(); 
 | 
             
 | 
    //        // 平衡当前产线下所生产的产品库存(库存 < 最大库存) 
 | 
    //        // this.A_balanceInventory( macroPlan, unitPeriodTimeBases ); 
 | 
    //        // Transaction::Transaction().Propagate(); 
 | 
    //        
 | 
    //        // 设置当前产线在期间为日的计划中每天只生产一类产品 
 | 
    //        // this.A_produceAProductForAPeriodOfTime( macroPlan, unitPeriodTimeBases ); 
 | 
    //         
 | 
    //        // Lotsize逻辑处理 
 | 
    //        // this.A_lotsize( macroPlan, scenarioManager, unitPeriodTimeBases ); 
 | 
    //        info( "逻辑三==>拆成班次-----------------------------------------------------------------------------------------------------------------------" ); 
 | 
    //         
 | 
    //        // 拆成班次 
 | 
    //        this.A_processingShift( macroPlan, unitPeriodTimeBases, unitPeriodTimeBases.Element( 0 ).StartDate(), true ); 
 | 
    //        Transaction::Transaction().Propagate(); 
 | 
    //         
 | 
    //        info( "逻辑四=>处理班次,实现一个班次只生产一类产品-----------------------------------------------------------------------------------------------------------------------" ); 
 | 
    //         
 | 
    //        // 处理班次,实现一个班次只生产一类产品 
 | 
    //    //    this.A_processingShiftToProduceClassProducts( macroPlan, unitPeriodTimeBases, unitName ); 
 | 
    //        this.A_processingShiftToProduceClassProducts2( macroPlan, unitPeriodTimeBases, unitName ); 
 | 
    //        Transaction::Transaction().Propagate(); 
 | 
    //       
 | 
    //        // 重置需求 
 | 
    //        this.A_generateRequirements( macroPlan, unit.ID() ); 
 | 
    //        Transaction::Transaction().Propagate(); 
 | 
    //      } 
 | 
    } 
 | 
     
 | 
    // 车道整班 
 | 
    traverse ( macroPlan, Unit, unit, unit.IsToFill() and unit.HasCapacityTypeTransportQuantity() ) { 
 | 
      unitName := unit.Name(); 
 | 
      debuginfo( "车道产线: ", unitName ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |