Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute InterfaceTime |
| | | { |
| | | #keys: '3[415754.0.175798548][415754.0.175798547][415754.0.175798549]' |
| | | Description: 'æ¥å£æ¨éæ¶é´' |
| | | ValueType: DateTime |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute VersionFlag |
| | | { |
| | | #keys: '3[415754.0.176284753][415754.0.176284752][415754.0.176284754]' |
| | | Description: |
| | | [* |
| | | 1ï¼åå¸çæ¬ |
| | | 0ï¼æ±æ¥çæ¬ |
| | | *] |
| | | ValueType: Number |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | MacroPlan macroPlan, |
| | | InterfaceDataset interfaceDataset |
| | | InterfaceDataset interfaceDataset, |
| | | Number versionFlag |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | interfaceDataset.InterfaceProductionSchedulingPlanPush( relflush ); |
| | | ipspps := selectset( interfaceDataset, InterfaceProductionSchedulingPlanPush, tempIPSPP, tempIPSPP.VersionFlag() = versionFlag ); |
| | | MacroPlan::DeleteObjects( ipspps ); |
| | | |
| | | actualDateTime := DateTime::ActualTime(); |
| | | |
| | | traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() and ( pispmp.StockingPointID() = "DL-MoMo" or pispmp.StockingPointID() = "CC-MoMo" ) ) { |
| | | info( pispmp.Name() ); |
| | |
| | | PlanningQty := [Number]pispippl.NewSupplyQuantity(), |
| | | VersionName := macroPlan.ScenarioName(), |
| | | FactoryName := ifexpr( pispmp.StockingPointID().Regex( "大è¿" ) or pispmp.StockingPointID().Regex( "DL" ), "大è¿å·¥å", "é¿æ¥å·¥å" ), |
| | | Fac := ifexpr( pispmp.StockingPointID().Regex( "大è¿" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" ) |
| | | Fac := ifexpr( pispmp.StockingPointID().Regex( "大è¿" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" ), |
| | | InterfaceTime := actualDateTime, |
| | | VersionFlag := versionFlag |
| | | ); |
| | | } |
| | | } |
| | |
| | | oprQuantity := select( opt, OfflinePlanRow, tempOPR, tempOPR.ProductionLine() = u.ID() and tempOPR.ProductID() = ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID() and tempOPR.Type() = "1" ); |
| | | oprOrder := select( opt, OfflinePlanRow, tempOPR, tempOPR.ProductionLine() = u.ID() and tempOPR.ProductID() = ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID() and tempOPR.Type() = "2" ); |
| | | if ( isnull( oprQuantity ) and isnull( oprOrder ) ) { |
| | | oprQuantity := opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID(), Type := "1" ); |
| | | oprQuantity := opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID(), Type := "1", Notes := ns.AsProductionSupply().ProductInStockingPoint_MP().Product_MP().Notes() ); |
| | | oprOrder := opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID(), Type := "2" ); |
| | | } |
| | | |
| | |
| | | productLineCell := productOPC.OfflinePlanCell( relnew, Value := opr.ProductionLine() ); |
| | | productLineCell.OfflinePlanRow( relset, opr ); |
| | | } else if( opr.Type() = "1" ) { |
| | | productCell := productOPC.OfflinePlanCell( relnew, Value := opr.ProductID() ); |
| | | productCell := productOPC.OfflinePlanCell( relnew, Value := opr.ProductID() + ifexpr( opr.Notes() = "", "", "-" + opr.Notes() ) ); |
| | | productCell.OfflinePlanRow( relset, opr ); |
| | | typeCell := typeOPC.OfflinePlanCell( relnew, Value := "Quantity" ); |
| | | typeCell.OfflinePlanRow( relset, opr ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Notes |
| | | { |
| | | #keys: '3[415754.0.180041713][415754.0.180041712][415754.0.180041714]' |
| | | ValueType: String |
| | | } |
| | |
| | | // } |
| | | // debuginfo( "ãããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããã" ); |
| | | //} |
| | | |
| | | sourceChangeover := uptb.ChangeoverDuration(); |
| | | targetChangeover := Duration::Zero(); |
| | | |
| | | debuginfo( "éè¦åæ´çæ¶é´ï¼åä½ï¼å°æ¶ï¼", timeDifference, " èèChangeOveræ¡ä»¶åæ´ä½¿å
¶è¾¾å°æ´ç" ); |
| | | nextUnitPeriodTimeBase := ifexpr( isnull( uptb.Next().astype( UnitPeriodTimeBase ) ), select( uptbs, Elements, tempUPTB, tempUPTB.Start() = uptb.End() ), uptb.Next().astype( UnitPeriodTimeBase ) ); |
| | | while ( timeDifference > 0 and not isnull( nextUnitPeriodTimeBase ) ) { |
| | | debuginfo( "å¼å§åæ¶é´ä¸ºï¼", nextUnitPeriodTimeBase.StartDate().Format( "Y-M2-D2" ), "ç产è½å¨æå" ); |
| | | traverse ( nextUnitPeriodTimeBase, PeriodTaskOperation, pto, guard( pto.Operation().RoutingStep().Routing().Start(), uptb.StartDate() ) <= uptb.StartDate() and |
| | | guard( pto.Operation().RoutingStep().Routing().End(), uptb.End().Date() ) >= uptb.End().Date() and |
| | | exists( uptb, PeriodTaskOperation.Operation, tempO, tempO = pto.Operation() ) and |
| | | timeDifference > 0 ) { |
| | | minimumCapacityThatCanBeBorrowed := pto.Quantity() / pto.Operation().Throughput(); |
| | | unifiedProcessingTimeOfRounding := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed ); |
| | | debuginfo( "å©ä½åæ´ç产è½ï¼", timeDifference, " nextUnitPeriodTimeBaseçå½å卿任å¡ä¾åºæ°éï¼", pto.Quantity(), " è½åç产è½ï¼", minimumCapacityThatCanBeBorrowed, " ç»ä¸åç产è½ï¼", unifiedProcessingTimeOfRounding, " åä¹åchangeoveræ¶é´ï¼", uptb.ChangeoverDuration() ); |
| | | this.UnifiedProcessingOfRoundingLogic( unifiedProcessingTimeOfRounding, uptb, pto, macroPlan ); |
| | | targetChangeover := uptb.ChangeoverDuration(); |
| | | timeDifference := timeDifference - unifiedProcessingTimeOfRounding; |
| | | } |
| | | |
| | | if ( isnull( nextUnitPeriodTimeBase.Next() ) ) { |
| | | nextUnitPeriodTimeBase := select( uptbs, Elements, tempUPTB, tempUPTB.Start() = nextUnitPeriodTimeBase.End() ); |
| | | } else { |
| | | nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase ); |
| | | } |
| | | } |
| | | |
| | | debuginfo( "ä¸èè任使¡ä»¶åæ´ä½¿å
¶å°è¾¾æ´ç" ); |
| | | debuginfo( "éè¦åæ´çæ¶é´ï¼åä½ï¼å°æ¶ï¼", timeDifference, " ä¸èè任使¡ä»¶åæ´ä½¿å
¶å°è¾¾æ´ç" ); |
| | | nextUnitPeriodTimeBase := ifexpr( isnull( uptb.Next().astype( UnitPeriodTimeBase ) ), select( uptbs, Elements, tempUPTB, tempUPTB.Start() = uptb.End() ), uptb.Next().astype( UnitPeriodTimeBase ) ); |
| | | while ( timeDifference > 0 and not isnull( nextUnitPeriodTimeBase ) ) { |
| | | debuginfo( "å¼å§åæ¶é´ä¸ºï¼", nextUnitPeriodTimeBase.StartDate().Format( "Y-M2-D2" ), "ç产è½å¨æå" ); |
| | |
| | | timeDifference > 0 ) { |
| | | minimumCapacityThatCanBeBorrowed := pto.Quantity() / pto.Operation().Throughput(); |
| | | unifiedProcessingTimeOfRounding := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed ); |
| | | debuginfo( "å©ä½åæ´ç产è½ï¼", timeDifference, " nextUnitPeriodTimeBaseçå½å卿任å¡ä¾åºæ°éï¼", pto.Quantity(), " è½åç产è½ï¼", minimumCapacityThatCanBeBorrowed, " ç»ä¸åç产è½ï¼", unifiedProcessingTimeOfRounding ); |
| | | debuginfo( "å©ä½åæ´ç产è½ï¼", timeDifference, " nextUnitPeriodTimeBaseçå½å卿任å¡ä¾åºæ°éï¼", pto.Quantity(), " è½åç产è½ï¼", minimumCapacityThatCanBeBorrowed, " ç»ä¸åç产è½ï¼", unifiedProcessingTimeOfRounding, " å½åchangeoveræ¶é´ï¼", uptb.ChangeoverDuration().HoursAsReal() ); |
| | | this.UnifiedProcessingOfRoundingLogic( unifiedProcessingTimeOfRounding, uptb, pto, macroPlan ); |
| | | timeDifference := timeDifference - unifiedProcessingTimeOfRounding; |
| | | } |
| | |
| | | nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase ); |
| | | } |
| | | } |
| | | |
| | | if ( ( targetChangeover - sourceChangeover ).HoursAsReal() > 0.0 ) { |
| | | this.ZeroCapacityReplenishment( macroPlan, ( targetChangeover - sourceChangeover ).HoursAsReal(), uptb, uptbs ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( uptbs, Elements, uptb, true/*uptb.StartDate() <= Date::Construct( 2024, 4, 23 )*/ ) { |
| | | traverse ( uptbs, Elements, uptb, |
| | | true |
| | | // uptb.StartDate() <= Date::Construct( 2024, 5, 8 ) |
| | | ) { |
| | | if ( ( uptb.End().Date() - uptb.StartDate() ) > 1 ) { |
| | | // debuginfo( "å¼å§æ¶é´ï¼", uptb.StartDate().Format( "Y-M2-D2" ), " ç»ææ¶é´ï¼", uptb.End().Date().Format( "Y-M2-D2" ), " æ¶é´åºé´ï¼", ( uptb.End().Date() - uptb.StartDate() ) ); |
| | | // this.ProcessingTimeIntervalIsGreaterThanOneDay( macroPlan, uptb, uptbs ); |
| | |
| | | [* |
| | | traverse ( unit, Lane.LaneLeg.Trip, t ) { |
| | | traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 ) { |
| | | info( pit.Product_MP().ParentID() ); |
| | | // è·å产ålotsizeåæ° |
| | | lotsize := 1; |
| | | if ( pit.Product_MP().ParentID().Regex( "缸ä½" ) ) { |
| | | if ( pit.Product_MP().ParentID().Regex( "ZKG" ) ) { |
| | | lotsize := macroPlan.CylinderBlock(); |
| | | } else if ( pit.Product_MP().ParentID().Regex( "缸ç" ) ) { |
| | | } else if ( pit.Product_MP().ParentID().Regex( "ZKM" ) ) { |
| | | lotsize := macroPlan.CylinderHead(); |
| | | } else if ( pit.Product_MP().ParentID().Regex( "è¿æ" ) ) { |
| | | } else if ( pit.Product_MP().ParentID().Regex( "PL" ) ) { |
| | | lotsize := macroPlan.ConnectingRod(); |
| | | } else if ( pit.Product_MP().ParentID().Regex( "æ²è½´" ) ) { |
| | | } else if ( pit.Product_MP().ParentID().Regex( "KW" ) ) { |
| | | lotsize := macroPlan.Crankshaft(); |
| | | } else if ( pit.Product_MP().ParentID().Regex( "æ²è½´" ) ) { |
| | | } else if ( pit.Product_MP().ParentID().Regex( "AGW" ) ) { |
| | | lotsize := macroPlan.BalanceAxis(); |
| | | } |
| | | |
| | |
| | | Description: 'å¤çæ¶é´åºé´çäº1天' |
| | | TextBody: |
| | | [* |
| | | if ( uptb.UsedCapacity() = uptb.TotalAvailableCapacity() or ( uptb.UtilizationPercentage() * uptb.MaximumLoadPercentage() / 100 ) = 100 or uptb.FreeCapacity().HoursAsReal() = 0 ) { |
| | | if ( uptb.UsedCapacity() = uptb.TotalAvailableCapacity() or [Number]( uptb.UtilizationPercentage() * uptb.MaximumLoadPercentage() / 100 ) = 100 or uptb.FreeCapacity().HoursAsReal() = 0 ) { |
| | | debuginfo( "å¤©å·²ç»æ¯æ´çï¼æ éå¤çï¼ä½¿ç¨äº§è½çäºå¯ç¨äº§è½ï¼" ); |
| | | } else if ( uptb.UsedCapacity().HoursAsReal() = 0 ) { |
| | | debuginfo( "å¤©å·²ç»æ¯æ´çï¼æ éå¤çï¼ä½¿ç¨äº§è½çäº0ï¼" ); |
| | |
| | | } |
| | | debuginfo( ".........." ); |
| | | } |
| | | // whetherToFillInZero := false; |
| | | whetherToFillInZero := false; |
| | | if ( whetherToFillInZero ) { |
| | | debuginfo( "æ§è¡è¡¥é¶" ); |
| | | debuginfo( "å¼å§æ§è¡è¡¥é¶------------" ); |
| | | this.ZeroCapacityReplenishment( macroPlan, uptb.UsedCapacity().HoursAsReal(), uptb, uptbs ); |
| | | } else { |
| | | debuginfo( "æ§è¡åæ´" ); |
| | | debuginfo( "å¼å§æ§è¡åæ´------------" ); |
| | | this.CapacityRounding( macroPlan, uptb.TotalAvailableCapacity().HoursAsReal() - ( uptb.UsedCapacity() + uptb.ChangeoverDuration() ).HoursAsReal(), uptb, uptbs ); |
| | | } |
| | | } else { |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | InterfaceProductionSchedulingPlanPush::GenerateData( MacroPlan, InterfaceDataset ); |
| | | InterfaceProductionSchedulingPlanPush::GenerateData( MacroPlan, InterfaceDataset, Number::Random( 0, 1 ) ); |
| | | |
| | | WebMessageBox::Success( "æ¨éæåï¼" ); |
| | | *] |