private void removeReservation(ServerReservation res) {
    	boolean inProg = res.getReservationStatus() == ReservationStatus.IN_PROGRESS;
    	
    	// returns the time slot to the profile
    	profile.addTimeSlot(res.getStartTime(), 
    			res.getExpectedFinishTime(), res.getPERangeList());
    	
    	LinkedList<ScheduleItem> removedGridlets = new LinkedList<ScheduleItem>();
    	Iterator<SSGridlet> iterGrl = 
    		inProg ? runningJobs.iterator() : waitingJobs.iterator();

        // removes all gridlets that are associated to the reservation
    	while(iterGrl.hasNext()) {
    		SSGridlet gridlet = iterGrl.next();
    		if(gridlet.getReservationID() == res.getID() 
    				&& gridlet.getStatus() != Gridlet.SUCCESS 
    				&& gridlet.getStatus() != Gridlet.FAILED) {
    			
    			gridlet.setStatus(Gridlet.CANCELED);
    			gridlet.finalizeGridlet();
    			removedGridlets.add(gridlet);
    			iterGrl.remove();
    			super.sendFinishGridlet(gridlet.getGridlet());
    		}
    	}
    	
    	//---------------- USED FOR DEBUGGING PURPOSES ONLY ----------------
    	if(removedGridlets.size() > 0) {
    		visualizer.notifyListeners(super.get_id(), ActionType.ITEM_CANCELLED, 
       				false, removedGridlets);
    	}
    }