def getConfidenceInterval(self, value_list, confidenceLevel): from dream.KnowledgeExtraction.ConfidenceIntervals import ConfidenceIntervals from dream.KnowledgeExtraction.StatisticalMeasures import StatisticalMeasures BSM = StatisticalMeasures() lb, ub = ConfidenceIntervals().ConfidIntervals(value_list, confidenceLevel) return {'lb': lb, 'ub': ub, 'avg': BSM.mean(value_list)}
def getConfidenceInterval(self, value_list, confidenceLevel): from dream.KnowledgeExtraction.ConfidenceIntervals import ConfidenceIntervals from dream.KnowledgeExtraction.StatisticalMeasures import StatisticalMeasures BSM = StatisticalMeasures() lb, ub = ConfidenceIntervals().ConfidIntervals(value_list, confidenceLevel) return {"lb": lb, "ub": ub, "avg": BSM.mean(value_list)}
MA_Proc= C.DeleteOutliers(MA_Proc) M1A_Proc= C.DeleteOutliers(M1A_Proc) M1B_Proc= C.DeleteOutliers(M1B_Proc) M2A_Proc= C.DeleteOutliers(M2A_Proc) M2B_Proc= C.DeleteOutliers(M2B_Proc) M3A_Proc= C.DeleteOutliers(M3A_Proc) M3B_Proc= C.DeleteOutliers(M3B_Proc) MM_Proc= C.DeleteOutliers(MM_Proc) PrA_Proc= C.DeleteOutliers(PrA_Proc) PrB_Proc= C.DeleteOutliers(PrB_Proc) PaA_Proc= C.DeleteOutliers(PaA_Proc) PaB_Proc= C.DeleteOutliers(PaB_Proc) #Call the BasicStatisticalMeasures object and calculate the mean value of the processing times for each station E= StatisticalMeasures() meanMA_Proc= E.mean(MA_Proc) meanM1A_Proc= E.mean(M1A_Proc) meanM2A_Proc= E.mean(M2A_Proc) meanM3A_Proc= E.mean(M3A_Proc) meanM1B_Proc= E.mean(M1B_Proc) meanM2B_Proc= E.mean(M2B_Proc) meanM3B_Proc= E.mean(M3B_Proc) meanMM_Proc= E.mean(MM_Proc) meanPrA_Proc= E.mean(PrA_Proc) meanPrB_Proc= E.mean(PrB_Proc) meanPaA_Proc= E.mean(PaA_Proc) meanPaB_Proc= E.mean(PaB_Proc) stopTime= datetime.datetime(2014,3,27,8,40,00) #Give the stop time, based on this the WIP levels in the assembly line are identified calling the WIP method WIP=currentWIP(processStory, stopTime) #Call the currentWIP method, giving as attributes the processStory dict and the stopTime #With the loop statement in the outcome of the currentWIP method, which is a dictionary with the name WIP, with a series of calculations the units to be processed are calculated by the WIP batches in the stations
P1_Scrap= B.ReplaceWithZero(P1_Scrap) P2_Scrap= B.ReplaceWithZero(P2_Scrap) P3_Scrap= B.ReplaceWithZero(P3_Scrap) P4_Scrap= B.ReplaceWithZero(P4_Scrap) P5_Scrap= B.ReplaceWithZero(P5_Scrap) P6_Scrap= B.ReplaceWithZero(P6_Scrap) P7_Scrap= B.ReplaceWithZero(P7_Scrap) P8_Scrap= B.ReplaceWithZero(P8_Scrap) P9_Scrap= B.ReplaceWithZero(P9_Scrap) P10_Scrap= B.ReplaceWithZero(P10_Scrap) P11_Scrap= B.ReplaceWithZero(P11_Scrap) # #Call the BasicSatatisticalMeasures object C=StatisticalMeasures() #Create a list with values the calculated mean value of scrap quantity on the different stations in the line listScrap=[C.mean(P1_Scrap),C.mean(P2_Scrap),C.mean(P3_Scrap),C.mean(P4_Scrap),C.mean(P5_Scrap),C.mean(P6_Scrap),C.mean(P7_Scrap),C.mean(P8_Scrap),C.mean(P9_Scrap),C.mean(P10_Scrap), C.mean(P11_Scrap)] D= DataManipulation() listScrap=D.round(listScrap) #Round the mean values of the list so as to get integers dictScrap={} dictScrap['P1']= listScrap[0] dictScrap['P2']= listScrap[1] dictScrap['P3']= listScrap[2] dictScrap['P4']= listScrap[3] dictScrap['P5']= listScrap[4] dictScrap['P6']= listScrap[5] dictScrap['P7']= listScrap[6] dictScrap['P8']= listScrap[7] dictScrap['P9']= listScrap[8]