public static bool VerificateDataHF(MFCMDataFull currentHeatResult) { var result = false; const double minCarbonPercent = 0.03; const double maxCarbonPercent = 0.1; const double minOxygenVolumeRate = 600; const double maxOxygenVolumeRate = 1400; const double maxHeightLance = 230; const double maxCarbonMonoxideVolumePercent = 30; const double maxCarbonOxideVolumePercent = 30; result = (currentHeatResult.SteelCarbonCalculationPercent != 0) && (currentHeatResult.SteelCarbonPercent > minCarbonPercent) && (currentHeatResult.SteelCarbonPercent < maxCarbonPercent) && (currentHeatResult.OxygenVolumeRate > minOxygenVolumeRate) && (currentHeatResult.OxygenVolumeRate < maxOxygenVolumeRate) && (currentHeatResult.HeightLanceCentimeters <= maxHeightLance) && (currentHeatResult.CarbonMonoxideVolumePercent <= maxCarbonMonoxideVolumePercent) && (currentHeatResult.CarbonOxideVolumePercent <= maxCarbonOxideVolumePercent); return result; }
public static void HardFixData(MFCMDataFull currentHeatResult) { int matrixId = currentHeatResult.MFMEquationId; if (VerificateDataHF(currentHeatResult)) { Program.MatrixStateDataFull[matrixId].MatrixList.RemoveAt(0); Program.MatrixStateDataFull[matrixId].MatrixList.Add(currentHeatResult); } Program.MatrixStateDataFullTotal.Add(currentHeatResult); for (int iD = 0; iD < Program.MatrixStateDataFull[matrixId].MatrixList.Count; iD++) Program.MatrixStateDataFull[matrixId].MatrixList[iD].IdHeat = iD; Program.SaveMatrix(Program.ModelsPathDic[matrixId], Program.Separator, Program.MatrixStateDataFull[matrixId].MatrixList); Program.SaveMatrix(Program.ArchFileName, Program.Separator, Program.MatrixStateDataFullTotal); }
public static void Init() { m_sw = new Stopwatch(); CurrentHeatResult = new MFCMDataFull(); DataCurrentHeat = new HeatData(); DataSmoothCurrent = new HeatDataSmoother(100); m_smoothSecondLancePosition = new RollingAverage(); TotalCarbonMass = 0.0; RemainCarbonMass = 0.0; RemainCarbonPercent = 0.0; m_maxDownLancePosition = 10000; m_lanceSpeed = 0.0; TotalCarbonMassCalculated = false; GasCarbonMassFinished = false; m_dataIsFixed = false; ModelIsStarted = false; }
public static void EnqueueWaitC(MFCMDataFull currentHeatResult) { var numberHeat = currentHeatResult.NumberHeat; if (numberHeat <= 0) return; if (!Program.WaitCarbonDic.ContainsKey(numberHeat)) { currentHeatResult.SteelCarbonPercent = 0; // на всякий обнуляем Program.WaitCarbonDic.Add(numberHeat, currentHeatResult); } else return; }