protected boolean validateGridlet(SSGridlet sgl) {
    	int reqPE = sgl.getNumPE();
    	
    	if(reqPE > super.totalPE_){
    		String userName = GridSim.getEntityName(sgl.getSenderID());
    		logger.info("Gridlet #" + sgl.getID() + " from " +
	                userName + " user requires " + sgl.getNumPE() + " PEs. " +
	                		"The resource has only " + super.totalPE_ + " PEs.");
    		return false;
    	}
    	
    	// the id of the queue where the job can be scheduled
    	int queueId = profile.matchPartition(sgl); 
    	
    	// if no queue can handle the job, then reject it
    	if(queueId == -1) {
    		String userName = GridSim.getEntityName(sgl.getSenderID());
    		logger.info(super.get_name() + " cannot handle gridlet #" + sgl.getID() + 
    				" from " + userName + " as it cannot be assigned to a partition.");
    		return false;
    	}
    	
		// if the partition does not have enough resources, the borrowing is
    	// disabled and the behaviour is to return the job, then returns false, 
    	// forcing the job to be returned to the user
    	else {
    		ResourcePartition partition = partitions[queueId];
    		if(!allowBorrowing && returnJob 
    				&& partition.getInitialNumPEs() < reqPE) {
        		String userName = GridSim.getEntityName(sgl.getSenderID());
        		logger.info(" Gridlet #" + sgl.getID() + " from " +
    	                userName + " user requires " + sgl.getNumPE() + " PEs whereas the " +
    	                		"partition does not have enough resources and borrowing " +
    	                		"is disabled.");
        		return false;
    		}
    	}
    	
    	sgl.setPartitionID(queueId);
    	return true;
    }