| | |
| | | table.Delete(); |
| | | } |
| | | |
| | | zeroDuration := Duration::Construct( 0,0,0,0 ); |
| | | |
| | | table := owner.MP_Table( relnew,Name := MP_Cell_ScheduleSummary::GetTableName()); |
| | | |
| | | startDate := owner.StartOfPlanning().Date(); |
| | | |
| | | endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate(); |
| | | |
| | | columns := construct( MP_Columns ); |
| | |
| | | columnHandle := columnIndexTree.GetHandle( unitPeriodTime.Period_MP().StartDate().AsQUILL() ); |
| | | columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue )); |
| | | if( not isnull( columnIndex )){ |
| | | |
| | | // 当arrowedAvailableCapacity不为0,工作日 + 1 |
| | | arrowedAvailableCapacity := unitPeriodTime.TotalAvailableCapacity(); |
| | | zeroDuration := Duration::Construct( 0,0,0,0 ); |
| | | workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 ); |
| | | |
| | | if( workDay = 0 ){ |
| | | workDay := ifexpr( unitPeriodTime.ShiftPlan().Outcome() <> "",1,0 ); |
| | | } |
| | | |
| | | column := columns.Element( columnIndex.GetValueAsNumber() ); |
| | | |
| | |
| | | workHours := select( unitPeriodTime,ShiftPattern.ShiftDay,shifDay,shifDay.Day_MP().ID() = dayOfWeek ); |
| | | capacity := 0.0; |
| | | |
| | | workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 ); |
| | | |
| | | if( not isnull( workHours )){ |
| | | capacity := workDay * throughput * workHours.Capacity().HoursAsReal() |
| | | } |