public double ComputeStaticBCT(Vector3D dim, string caseType, McKeeFormula.FormulaType formulaType) { return(McKeeFormula.ComputeStaticBCT( dim.X, dim.Y, dim.Z, caseType, this, formulaType)); }
/// <summary> /// Convert to McKeeFormula to string /// </summary> public static string ModeText(McKeeFormula.FormulaType type) { switch (type) { case McKeeFormula.FormulaType.MCKEE_CLASSIC: return(TreeDim.EdgeCrushTest.Properties.Resource.MCKEEFORMULA_CLASSIC); case McKeeFormula.FormulaType.MCKEE_IMPROVED: return(TreeDim.EdgeCrushTest.Properties.Resource.MCKEEFORMULA_IMPROVED); default: return(""); } }
public static Dictionary <KeyValuePair <string, string>, double> EvaluateEdgeCrushTestMatrix( double L, double B, double H , string cardboardId, string caseType, string printType , McKeeFormula.FormulaType mcKeeFormulaType) { // get dictionnaries Dictionary <string, double> humidityCoefDictionary = HumidityCoefDictionary; Dictionary <string, double> stockCoefDictionary = StockCoefDictionary; double printCoef = PrintCoefDictionary[printType]; // get cardboard quality data double bct_static = ComputeStaticBCT(L, B, H, cardboardId, caseType, mcKeeFormulaType); Dictionary <KeyValuePair <string, string>, double> edgeCrushTestMatrix = new Dictionary <KeyValuePair <string, string>, double>(); foreach (string humidityRange in HumidityCoefDictionary.Keys) { foreach (string stockDuration in StockCoefDictionary.Keys) { edgeCrushTestMatrix.Add(new KeyValuePair <string, string>(stockDuration, humidityRange) , bct_static * printCoef * stockCoefDictionary[stockDuration] * humidityCoefDictionary[humidityRange]); } } return(edgeCrushTestMatrix); }
public double ComputeStaticBCT(double caseLength, double caseWidth, double caseHeight, string caseType, McKeeFormula.FormulaType formulaType) { return(McKeeFormula.ComputeStaticBCT( caseLength, caseWidth, caseHeight, caseType, this, formulaType)); }
public List <QualityData> GetSortedListCardboardQuality(Vector3D dim, string caseType, bool dblWall, McKeeFormula.FormulaType formulaType, string profile, bool filtered, double appliedLoad) { var qualities = CardboardQualities; return(qualities.Where(qd => (string.IsNullOrEmpty(profile) || string.Equals(qd.Profile, profile))) .Where(qd => (qd.ComputeStaticBCT(dim, caseType, dblWall, formulaType) >= appliedLoad * 9.81 / 10) || !filtered) .OrderBy(qh => qh.ComputeStaticBCT(dim, caseType, dblWall, formulaType)) .ToList()); }
public List <QualityData> GetSortedCardboardQualityDictionary(Vector3D dim, string caseType, McKeeFormula.FormulaType formulaType, bool filtered, double appliedLoad) { var qualities = CardboardQualities; return(qualities.Where(qd => (qd.ComputeStaticBCT(dim, caseType, formulaType) >= appliedLoad * 9.81 / 10) || !filtered) .OrderBy(qh => qh.ComputeStaticBCT(dim, caseType, formulaType)) .ToList()); }