Quintiq file version 2.0
|
#parent: #root
|
StaticMethod IterativeGeneration3 (
|
Supply_MP smp,
|
Number numberOfPlies,
|
Real fulfillmentQuantity
|
)
|
{
|
TextBody:
|
[*
|
info( "层数:", numberOfPlies );
|
ontype ( smp ) {
|
NewSupply as ns : {
|
info( "供应类型(NewSupply)", " 供应量:", ns.Quantity(), " 实际用量:", fulfillmentQuantity );
|
ontype ( ns.PeriodTask_MP() ) {
|
PeriodTaskOperation as pto : {
|
info( "操作周期任务 ", "供应时间:", ns.Start().Format( "Y-M2-D2" ), " 周期任务KEY:", pto.Key(), " ",
|
ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name() );
|
traverse ( pto, DependentDemand, dd, dd.Quantity() > 0 ) {
|
traverse ( dd, Fulfillment, f ) {
|
smp1 := f.Supply_MP();
|
numberOfPlies++;
|
info( "--------------------------------------------------------------" );
|
fulfillmentQuantity := fulfillmentQuantity * ns.ProcessOutput().astype( OperationOutput ).Quantity() *
|
dd.ProcessInput().astype( OperationInput ).Quantity();
|
CapacityAllocationResults::IterativeGeneration3( smp1, numberOfPlies, fulfillmentQuantity );
|
numberOfPlies--;
|
}
|
}
|
}
|
|
PeriodTaskLaneLeg as ptll : {
|
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() );
|
traverse ( targetDependentDemand, Fulfillment, f ) {
|
smp1 := f.Supply_MP();
|
numberOfPlies++;
|
info( "--------------------------------------------------------------" );
|
CapacityAllocationResults::IterativeGeneration3( smp1, numberOfPlies, f.Quantity() );
|
numberOfPlies--;
|
}
|
}
|
}
|
}
|
|
InventorySupply as is : {
|
info( "供应类型(InventorySupply) ", "供应时间:", is.Date().Format( "Y-M2-D2" ), " 供应量:", is.Quantity(),
|
" 实际用量:", fulfillmentQuantity, " ", is.ProductInStockingPoint_MP().Name() );
|
}
|
}
|
*]
|
}
|