Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Test ( |
| | | MacroPlan macroplan |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-13-2024 (created) |
| | | traverse( macroplan, Unit, unit, unit.HasCapacityTypeQuantity() and unit.Operation( relsize ) < 2 ){ |
| | | info( '----------------------', unit.ID(), unit.MinCapacity(), unit.MaxCapacity(), unit.Operation( relsize ), unit.UnitPeriod( relsize ) ); |
| | | traverse( unit, UnitPeriod.astype( UnitPeriodQuantity ), upq, upq.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() and upq.Period_MP().Start().Year() = 2020 and upq.Period_MP().Start().Month() = 4 and upq.Period_MP().Start().Day() = 1 ){ |
| | | info( upq.MaxCapacityPerTimeUnit(), upq.MinCapacityPerTimeUnit(), upq.TotalAvailableCapacity(),upq.HasUnitCapacity(), upq.End() ); |
| | | if( upq.HasUnitCapacity() ){ |
| | | uc := upq.UnitCapacity(); |
| | | info( uc.MaxCapacity(), uc.MinCapacity(), uc.Start(), uc.TimeUnit() ); |
| | | } |
| | | } |
| | | // traverse( unit, Operation, operation ){ |
| | | //// info( '----------------------', operation.OperationBOM( relsize ), operation.OperationOutput( relsize ), operation.OperationInput( relsize ) ); |
| | | // traverse( operation, OperationBOM, obom ){ |
| | | // info( '----------------------', obom.OperationID(), '-------------', obom.ProductID(), '-------------', obom.StockingPointID() ); |
| | | // info( '----------------------', obom.Quantity(), obom.OutputQuantity(), obom.InputQuantity() ); |
| | | // info( '----------------------', obom.OperationLinkEdge().OperationOutput().Quantity() ); |
| | | // } |
| | | // } |
| | | } |
| | | *] |
| | | } |
| | |
| | | thermaltrial := 'çå¼'; |
| | | newroutings := construct( Routings ); |
| | | unit := selectobject( routing.MacroPlan(), Unit, unit, unit.ID() = thermaltrial and unit.HasCapacityTypeQuantity() ); |
| | | |
| | | for( starttime := start; starttime <= end; starttime := starttime + 1 ){ |
| | | uc := selectobject( unit, UnitCapacity, uc, uc.Start().Date() = starttime ); |
| | | if( isnull( uc ) ){ |
| | | uc := UnitCapacity::Create( unit, starttime.DateTime(), 'Day', 0.0, [Real]capacity, 100.0, 1, false ); |
| | | } |
| | | uc.MaxCapacity( [Real]capacity ); |
| | | } |
| | | |
| | | newrouting := routing.Copy(); |
| | | name := newrouting.Name().ReplaceAll( 'Copy', thermaltrial ); |
| | | newrouting.Name( name ); |
| | | newrouting.UpdateTypeIndex( name ); |
| | | routing.Start( start ); |
| | | routing.End( end ); |
| | | |
| | | routingstep := newrouting.LastStep(); |
| | | //info( '------------------', routingstep.Tool(), ',', unit.ID() ); |
| | | newroutingstep := RoutingStep::Create( newrouting, thermaltrial, routingstep.Tool(), false ); |
| | |
| | | data := dhDialogData.Data(); |
| | | |
| | | newroutings := Routing::ThermalTrialRatio( data, [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | |
| | | info( '------------web---------------' ); |
| | | traverse( newroutings, Elements, e ){ |
| | | info( e.Key(), e.Name() ); |
| | | } |
| | | ApplicationMacroPlanner.SelectListObjects( dhForm.Data().ListRoutings(), newroutings ); |
| | | |
| | | this.Close(); |
| | |
| | | Title: '设置产åç¬å¡å·¥èºè·¯çº¿' |
| | | ] |
| | | } |
| | | Component MenuTest |
| | | { |
| | | #keys: '[415136.0.789811702]' |
| | | BaseType: 'WebMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 13 |
| | | Title: 'Test' |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: listContextMenuRoutings/MenuTest |
| | | Response OnClick () id:Response_MacroPlanner_listContextMenuRoutings_MenuTest_OnClick |
| | | { |
| | | #keys: '[415136.0.789811732]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebMenu_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | Routing::Test( MacroPlan ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |