public void createResources() throws GridSimRunTimeException {
        printRuntimeMessage("Creating resouces");
        
        int currentResourceID = 0;
        for (GridSimResourceConfig resConfig: _config.getResources()) {
            MachineList machines = new MachineList();
            int currentMachineID = 0;
            for (GridSimMachineConfig mc: resConfig.getMachines()) {
                machines.add(new Machine(currentMachineID, mc.getPECount(), mc.getPERating()));
                ++currentMachineID;
            }
            
            ResourceCharacteristics rc = new ResourceCharacteristics(resConfig.getArch(), resConfig.getOS(),
                    machines, resConfig.getAllocPolicy(), resConfig.getTimeZone(), resConfig.getCostPerSec());
            
            ResourceCalendar calendar = new ResourceCalendar(resConfig.getTimeZone(), RESOURCES_PEAK_LOAD,
                    RESOURCES_OFFPEAK_LOAD, RESOURCES_HOLIDAY_LOAD, RESOURCES_CALENDAR_WEEKENDS,
                    RESOURCES_CALENDAR_HOLIDAYS, RESOURCES_CALENDAR_SEED);

            for (long i = 0; i < resConfig.getCount(); ++i) {
                GridResource resource;
                String resName = String.format("Resource_%1$d", currentResourceID);

                try {
                    printRuntimeMessage("Creating resource " + resName);
                    resource = new GridResource(resName, resConfig.getBaudRate(), rc, calendar);
                }
                catch (Exception e) {
                    String desc = "Failed to create resource " + resName + ": " + e.getMessage();
                    printRuntimeMessage(desc);
                    throw new GridSimRunTimeException(desc);
                }
                
                ++currentResourceID;
            }
        }
        
        printRuntimeMessage("Resouces created");
    }