protected double getNextFailureNumResSample()
    {
        double sample;
        if (failureNumResPatternDiscrete_ != null)
        {
            sample = failureNumResPatternDiscrete_.sample();
            return Math.abs(sample);
        }
        else if (failureNumResPatternCont_ != null)
        {
            sample = failureNumResPatternCont_.sample();
            return Math.abs(sample);
        }
        else if (failureNumResPatternVariate_ != null)
        {
            sample = failureNumResPatternVariate_.gen();
            return Math.abs(sample);
        }
        else
            return -1;
    }