From f548609873fb52f530f0e7e32f255a4f69a5b648 Mon Sep 17 00:00:00 2001 From: Kevin Kok Khah Whey <khahwhey.kok@3ds.com> Date: 星期二, 26 九月 2023 16:53:30 +0800 Subject: [PATCH] Kevin: Fixed optimizer error according to OOTB 6.4.2. --- LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl b/LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl index d9e0f40..c34a5c7 100644 --- a/LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl +++ b/LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl @@ -175,10 +175,12 @@ if ( ddperiodstotal.Size() > 0 ) { + minstart := min( ddperiodstotal, Elements, p, p.Start() ); + minstartperiods := min( periods, Elements, p, p.Start() ); pispiptoadd := selectset( operation, OperationInput.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning, pispip, - ddperiodstotal.Find( pispip.Period_MP() ) > 0 + pispip.Start() >= minstart and pispip.Start() < minstartperiods // must add the entire block. Don't want gaps in the pispip horizon and ( pispip.HasRegularProductForOptimizer() or pispip.GetProductIsIncludedInOptimizerRun( runcontext.IsPostProcessing() ) ) and not scope.Contains( pispip.PISPIPInOptimizerRun() ) ) -- Gitblit v1.9.3