Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
| | |
| | | { |
| | | DefaultText: 'The Event type of binding Event exists.' |
| | | } |
| | | InfoMessage MP_Routing_IllegalDateRange |
| | | { |
| | | DefaultText: 'The start date cannot be longer than the end date.' |
| | | } |
| | | InfoMessage MP_Routing_RequiredField |
| | | { |
| | | DefaultText: 'All fields Required This parameter is mandatory.' |
| | |
| | | #parent: #root |
| | | StaticMethod ThermalTrialRatio ( |
| | | Routing routing, |
| | | Unit unit, |
| | | Number capacity, |
| | | Date start, |
| | | Date end, |
| | |
| | | TextBody: |
| | | [* |
| | | // Adhi Feb-10-2016 (created) |
| | | thermaltrial := 'çå¼'; |
| | | thermaltrial := Unit::GetThermalTrial(); |
| | | 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 ); |
| | | uc.MaxCapacity( [Real]capacity * ratio ); |
| | | } |
| | | |
| | | newrouting := routing.Copy(); |
| | |
| | | #parent: #root |
| | | StaticMethod ValidateThermalTrialRatio ( |
| | | output String feedback_o, |
| | | Routing routing, |
| | | Unit unit, |
| | | Number capacity, |
| | | Date start, |
| | | Date end, |
| | |
| | | // Adhi Feb-10-2016 (created) |
| | | feedback_o := ''; |
| | | |
| | | if( isnull( routing ) or capacity < 1 or start = Date::MinDate() or end = Date::MinDate() or ratio < 1 ){ |
| | | if( isnull( unit ) or capacity < 1 or start = Date::MinDate() or end = Date::MinDate() or ratio < 1 ){ |
| | | feedback_o := Translations::MP_Routing_RequiredField(); |
| | | } |
| | | |
| | | if( start > end ){ |
| | | feedback_o := Translations::MP_Routing_IllegalDateRange(); |
| | | } |
| | | |
| | | return feedback_o = ''; |
| | | *] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetThermalTrial () const declarative as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-14-2024 (created) |
| | | return 'çå¼'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxCapacityPerTimeUnit #extension |
| | | { |
| | | TextBody: |
| | | [* |
| | | value := ifexpr( this.HasUnitCapacity(), this.UnitCapacity().MaxCapacity(), this.MacroPlan().GlobalParameters_MP().DefaultMaxCapacityPerDayForUnit() ); |
| | | |
| | | if( this.Unit().Name().FindString( Unit::GetThermalTrial(), 0 ) >= 0 ){ |
| | | value := ifexpr( this.HasUnitCapacity() and this.Unit().Name().FindString( 'åæ¹éçå¼', 0 ) >= 0 and this.UnitCapacity().Start() = this.Start(), this.UnitCapacity().MaxCapacity(), this.MacroPlan().GlobalParameters_MP().DefaultMaxCapacityPerDayForUnit() ); |
| | | } |
| | | this.MaxCapacityPerTimeUnit( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization UnitPeriodQuantity #extension |
| | | { |
| | | } |
| | |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ddlRouting |
| | | Component ddlUnit |
| | | { |
| | | #keys: '[415136.0.756140276]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'Routing' |
| | | Databinding: 'Unit' |
| | | Children: |
| | | [ |
| | | Component DataExtractorRouting |
| | | Component DataExtractorUnit |
| | | { |
| | | #keys: '[415136.0.756140277]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'structured[Routing]' |
| | | Source: 'dhRoutingSelection' |
| | | DataType: 'structured[Unit]' |
| | | Source: 'dhUnitSelection' |
| | | Taborder: 0 |
| | | Transformation: 'Elements' |
| | | ] |
| | |
| | | Properties: |
| | | [ |
| | | AllowEmpty: true |
| | | DataBinding: 'dhDialogData.Data' |
| | | DisplayField: 'Name' |
| | | FixedSize: false |
| | | Label: 'Routing' |
| | | Label: 'Unit' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dhRoutingSelection |
| | | Component dhUnitSelection |
| | | { |
| | | #keys: '[415136.0.756140424]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[Routing]*' |
| | | Databinding: 'structured[Unit]*' |
| | | Properties: |
| | | [ |
| | | MergeStyle: 'Union' |
| | |
| | | |
| | | data := dhDialogData.Data(); |
| | | |
| | | newroutings := Routing::ThermalTrialRatio( data, [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | newroutings := Routing::ThermalTrialRatio( data, ddlUnit.Data(), [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | info( '------------web---------------' ); |
| | | traverse( newroutings, Elements, e ){ |
| | | info( e.Key(), e.Name() ); |
| | |
| | | [* |
| | | // Set default + init dialog |
| | | |
| | | routings := selectset( MacroPlan, Routing, routing , true ); |
| | | units := selectset( MacroPlan, Unit, unit , unit.HasCapacityTypeQuantity() and unit.Name().FindString( Unit::GetThermalTrial(), 0 ) >= 0 ); |
| | | |
| | | dhRoutingSelection.Data( routings.Copy() ); |
| | | dhUnitSelection.Data( units.Copy() ); |
| | | *] |
| | | } |
| | |
| | | GroupServerCalls: true |
| | | Precondition: |
| | | [* |
| | | return Routing::ValidateThermalTrialRatio( feedback, ddlRouting.Data(), [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | return Routing::ValidateThermalTrialRatio( feedback, ddlUnit.Data(), [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | *] |
| | | QuillAction |
| | | { |