public static double[] consumptionMemory(Memory memory, UsageMemory usageMemory) {
		double f1 = (usageMemory.getEstimatedMilliseconds() / 1000.0) * (usageMemory.getUtilization() * memory.getWorkConsumption() + (1 - usageMemory.getUtilization()) * memory.getIdleConsumption());
		double f2 = (usageMemory.getSize().getMegaBites() / memory.getBandwidth()) * memory.getWorkConsumption();
		if (f2 != 0)
			return new double[] { usageMemory.getSize().getMegaBites() / memory.getBandwidth(), f2 };
		if (f1 != 0)
			return new double[] { usageMemory.getEstimatedMilliseconds() / 1000.0, f1 };
		return new double[] { 0, -1 };
	}