| | |
| | | unitIndexTree.Root().AddChild( unitHandle,i ); |
| | | } |
| | | |
| | | // productLines := selectuniquevalues( offlinePlan,NewOfflinePlanRow,row,row.ProductionLine() ); |
| | | productLinesQuantityNameValueTree := NamedValueTree::Create(); |
| | | traverse( offlinePlan,NewOfflinePlanRow,row ){ |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | productLinesQuantityHandle := productLinesQuantityNameValueTree.GetHandle( row.ProductionLine() + cell.NewOfflinePlanColumn().StartDate().AsQUILL() ); |
| | | productLinesQuantity := guard( productLinesQuantityNameValueTree.Root().Child( productLinesQuantityHandle ),null( NamedValue )); |
| | | if( not isnull( productLinesQuantity )){ |
| | | productLinesQuantity.SetValue( productLinesQuantity.GetValueAsReal() + cell.Quantity() ); |
| | | }else{ |
| | | productLinesQuantityNameValueTree.Root().AddChild( productLinesQuantityHandle, cell.Quantity() ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | traverse( offlinePlan,NewOfflinePlanRow,row ){ |
| | | productID := row.ProductID(); |
| | | productLine := row.ProductionLine(); |
| | |
| | | factory := temp2; |
| | | } |
| | | } |
| | | traverse( row,NewOfflinePlanCell,cell ,startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | productLinesQuantityHandle := productLinesQuantityNameValueTree.GetHandle( row.ProductionLine() + cell.NewOfflinePlanColumn().StartDate().AsQUILL() ); |
| | | productLinesQuantity := guard( productLinesQuantityNameValueTree.Root().Child( productLinesQuantityHandle ).GetValueAsReal(),0.0 ); |
| | | |
| | | shiftDate := cell.NewOfflinePlanColumn().StartDate(); |
| | | shiftName := cell.ShiftPatternName(); |
| | | shiftVolume := cell.Quantity(); |
| | |
| | | } |
| | | } |
| | | if( shiftVolume <> 0 ){ |
| | | shiftSchedulingInformations := DispatchShiftSchedulingInformation::SplitShifts( owner,shiftName,shiftVolume ); |
| | | shiftSchedulingInformations := DispatchShiftSchedulingInformation::SplitShifts( owner,shiftName,shiftVolume,productLinesQuantity ); |
| | | |
| | | traverse( shiftSchedulingInformations,Elements,shiftSchedulingInformation ){ |
| | | shiftSchedulingInformation.InterfaceTime( now ); |