public int getDemandByCost(int cost) {
		int result = 0;
		int[] demands = getDemands();
		
		int i = 0;
		while(i < demands.length){	// kijk per demand of de cost groter of gelijk is aan cost
			if (costByDemandMap.get(demands[i]) == cost){
				result = demands[i];
				break;
			}
			if(demands[i] < 0 && costByDemandMap.get(demands[i]) < cost){
				result = demands[i];
				break;
			}
			if(demands[i] > 0 && costByDemandMap.get(demands[i]) < cost){
				if (i > 0)
					result = demands[i-1];
				break;
			}
			i++;
		}
		if (i == demands.length)
			result = demands[i - 1];
		
		return result;
	}