Facility location and capacity planning with delay-dependent demand