yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
Quintiq file version 2.0
#parent: #root
Method AddDebottleneckNeighborhood (
  LibOpt_Task task,
  TransformerSmartPlanUpStream transformerup,
  TransformerSmartPlanDownStream tranformerdown,
  LibOpt_Scope out_scope,
  RunContextForCapacityPlanning runcontext,
  RunContextMeta rcm,
  ProductInStockingPointInPeriodPlanningLeafs pispips_inputs_to_bottleneck,
  LaneLegs lanelegsforopt,
  Period_MPs periods,
  String msgtag
)
{
  TextBody:
  [*
    debuginfo(  '>>> Start debottleneck' ); 
    debuginfo(  'PISPIP for debottleneck = ' ,pispips_inputs_to_bottleneck.Size() ); 
    beforesize := out_scope.GetEstimatedNrPISPIPs();
    
    this.AddUpstreamNeighborhood( transformerup, out_scope, runcontext, pispips_inputs_to_bottleneck , true, lanelegsforopt, periods, false );
    
    this.AddDownStreamLimitedExplore( tranformerdown, 
                                      out_scope, 
                                      pispips_inputs_to_bottleneck, 
                                      runcontext, 
                                      false, // debug
                                      rcm.OptionCheckSizeLimitDebottleneckNeighborhood(), // check size limit  
                                      0.25,  // fraction of max to use in case checking size limiting
                                      Number::MaxNumber(),   //MaxFanExploreDownStreamLane
                                      true, // limit to nonzero planning
                                      Number::MaxNumber(),  // nr operations chosen - unused because previous argument true
                                      false ); // reset visited prior to search
    aftersize := out_scope.GetEstimatedNrPISPIPs(); 
    
    task.Log( 'Selector added for downstream (debottleneck):' + [String]( aftersize - beforesize ) + ' size before  = ' + [String] beforesize + ' ' + msgtag ); 
    debuginfo(  '<<< End debottleneck' );
  *]
  InterfaceProperties { Accessibility: 'Module' }
}