public void allocatePERanges(PERangeList selected, 
			double startTime, double finishTime) {
		
		// If the time of the last entry is equals to finish time than another
		// entry is not required. In this case we just increase the number of
		// gridlets that rely on that entry to mark either its completion
		// time or start time. The same is valid to the anchor entry, that is
		// the entry that represents the job's start time.

		Iterator<ProfileEntry> it = avail.itValuesFromPrec(startTime);
		ProfileEntry last = it.next();
		ProfileEntry newAnchor = null;
        
        if(Double.compare(last.getTime(), startTime) == 0) {
        	last.increaseJob();
        }
        else {
        	newAnchor = last.clone(startTime);
        	last = newAnchor;
        }

        ProfileEntry nextEntry = null;
        while(it.hasNext()) {
       		nextEntry = it.next();
       		if(nextEntry.getTime() <= finishTime) {
       			last.getAvailRanges().remove(selected);
       			last = nextEntry;
       			continue;
       		}
   			break;
        }

        if(Double.compare(last.getTime(),finishTime) == 0) {
        	last.increaseJob();
        }
        else {
        	add(last.clone(finishTime));
        	last.getAvailRanges().remove(selected);
        }
        
        if(newAnchor != null) {
        	add(newAnchor);
        }
	}