Harvesting control for an age-structured population in a multilayered habitat