| Quintiq file version 2.0 | 
| #parent: #root | 
| MethodOverride CreateComponents ( | 
|   LibOpt_Run run | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|      | 
|      | 
|     // create CapacityPlanningSubOptimizer | 
|     // note userperiodtasks and userproductintrips are set as relations on this object, pispipssmartplan is empty for this suboptimizer  | 
|      | 
|     //run.DebugScope( true ); | 
|     prepostcomp := run.Component( relnew, OptimizerPrePostProcessing, Name := 'PrePostProcessing_FullRun' );  | 
|     runcontext := RunContextForCapacityPlanning::GetRunContextCapacityPlanning( run );  | 
|      | 
|     transformerforuserperiodtasks := run.Component( relnew, TransformerFullRun, Name := 'TransformerFullRun'  );  | 
|     selectorfullpuzzle := run.Component( relnew, SelectorFullPuzzle, Name := 'SelectorFullPuzzle' );  | 
|      | 
|     suboptimizer := CapacityPlanningSuboptimizer::Create( runcontext.MaxLevel(),                                                    // focuslevel | 
|                                                           false,                                                // ispriorlevelsfixed | 
|                                                           runcontext.IsAutoScalingEnabled(),                    // isupdatescaling | 
|                                                           false,                                                // runpastfocuslevel | 
|                                                           run,  | 
|                                                           'CapacityPlanningSubOptimizerForFullRun',            // name | 
|                                                           false,   // user supply correction carried fwd inventory | 
|                                                           false,   // keep total available supply | 
|                                                           false,   // do not use periodtaskoperation in definition | 
|                                                           false,   // only plan demand smart plan pispips | 
|                                                           false,   // no extra level to minimize ptqty  | 
|                                                           false,   // not applicable | 
|                                                           0.0,     // not applicable | 
|                                                           true,    // apply noise treshold | 
|                                                           run.Optimization().astype( Optimization ).MacroPlan().StrategyMacroPlan().UseHierarchicalSolver(),   // hierarchical cplex goals | 
|                                                           runcontext.SmallestIntegralityTolerance(), | 
|                                                           runcontext.SmallestFeasibilityTolerance(),  | 
|                                                           false,   // full plan for meta  | 
|                                                           false,   // collapse level | 
|                                                           0.0 );   // collapse level weight | 
|                                                            | 
|      | 
|     RollbackKPIMeta::Create( suboptimizer,  | 
|                              RunContextForCapacityPlanning::GetRunContextCapacityPlanning( run ),  | 
|                              0,   // unused | 
|                              0.0, // unused | 
|                              0.0, // unused | 
|                              runcontext.SmallestFeasibilityTolerance(), // blending KPI accuracy | 
|                              true, // unused | 
|                              runcontext.MaxLevel(),  | 
|                              true ); // always accept - just want to see scores in snapshots | 
|      | 
|     prepostcomp.To(  selectorfullpuzzle );  | 
|     selectorfullpuzzle.To(  transformerforuserperiodtasks );  | 
|     transformerforuserperiodtasks.To( suboptimizer ); | 
|      | 
|     startexcludedproducts := Optimization::GetStartComponentForExcludedProductsOptimization( run );  | 
|     if ( not isnull( startexcludedproducts ) )  | 
|     { | 
|       suboptimizer.To( startexcludedproducts );  | 
|     } | 
|      | 
|     this.ConfigureForOneTransaction( run );  | 
|     run.InOneTransaction( false ); | 
|     suboptimizer.InOneTransaction( false ); | 
|   *] | 
| } |