| | |
| | | } |
| | | |
| | | |
| | | //shiftPatternCount := NamedValueTree::Create(); |
| | | traverse( tables,Elements.MP_Row,row ){ |
| | | rowMacroPlan := row.MP_Table().MacroPlan(); |
| | | localRow := null( LocalRow ); |
| | |
| | | } |
| | | } |
| | | |
| | | maxShiftPattern := ""; |
| | | maxShiftPatternCount := 0; |
| | | |
| | | workingDay := 0; |
| | | capacity := 0.0; |
| | | |
| | | shiftPatterns := construct( Strings ); |
| | | traverse( cells,Elements,cell ){ |
| | | workingDay := workingDay + cell.WorkingDay(); |
| | | capacity := capacity + cell.Capacity(); |
| | | |
| | | if( maxShiftPattern <> cell.ShiftPattern() ){ |
| | | if( maxShiftPatternCount = 0 ){ |
| | | maxShiftPattern := cell.ShiftPattern(); |
| | | maxShiftPatternCount ++; |
| | | }else{ |
| | | maxShiftPatternCount --; |
| | | } |
| | | }else{ |
| | | maxShiftPatternCount ++; |
| | | if( cell.ShiftPattern() <> "" ){ |
| | | shiftPatterns.Add( cell.ShiftPattern() ); |
| | | } |
| | | } |
| | | localCell := null( LocalCell_ScheduleSummary ); |
| | |
| | | } |
| | | } |
| | | |
| | | if( not maxShiftPattern = "" ){ |
| | | localCell.ShiftPattern( maxShiftPattern ); |
| | | } |
| | | localCell.ShiftPattern( selectuniquevalues( shiftPatterns,Elements,element,element ).Concatenate( "/" ) ); |
| | | localCell.WorkingDay( localCell.WorkingDay() + workingDay ); |
| | | localCell.Capacity( localCell.Capacity() + capacity ); |
| | | localCell.Output( localCell.Output() + output ); |