public IIntegralData GetIntegralData(DateTime upToTime) { if (upToTime < SetupTime) { throw new Exception("Setup (setup time = " + SetupTime.ToString("yyyy.MM.dd-HH:mm") + ") time is bigger than upToTime (upToTime = " + upToTime.ToString("yyyy.MM.dd-HH:mm") + ")"); } var upToTimeRecords = _storageObjectInfo.FileRecords.Where(kvp => kvp.Key <= upToTime && kvp.Key >= SetupTime) .Select(kvp => kvp.Value).ToList(); var recordsCount = upToTimeRecords.Count; var supposedRecordsCount = (int)((upToTime - SetupTime).TotalMinutes / 30.0) + 1; if (recordsCount != supposedRecordsCount) { throw new Exception("records count (recordsCount=" + recordsCount + ") is differ from supposed count (supposed " + supposedRecordsCount + " record(s))"); } var correctRecordsCount = upToTimeRecords.Count(r => r.IsRecordCorrect); var incorrectRecordsCount = recordsCount - correctRecordsCount; var impulsesCount1 = upToTimeRecords.Sum(r => r.PulseCount1); var impulsesCount2 = upToTimeRecords.Sum(r => r.PulseCount2); var impulsesCount3 = upToTimeRecords.Sum(r => r.PulseCount3); return(new IntegralData(impulsesCount1, impulsesCount2, impulsesCount3, recordsCount, correctRecordsCount , incorrectRecordsCount, supposedRecordsCount)); }
/// <summary> /// Clear all statistics /// </summary> public override void Reset() { SetupTime.Reset(); ExecutionTime.Reset(); UnsetupTime.Reset(); BehaviorCreationTime.Reset(); }
/// <summary> /// Clear all statistics /// </summary> public void Reset() { SetupTime.Reset(); ValidationTime.Reset(); ExecutionTime.Reset(); FinishTime.Reset(); BehaviorCreationTime.Reset(); }
private void SetupTime_Tick(object sender, EventArgs e) { FilesSetup.Value = FilesSetup.Value + 2; if (FilesSetup.Value == FilesSetup.Maximum) { SetupTime.Stop(); ModulesTime.Start(); } }
private static bool IsMatch_Base(this SetupTime item, SetupInfo info) { if (item.HasChangeType(ChangeType.P)) { if (info.FromProductID != info.ToProductID) { return(true); } } if (item.HasChangeType(ChangeType.O)) { if (info.FromStepID != info.ToStepID) { return(true); } } if (item.HasChangeType(ChangeType.B)) { if (info.FromProductVersion != info.ToProductVersion) { return(true); } } if (item.HasChangeType(ChangeType.PRODUCT_VERSION)) { if (info.FromProductVersion != info.ToProductVersion) { return(true); } } if (item.HasChangeType(ChangeType.OWNER_TYPE)) { if (info.FromOwnerType != info.ToOwnerType) { return(true); } } if (item.HasChangeType(ChangeType.OWNER_ID)) { if (info.FromOwnerID != info.ToOwnerID) { return(true); } } return(false); }
public static bool HasChangeType(this SetupTime item, ChangeType ctype) { if (item == null) { return(false); } var list = item.ChangeTypeList; if (list == null || list.Count == 0) { return(false); } if (list.Contains(ctype)) { return(true); } return(false); }
public string FormatforQAD() { const char MFLD = '\u0001'; string mstr = RoutingCode + "\v" + "S" + MFLD; mstr = mstr + Operation.ToString() + "\v" + "I" + MFLD; mstr = mstr + StartDate.ToString() + "\v" + "D" + MFLD; mstr = mstr + EndDate.ToString() + "\v" + "D" + MFLD; mstr = mstr + StandOp + "\v" + "S" + MFLD; mstr = mstr + WorkCenter + "\v" + "S" + MFLD; mstr = mstr + Machine + "\v" + "S" + MFLD; mstr = mstr + Description + "\v" + "S" + MFLD; mstr = mstr + MachPerOp.ToString() + "\v" + "I" + MFLD; mstr = mstr + OverlapUnits.ToString() + "\v" + "I" + MFLD; mstr = mstr + QueueTime.ToString() + "\v" + "G" + MFLD; mstr = mstr + WaitTime.ToString() + "\v" + "G" + MFLD; mstr = mstr + "yes" + "\v" + "L" + MFLD; mstr = mstr + SubcontractLT.ToString() + "\v" + "I" + MFLD; mstr = mstr + SetupCrew.ToString() + "\v" + "G" + MFLD; mstr = mstr + RunCrew.ToString() + "\v" + "G" + MFLD; mstr = mstr + SetupTime.ToString() + "\v" + "G" + MFLD; mstr = mstr + RunTime.ToString() + "\v" + "F" + MFLD; mstr = mstr + MoveTime.ToString() + "\v" + "G" + MFLD; mstr = mstr + YieldPerc.ToString("000") + "\v" + "E" + MFLD; mstr = mstr + ToolCode + "\v" + "S" + MFLD; mstr = mstr + Supplier + "\v" + "S" + MFLD; mstr = mstr + InvValue.ToString() + "\v" + "G" + MFLD; mstr = mstr + SubCost.ToString() + "\v" + "G" + MFLD; mstr = mstr + Comments + "\v" + "X" + MFLD; mstr = mstr + WIP + "\v" + "S" + MFLD; mstr = mstr + PurchaseOrder + "\v" + "S" + MFLD; mstr = mstr + Line.ToString() + "\v" + "I" + MFLD; mstr = mstr + "yes" + "\v" + "L" + MFLD; mstr = mstr + "no" + "\v" + "L" + MFLD; mstr = mstr + OrigStartDate.ToString() + "\v" + "D" + MFLD; mstr = mstr + '\u0014'; return(mstr); }
public Process() { InitializeComponent(); SetupTime.Start(); }
//private static bool CheckLastPlan(FabAoEquipment eqp, string shopID, string stepID, string productID, string prodVer, string ownerType, string ownerID) //{ // if (AcidMaster.IsNeedChangeAcid(eqp, stepID, productID)) // return false; // if (eqp.IsParallelChamber) // { // //Equipment → ProcessControl → GetNeedSetupChamber // List<FabSubEqp> needSetupChambers = ChamberMaster.GetNeedSetupChamberList(eqp.SubEqps.ToList(), shopID, stepID, productID, prodVer, ownerType, ownerID); // if (needSetupChambers.Count == 0) // return true; // } // if (eqp.IsLastPlan(shopID, stepID, productID, prodVer, ownerType, ownerID)) // return true; // return false; //} private static bool IsMatch(this SetupTime item, SetupInfo info) { //if(info.EqpID == "THPHL100" && info.ToProductID == "TH645A3AB100") // Console.WriteLine("B"); if (item.IsMatch_Base(info) == false) { return(false); } if (item.IsEqpAll == false) { if (LcdHelper.Equals(item.EqpID, info.EqpID) == false) { return(false); } } if (item.HasChangeType(ChangeType.P)) { if (IsMatch(item.FromProductID, item.ToProductID, info.FromProductID, info.ToProductID) == false) { return(false); } } if (item.HasChangeType(ChangeType.O)) { if (IsMatch(item.FromStepID, item.ToStepID, info.FromStepID, info.ToStepID) == false) { return(false); } } if (item.HasChangeType(ChangeType.B)) { if (IsMatch(item.FromProductVersion, item.ToProductVersion, info.FromProductVersion, info.ToProductVersion) == false) { return(false); } } if (item.HasChangeType(ChangeType.PRODUCT_VERSION)) { if (IsMatch(item.FromEtc, item.ToEtc, info.FromProductVersion, info.ToProductVersion) == false) { return(false); } } if (item.HasChangeType(ChangeType.OWNER_TYPE)) { if (IsMatch(item.FromEtc, item.ToEtc, info.FromOwnerType, info.ToOwnerType) == false) { return(false); } } if (item.HasChangeType(ChangeType.OWNER_ID)) { if (IsMatch(item.FromEtc, item.ToEtc, info.FromOwnerID, info.ToOwnerID) == false) { return(false); } } return(true); }
public override string ToString() { var sb = new StringBuilder("PaidCallHistory("); bool __first = true; if (__isset.seq) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Seq: "); Seq.ToString(sb); } if (__isset.type) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Type: "); Type.ToString(sb); } if (DialedNumber != null && __isset.dialedNumber) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DialedNumber: "); DialedNumber.ToString(sb); } if (CalledNumber != null && __isset.calledNumber) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CalledNumber: "); CalledNumber.ToString(sb); } if (ToMid != null && __isset.toMid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ToMid: "); ToMid.ToString(sb); } if (ToName != null && __isset.toName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ToName: "); ToName.ToString(sb); } if (__isset.setupTime) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("SetupTime: "); SetupTime.ToString(sb); } if (__isset.startTime) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StartTime: "); StartTime.ToString(sb); } if (__isset.endTime) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("EndTime: "); EndTime.ToString(sb); } if (__isset.duration) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Duration: "); Duration.ToString(sb); } if (__isset.terminate) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Terminate: "); Terminate.ToString(sb); } if (__isset.productType) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ProductType: "); ProductType.ToString(sb); } if (__isset.charge) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Charge: "); Charge.ToString(sb); } if (Unit != null && __isset.unit) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Unit: "); Unit.ToString(sb); } if (Result != null && __isset.result) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Result: "); Result.ToString(sb); } sb.Append(")"); return(sb.ToString()); }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.seq) { hashcode = (hashcode * 397) + Seq.GetHashCode(); } if (__isset.type) { hashcode = (hashcode * 397) + Type.GetHashCode(); } if (__isset.dialedNumber) { hashcode = (hashcode * 397) + DialedNumber.GetHashCode(); } if (__isset.calledNumber) { hashcode = (hashcode * 397) + CalledNumber.GetHashCode(); } if (__isset.toMid) { hashcode = (hashcode * 397) + ToMid.GetHashCode(); } if (__isset.toName) { hashcode = (hashcode * 397) + ToName.GetHashCode(); } if (__isset.setupTime) { hashcode = (hashcode * 397) + SetupTime.GetHashCode(); } if (__isset.startTime) { hashcode = (hashcode * 397) + StartTime.GetHashCode(); } if (__isset.endTime) { hashcode = (hashcode * 397) + EndTime.GetHashCode(); } if (__isset.duration) { hashcode = (hashcode * 397) + Duration.GetHashCode(); } if (__isset.terminate) { hashcode = (hashcode * 397) + Terminate.GetHashCode(); } if (__isset.productType) { hashcode = (hashcode * 397) + ProductType.GetHashCode(); } if (__isset.charge) { hashcode = (hashcode * 397) + Charge.GetHashCode(); } if (__isset.unit) { hashcode = (hashcode * 397) + Unit.GetHashCode(); } if (__isset.result) { hashcode = (hashcode * 397) + Result.GetHashCode(); } } return(hashcode); }