private void init(double[] regularLoad, double peakLoad,
                double offPeakLoad, double relativeHolidayLoad,
                LinkedList weekendList, LinkedList holidayList, long seed)
    {
        this.weekendList_ = weekendList;
        this.holidayList_ = holidayList;
        random_ = new Random(seed);

        // load must be within [0 .. 1] range
        int FULL = 1;
        if (peakLoad > FULL) {
            peakLoad = FULL;
        }

        if (offPeakLoad > FULL) {
            offPeakLoad = FULL;
        }

        if (relativeHolidayLoad > FULL) {
            relativeHolidayLoad = FULL;
        }

        /////////////////
        double val = 0.0;
        double FACTOR = 0.1;
        int SIZE = regularLoad.length;
        int HOUR = 24;
        weekdayLoad_ = new double[HOUR];  // background load during weekdays
        holidayLoad_ = new double[HOUR];  // background load during holidays

        // for each hour in a day, determine the load during the weekday and
        // holiday
        for (int i = 0; i < regularLoad.length; i++)
        {
            val = regularLoad[i] * (peakLoad - offPeakLoad) + offPeakLoad;

            // background load during the week
            weekdayLoad_[i] = GridSimRandom.real( val, FACTOR, FACTOR,
                                    random_.nextDouble() );

            // background load during the holiday
            holidayLoad_[i] = GridSimRandom.real( relativeHolidayLoad * val,
                                    FACTOR, FACTOR, random_.nextDouble() );

            // if the load is full, it means that a resource can't process
            // any jobs. Hence, need to lower the load
            if (weekdayLoad_[i] >= FULL) {
                weekdayLoad_[i] = 0.95;
            }

            if (holidayLoad_[i] >= FULL) {
                holidayLoad_[i] = 0.95;
            }
        }

        if (regularLoad.length < HOUR)
        {
            System.out.println("ResourceCalendar(): Warning regularLoad[] must" +
                " be for 24 hours.\nThe loads in the remaining hours will set to zeros.");

            // then set remaining loads to zero
            for (int i = regularLoad.length; i < HOUR; i++)
            {
                weekdayLoad_[i] = 0;
                holidayLoad_[i] = 0;

            }
        } // end if
    }