public static XYCurveDTO constructGenericEndOfLifePofCurve() { // Construct a generic end of life condition to failure curve. int numPoints = 11; double mAHI = (CustomerConstants.BestConditionScore + CustomerConstants.WorstConditionScore) / 2.0; // Midpoint Of AHI Scale, aka mAHI, aka m double theta = 0.463; // Convexity Of Curve double curveBias = 0.22; // (s) XYCurveDTO eomConditionToFailureCurve = new XYCurveDTO(); // eomConditionToFailureCurve.Id // eomConditionToFailureCurve.Name // eomConditionToFailureCurve.CurveType CurvePointDTO[] points = new CurvePointDTO[numPoints]; for (int i = 0; i < numPoints; i++) { points[i] = new CurvePointDTO(); points[i].X = // Condition CustomerConstants.WorstConditionScore + i * (CustomerConstants.BestConditionScore - CustomerConstants.WorstConditionScore) / (numPoints - 1); points[i].Y = // PoF Math.Exp(mAHI) / (1 + Math.Exp(mAHI + curveBias + theta * points[i].X)); } eomConditionToFailureCurve.Points = points; return(eomConditionToFailureCurve); }
/// <summary> /// // Construct a generic end of life condition decay curve, based on the design life entered by the user. /// </summary> /// <param name="estimatedDesignLife">Asset's estimated design life in years</param> /// <returns>Generated condition decay curve</returns> public static XYCurveDTO constructConditionDecayCurve(double estimatedDesignLife) { XYCurveDTO conditionDecayCurve = new XYCurveDTO(); CurvePointDTO[] points = new CurvePointDTO[3]; points[0] = new CurvePointDTO(); points[0].X = 0; points[0].Y = 10.0; // - - - - - - - - - - -> When brand new, the asset is in perfect condition points[1] = new CurvePointDTO(); points[1].X = estimatedDesignLife; // - - - -> When at its design life, the asset has a condition of 3 points[1].Y = 3.0; points[2] = new CurvePointDTO(); points[2].X = estimatedDesignLife / 0.7; // -> When past its design life (assuming linear degradation), Design Life/0.7 corresponds to a condition of 0 points[2].Y = 0.0; conditionDecayCurve.Points = points; return(conditionDecayCurve); }