From 1093d0c693c5d10a0fa5bf614eb4b48161bee1ec Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期五, 13 十月 2023 11:50:14 +0800
Subject: [PATCH] 填产优化
---
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration3.qbl | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration3.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration3.qbl
index a3edaf0..1c16b4d 100644
--- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration3.qbl
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration3.qbl
@@ -1,9 +1,13 @@
Quintiq file version 2.0
#parent: #root
StaticMethod IterativeGeneration3 (
+ MacroPlan macroPlan,
+ GlobalOTDTable globalOTDTable,
Supply_MP smp,
+ Supply_MP firstSMP,
Number numberOfPlies,
- Real fulfillmentQuantity
+ Real fulfillmentQuantity,
+ CapacityAllocationResultsRuleConfiguration capacityAllocationResultsRuleConfiguration
)
{
TextBody:
@@ -20,10 +24,12 @@
traverse ( dd, Fulfillment, f ) {
smp1 := f.Supply_MP();
numberOfPlies++;
+ fulfillmentQuantity := ( dd.Quantity() / ns.Quantity() ) * fulfillmentQuantity;
info( "--------------------------------------------------------------" );
- fulfillmentQuantity := fulfillmentQuantity * ns.ProcessOutput().astype( OperationOutput ).Quantity() *
- dd.ProcessInput().astype( OperationInput ).Quantity();
- CapacityAllocationResults::IterativeGeneration3( smp1, numberOfPlies, fulfillmentQuantity );
+ if ( not isnull( capacityAllocationResultsRuleConfiguration ) ) {
+ CapacityAllocationResults::CreateDate1( macroPlan, globalOTDTable, dd, ns, firstSMP, capacityAllocationResultsRuleConfiguration, fulfillmentQuantity );
+ }
+ CapacityAllocationResults::IterativeGeneration3( macroPlan, globalOTDTable, smp1, firstSMP, numberOfPlies, fulfillmentQuantity, capacityAllocationResultsRuleConfiguration );
numberOfPlies--;
}
}
@@ -33,14 +39,17 @@
targetDependentDemand := select( ptll, DependentDemand, dd, dd.ProcessInput().ProductInStockingPoint_MP().ProductID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() and
dd.Quantity() = ns.Quantity() );
info( "杞﹂亾鍛ㄦ湡浠诲姟 ", "渚涘簲鏃堕棿锛�", ns.Start().Format( "Y-M2-D2" ), " 鍛ㄦ湡浠诲姟KEY锛�", ptll.Key(), " ",
- targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name() );
+ ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name() );
traverse ( targetDependentDemand, Fulfillment, f ) {
smp1 := f.Supply_MP();
numberOfPlies++;
info( "--------------------------------------------------------------" );
- CapacityAllocationResults::IterativeGeneration3( smp1, numberOfPlies, f.Quantity() );
+ if ( not isnull( capacityAllocationResultsRuleConfiguration ) ) {
+ CapacityAllocationResults::CreateDate1( macroPlan, globalOTDTable, targetDependentDemand, ns, firstSMP, capacityAllocationResultsRuleConfiguration, f.Quantity() );
+ }
+ CapacityAllocationResults::IterativeGeneration3( macroPlan, globalOTDTable, smp1, firstSMP, numberOfPlies, f.Quantity(), capacityAllocationResultsRuleConfiguration );
numberOfPlies--;
- }
+ }
}
}
}
--
Gitblit v1.9.3