lihongji
2024-06-18 b8e189bb0717177f36b35b961e58c26470b5aceb
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 );
    }
  *]
}