public static double real(double value, double lessFactor,
                double moreFactor, double randDouble)
                throws IllegalArgumentException
    {
        String errorMsg = "GridSimRandom.real(): Error - ";
        if (value < MIN_VALUE)
        {
            throw new IllegalArgumentException(errorMsg +
                    "value must be zero or positive value.");
        }

        if (lessFactor < MIN_VALUE)
        {
            throw new IllegalArgumentException(errorMsg +
                    "lessFactor must be zero or positive value.");
        }

        if (moreFactor < MIN_VALUE || moreFactor > MAX_VALUE)
        {
            throw new IllegalArgumentException(errorMsg +
                    "moreFactor must be within [0.0, 1.0].");
        }

        if (randDouble < MIN_VALUE || randDouble > MAX_VALUE)
        {
            throw new IllegalArgumentException(errorMsg +
                    "randDouble must be within [0.0, 1.0].");
        }

        double result = value *
            (MAX_VALUE - lessFactor + (lessFactor + moreFactor) * randDouble);

        return result;
    }