public static QuFuBase GetQuFuModule(String qufuType) { QuFuBase qf = null; switch (qufuType) { case "通用": qf = new CommonQuFu(); break; case "新通用": qf = new NewCommonQuFu(); break; case "OKEQF": qf = new OKEQF(); break; case "通用0722": qf = new QFNewCommon(); break; case "FYQF": qf = new FYQF(); break; default: qf = new CommonQuFu(); break; } return(qf); }
public static float CalQF(SXCJModule module, List <float> list, Double qfLimit, float maxForce, Logger log, MachineBase machine) { float qf = 0.0f; try { if (module.SpecialSetting.MachineType == 2 && maxForce > 0 && list != null && list.Count > 0) { QFModule m = null; QuFuBase quBase = QuFuFactory.GetQuFuModule(module.SpecialSetting.QFName); ReSet: if (quBase != null) { m = quBase.CalQuFu(module, list, qfLimit, maxForce, machine); } if (m == null)//无屈服过程,是否乘以参数? { qf = (float)(maxForce * module.SpecialSetting.QFParameter); } else { if (module.SpecialSetting.QuFuType == 1) { qf = m.UpQF; } else { qf = m.DownQF; } if (qf == 0.00f && !isRemarkQF) { if (module.SpecialSetting.IsDebug) { log.WriteLog("调用备用屈服算法通用0722!", true, false); } isRemarkQF = true; quBase = QuFuFactory.GetQuFuModule("通用0722"); goto ReSet; } } } } catch (Exception ex) { log.WriteLog(ex.Message + "\r\n" + ex.StackTrace, true, true); } isRemarkQF = false; return(qf); }