private double getCostOld() {
		if (mindistRespected() == false) {
			return Double.MAX_VALUE;
		}
		double result = 0;
		for (PolylineImpl p : polylines) {
			result += getLength(p);

			for (PolylineImpl other : polylines) {
				if (other == p) {
					continue;
				}
				if (p.doesTouch(other)) {
					result += getLength(other);
				}
			}
		}

		return result;
	}